Bug 220129

Summary: [ANGLE] Metal backend renders tdl.js samples as red
Product: WebKit Reporter: Kyle Piddington <kpiddington>
Component: ANGLEAssignee: Kyle Piddington <kpiddington>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, graouts, jdarpinian, kbr, kkinnunen, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 126404, 219759, 220076    
Attachments:
Description Flags
Patch none

Description Kyle Piddington 2020-12-23 15:23:18 PST
As reported by Ken Russell, TDL samples render a red background.

The root cause of this issue is an incorrect color mask for a texture blit. Instead of all channels being blitted, ANGLE tries to blit only the colors present specified by glColorMask
Blitting shouldn't be affected by the color mask.
Comment 1 Kyle Piddington 2020-12-23 15:24:42 PST
Created attachment 416727 [details]
Patch
Comment 2 EWS Watchlist 2020-12-23 15:25:32 PST
Note that there are important steps to take when updating ANGLE. See https://trac.webkit.org/wiki/UpdatingANGLE
Comment 3 Kenneth Russell 2020-12-23 15:51:46 PST
Comment on attachment 416727 [details]
Patch

Fantastic find and fix Kyle! Verified locally that this fixes the WebGL Aquarium with the Metal backend. r+
Comment 4 Kenneth Russell 2020-12-23 16:46:14 PST
Comment on attachment 416727 [details]
Patch

Passed EWS; let me CQ this before the tree closure.
Comment 5 EWS 2020-12-23 17:00:57 PST
Committed r271080: <https://trac.webkit.org/changeset/271080>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416727 [details].
Comment 6 Radar WebKit Bug Importer 2020-12-23 17:03:22 PST
<rdar://problem/72638743>