Bug 222844 - Metal-ANGLE glClearColor has red and blue channels flipped
Summary: Metal-ANGLE glClearColor has red and blue channels flipped
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dean Jackson
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-05 17:27 PST by Dean Jackson
Modified: 2021-03-17 13:37 PDT (History)
8 users (show)

See Also:


Attachments
Patch (3.37 KB, patch)
2021-03-05 19:06 PST, Kyle Piddington
no flags Details | Formatted Diff | Diff
Patch (3.33 KB, patch)
2021-03-08 11:37 PST, Kyle Piddington
kbr: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Jackson 2021-03-05 17:27:55 PST
When the Metal ANGLE backend is enabled, the values passed to glClearColor have red and blue flipped on Mac.

See fast/canvas/webgl/match-page-color-space.html

(unfortunately the WebGL conformance suite never assigns different values to the color channels - just greyscale)
Comment 1 Radar WebKit Bug Importer 2021-03-05 17:28:04 PST
<rdar://problem/75120583>
Comment 2 Kyle Piddington 2021-03-05 19:06:20 PST
Created attachment 422464 [details]
Patch
Comment 3 Kenneth Russell 2021-03-05 20:08:37 PST
Wow, can't believe the conformance suite doesn't cover this case. Filed https://github.com/KhronosGroup/WebGL/issues/3254 about improving its coverage.
Comment 4 Kenneth Russell 2021-03-05 20:43:16 PST
Comment on attachment 422464 [details]
Patch

Looks good overall, but would like to see layout test results changing / progressing along with this patch.

The BGRA/RGBA difference in Metal is highly unfortunate. I wish it had not exposed BGRA in the first place.
Comment 5 Kyle Piddington 2021-03-08 11:37:38 PST
Created attachment 422591 [details]
Patch
Comment 6 EWS Watchlist 2021-03-08 11:39:00 PST
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 7 Kenneth Russell 2021-03-08 15:56:33 PST
Comment on attachment 422591 [details]
Patch

Looks good. The ios-wk2 layout test failures look unrelated. r+
Comment 8 Dean Jackson 2021-03-17 13:37:08 PDT
Landed in r274547