Bug 137752

Summary: glReadPixels on NVidia cards return the wrong values for the alpha channel when alpha is off
Product: WebKit Reporter: Roger Fong <roger_fong>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bfulgham, commit-queue, dino, jonlee, kondapallykalyan, noam, roger_fong
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Unspecified   
Bug Depends on: 137790    
Bug Blocks:    
Attachments:
Description Flags
patch bfulgham: review+

Description Roger Fong 2014-10-15 13:18:16 PDT
When you create a rendering context with alpha:false, this means that the context returned should be opaque.
However, with nvidia cards, calling glreadpixels on such contexts returns the wrong value. It returns 0's in the alpha channel, they should be 255 instead.

As a workaround for this, after calls to ::glReadPixels we should manually set the alpha channel to 255 if alpha is off for the context.
Comment 1 Roger Fong 2014-10-15 13:20:46 PDT
<rdar://problem/15408133>
I believe this is the last failing 1.0.2 test on at least the 2 nvidia cards i've tested on. (the 9600M GT and the 750 M)
Comment 2 Roger Fong 2014-10-15 13:42:50 PDT
Created attachment 239892 [details]
patch
Comment 3 Brent Fulgham 2014-10-15 13:53:30 PDT
Comment on attachment 239892 [details]
patch

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

Looks good. Could you please mention the two failing tests that you have fixed with this change? Thanks.

> ChangeLog:7
> +        Reviewed by NOBODY (OOPS!).

Can you list the two failing tests that were fixed by this?
Comment 4 Roger Fong 2014-10-15 14:41:38 PDT
Committed with mention of fixed test in changelog.
http://trac.webkit.org/changeset/174744
Comment 5 WebKit Commit Bot 2014-10-16 14:50:02 PDT
Re-opened since this is blocked by bug 137790
Comment 6 Roger Fong 2014-10-16 23:44:41 PDT
Closing this since I filed another bug for the issue.

*** This bug has been marked as a duplicate of bug 137793 ***