Bug 210766

Summary: [WebGL2] Refactor texImage2D and texSubImage2D taking ImageBitmap, ImageData, Image, ArrayBufferView
Product: WebKit Reporter: Kenneth Russell <kbr>
Component: WebGLAssignee: Kenneth Russell <kbr>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, dino, esprehn+autocc, ews-watchlist, graouts, gyuyoung.kim, jdarpinian, justin_fan, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 209515    
Bug Blocks: 211220, 208875, 209510, 209513, 211338    
Attachments:
Description Flags
Work in progress
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Kenneth Russell 2020-04-20 13:45:48 PDT
The texImage2D and texSubImage2D entry points which upload DOM resources (Image, ImageData, ImageBitmap) to WebGL textures contain duplicated code. In order to upgrade these to WebGL 2.0 functionality and also support uploads to 3D textures, they must be refactored into common helpers.
Comment 1 Kenneth Russell 2020-04-23 19:12:45 PDT
Have started this.
Comment 2 Kenneth Russell 2020-04-24 17:56:43 PDT
Created attachment 397532 [details]
Work in progress
Comment 3 Kenneth Russell 2020-04-24 17:57:25 PDT
Checkpointing the current patch above - not for review or testing yet.
Comment 4 Kenneth Russell 2020-04-30 16:26:43 PDT
Created attachment 398117 [details]
Patch
Comment 5 Kenneth Russell 2020-04-30 16:56:54 PDT
Created attachment 398124 [details]
Patch
Comment 6 Kenneth Russell 2020-04-30 21:23:58 PDT
Created attachment 398158 [details]
Patch
Comment 7 Kenneth Russell 2020-05-01 10:56:00 PDT
Created attachment 398202 [details]
Patch
Comment 8 Kenneth Russell 2020-05-01 11:32:35 PDT
Created attachment 398211 [details]
Patch
Comment 9 Kenneth Russell 2020-05-01 12:50:19 PDT
Created attachment 398220 [details]
Patch
Comment 10 Kenneth Russell 2020-05-01 14:05:50 PDT
Requesting review at this point. The majority of this patch is the large rebaselines, which per the ChangeLog, get dozens of WebGL 2.0 conformance tests passing completely.

The layout test flakes seen in some of the dry runs are unrelated to these code changes.
Comment 11 Dean Jackson 2020-05-01 14:38:51 PDT
Comment on attachment 398220 [details]
Patch

Our review tool can't handle this large a patch. Hopefully the cq does.

I had a couple of minor comments that can be fixed in a follow-up. e.g. using enum class for TexFuncValidationSourceType and others.

Thanks Ken, this is fantastic.
Comment 12 EWS 2020-05-01 14:52:55 PDT
Committed r261023: <https://trac.webkit.org/changeset/261023>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398220 [details].
Comment 13 Radar WebKit Bug Importer 2020-05-01 14:53:20 PDT
<rdar://problem/62748311>