Bug 137752 - glReadPixels on NVidia cards return the wrong values for the alpha channel when alpha is off
Summary: glReadPixels on NVidia cards return the wrong values for the alpha channel wh...
Status: RESOLVED DUPLICATE of bug 137793
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 137790
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-15 13:18 PDT by Roger Fong
Modified: 2014-10-16 23:44 PDT (History)
7 users (show)

See Also:


Attachments
patch (3.28 KB, patch)
2014-10-15 13:42 PDT, Roger Fong
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 ***