Bug 46947 - texImage2D fails on 16-bit-per-channel images
Summary: texImage2D fails on 16-bit-per-channel images
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Zhenyao Mo
URL:
Keywords:
Depends on:
Blocks: 47027 47034
  Show dependency treegraph
 
Reported: 2010-09-30 17:41 PDT by Zhenyao Mo
Modified: 2010-10-01 17:51 PDT (History)
3 users (show)

See Also:


Attachments
patch (23.05 KB, patch)
2010-09-30 17:46 PDT, Zhenyao Mo
zmo: commit-queue-
Details | Formatted Diff | Diff
revised patch (23.90 KB, patch)
2010-09-30 18:17 PDT, Zhenyao Mo
kbr: review+
zmo: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zhenyao Mo 2010-09-30 17:41:21 PDT
Loading a 16-bit-per-channel will fail with an INVALID_VALUE error.
Comment 1 Zhenyao Mo 2010-09-30 17:46:14 PDT
Created attachment 69404 [details]
patch
Comment 2 Zhenyao Mo 2010-09-30 17:59:38 PDT
By the way, the 16-bit images are loading fine in Chromium Win, so adding this test entry should pass on all platforms.
Comment 3 Zhenyao Mo 2010-09-30 18:17:51 PDT
Created attachment 69409 [details]
revised patch

Forgot about also updating the expected.txt file.
Comment 4 Kenneth Russell 2010-10-01 15:43:41 PDT
Comment on attachment 69409 [details]
revised patch

View in context: https://bugs.webkit.org/attachment.cgi?id=69409&action=review

Looks OK. I think we should try to figure out a different structure (like a table) for the large switch statements in GraphicsContext3D::getImageData because they're really getting out of hand. Please consider filing a follow-up bug to rethink the structure there. One minor comment-related comment.

> WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp:131
>          // This path is only accessible for MacOS earlier than 10.6.4.

Is this comment still accurate?
Comment 5 Zhenyao Mo 2010-10-01 16:05:33 PDT
(In reply to comment #4)
> (From update of attachment 69409 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69409&action=review
> 
> Looks OK. I think we should try to figure out a different structure (like a table) for the large switch statements in GraphicsContext3D::getImageData because they're really getting out of hand. Please consider filing a follow-up bug to rethink the structure there. One minor comment-related comment.
> 
> > WebCore/platform/graphics/cg/GraphicsContext3DCG.cpp:131
> >          // This path is only accessible for MacOS earlier than 10.6.4.
> 
> Is this comment still accurate?

Yes, it still is.  Alpha first formats are not encountered so far on 10.6.4.

I'll leave the comments in.  If you think it's un-necessary to keep them, we can remove them in the follow-up bug.

I added these comments in case in the future such path got removed when a developer only deals with newer CG libs.
Comment 6 Zhenyao Mo 2010-10-01 16:08:47 PDT
Committed r68940: <http://trac.webkit.org/changeset/68940>