WebGL2: support TexImage3D (#37718)

Add TexImage3D method to WebGL2RenderingContext

Testing: conformance2 should pass. Also it should get
http://webglsamples.org/WebGL2Samples/#texture_2d_array and
http://webglsamples.org/WebGL2Samples/#texture_3d running.
Fixes: #26511

Now Servo can run texture_2d_array and texture_3d samples!

![圖片](https://github.com/user-attachments/assets/41b87563-08b8-4db3-b503-12f3a61dbed7)

![圖片](https://github.com/user-attachments/assets/3c62a4de-35ea-488d-b2e5-00e3aed52090)

And it can now run three.js too!

![圖片](https://github.com/user-attachments/assets/d880aa92-a154-4895-aa06-b7919d1fc869)

---------

Signed-off-by: Wu Yu Wei <yuweiwu@pm.me>
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2025-07-09 23:22:03 +09:00 committed by GitHub
parent 4499fdeb2b
commit 34c31ee418
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
43 changed files with 1341 additions and 980 deletions

View file

@ -1,4 +0,0 @@
[active-3d-texture-bug.html]
expected: ERROR
[WebGL test #1]
expected: FAIL

View file

@ -2,29 +2,17 @@
[WebGL test #11]
expected: FAIL
[WebGL test #12]
expected: FAIL
[WebGL test #16]
expected: FAIL
[WebGL test #18]
expected: FAIL
[WebGL test #19]
expected: FAIL
[WebGL test #2]
expected: FAIL
[WebGL test #3]
expected: FAIL
[WebGL test #6]
expected: FAIL
[WebGL test #8]
expected: FAIL
[WebGL test #9]
expected: FAIL

View file

@ -2,3 +2,12 @@
expected: ERROR
[WebGL test #1]
expected: FAIL
[WebGL test #2]
expected: FAIL
[WebGL test #3]
expected: FAIL
[WebGL test #4]
expected: FAIL

View file

@ -1,6 +1,3 @@
[generate-mipmap-with-large-base-level.html]
[WebGL test #1]
expected: FAIL
[WebGL test #3]
expected: FAIL

View file

@ -1,636 +0,0 @@
[gl-get-tex-parameter.html]
[WebGL test #0]
expected: FAIL
[WebGL test #101]
expected: FAIL
[WebGL test #102]
expected: FAIL
[WebGL test #103]
expected: FAIL
[WebGL test #104]
expected: FAIL
[WebGL test #109]
expected: FAIL
[WebGL test #110]
expected: FAIL
[WebGL test #111]
expected: FAIL
[WebGL test #112]
expected: FAIL
[WebGL test #117]
expected: FAIL
[WebGL test #118]
expected: FAIL
[WebGL test #119]
expected: FAIL
[WebGL test #120]
expected: FAIL
[WebGL test #125]
expected: FAIL
[WebGL test #126]
expected: FAIL
[WebGL test #127]
expected: FAIL
[WebGL test #128]
expected: FAIL
[WebGL test #13]
expected: FAIL
[WebGL test #133]
expected: FAIL
[WebGL test #134]
expected: FAIL
[WebGL test #135]
expected: FAIL
[WebGL test #136]
expected: FAIL
[WebGL test #137]
expected: FAIL
[WebGL test #138]
expected: FAIL
[WebGL test #139]
expected: FAIL
[WebGL test #14]
expected: FAIL
[WebGL test #140]
expected: FAIL
[WebGL test #141]
expected: FAIL
[WebGL test #142]
expected: FAIL
[WebGL test #143]
expected: FAIL
[WebGL test #144]
expected: FAIL
[WebGL test #145]
expected: FAIL
[WebGL test #146]
expected: FAIL
[WebGL test #147]
expected: FAIL
[WebGL test #148]
expected: FAIL
[WebGL test #149]
expected: FAIL
[WebGL test #15]
expected: FAIL
[WebGL test #150]
expected: FAIL
[WebGL test #151]
expected: FAIL
[WebGL test #152]
expected: FAIL
[WebGL test #153]
expected: FAIL
[WebGL test #154]
expected: FAIL
[WebGL test #155]
expected: FAIL
[WebGL test #156]
expected: FAIL
[WebGL test #157]
expected: FAIL
[WebGL test #158]
expected: FAIL
[WebGL test #159]
expected: FAIL
[WebGL test #16]
expected: FAIL
[WebGL test #160]
expected: FAIL
[WebGL test #161]
expected: FAIL
[WebGL test #162]
expected: FAIL
[WebGL test #163]
expected: FAIL
[WebGL test #164]
expected: FAIL
[WebGL test #165]
expected: FAIL
[WebGL test #166]
expected: FAIL
[WebGL test #167]
expected: FAIL
[WebGL test #168]
expected: FAIL
[WebGL test #169]
expected: FAIL
[WebGL test #170]
expected: FAIL
[WebGL test #171]
expected: FAIL
[WebGL test #172]
expected: FAIL
[WebGL test #173]
expected: FAIL
[WebGL test #174]
expected: FAIL
[WebGL test #175]
expected: FAIL
[WebGL test #176]
expected: FAIL
[WebGL test #177]
expected: FAIL
[WebGL test #178]
expected: FAIL
[WebGL test #179]
expected: FAIL
[WebGL test #180]
expected: FAIL
[WebGL test #181]
expected: FAIL
[WebGL test #182]
expected: FAIL
[WebGL test #183]
expected: FAIL
[WebGL test #184]
expected: FAIL
[WebGL test #185]
expected: FAIL
[WebGL test #186]
expected: FAIL
[WebGL test #187]
expected: FAIL
[WebGL test #188]
expected: FAIL
[WebGL test #189]
expected: FAIL
[WebGL test #190]
expected: FAIL
[WebGL test #191]
expected: FAIL
[WebGL test #192]
expected: FAIL
[WebGL test #197]
expected: FAIL
[WebGL test #198]
expected: FAIL
[WebGL test #199]
expected: FAIL
[WebGL test #200]
expected: FAIL
[WebGL test #205]
expected: FAIL
[WebGL test #206]
expected: FAIL
[WebGL test #207]
expected: FAIL
[WebGL test #208]
expected: FAIL
[WebGL test #21]
expected: FAIL
[WebGL test #213]
expected: FAIL
[WebGL test #214]
expected: FAIL
[WebGL test #215]
expected: FAIL
[WebGL test #216]
expected: FAIL
[WebGL test #22]
expected: FAIL
[WebGL test #221]
expected: FAIL
[WebGL test #222]
expected: FAIL
[WebGL test #223]
expected: FAIL
[WebGL test #224]
expected: FAIL
[WebGL test #229]
expected: FAIL
[WebGL test #23]
expected: FAIL
[WebGL test #230]
expected: FAIL
[WebGL test #231]
expected: FAIL
[WebGL test #232]
expected: FAIL
[WebGL test #237]
expected: FAIL
[WebGL test #238]
expected: FAIL
[WebGL test #239]
expected: FAIL
[WebGL test #24]
expected: FAIL
[WebGL test #240]
expected: FAIL
[WebGL test #241]
expected: FAIL
[WebGL test #242]
expected: FAIL
[WebGL test #243]
expected: FAIL
[WebGL test #244]
expected: FAIL
[WebGL test #245]
expected: FAIL
[WebGL test #246]
expected: FAIL
[WebGL test #247]
expected: FAIL
[WebGL test #248]
expected: FAIL
[WebGL test #249]
expected: FAIL
[WebGL test #250]
expected: FAIL
[WebGL test #251]
expected: FAIL
[WebGL test #252]
expected: FAIL
[WebGL test #253]
expected: FAIL
[WebGL test #254]
expected: FAIL
[WebGL test #255]
expected: FAIL
[WebGL test #256]
expected: FAIL
[WebGL test #257]
expected: FAIL
[WebGL test #259]
expected: FAIL
[WebGL test #261]
expected: FAIL
[WebGL test #262]
expected: FAIL
[WebGL test #263]
expected: FAIL
[WebGL test #264]
expected: FAIL
[WebGL test #265]
expected: FAIL
[WebGL test #266]
expected: FAIL
[WebGL test #267]
expected: FAIL
[WebGL test #268]
expected: FAIL
[WebGL test #269]
expected: FAIL
[WebGL test #270]
expected: FAIL
[WebGL test #271]
expected: FAIL
[WebGL test #272]
expected: FAIL
[WebGL test #273]
expected: FAIL
[WebGL test #274]
expected: FAIL
[WebGL test #275]
expected: FAIL
[WebGL test #276]
expected: FAIL
[WebGL test #277]
expected: FAIL
[WebGL test #278]
expected: FAIL
[WebGL test #279]
expected: FAIL
[WebGL test #280]
expected: FAIL
[WebGL test #281]
expected: FAIL
[WebGL test #282]
expected: FAIL
[WebGL test #283]
expected: FAIL
[WebGL test #284]
expected: FAIL
[WebGL test #285]
expected: FAIL
[WebGL test #286]
expected: FAIL
[WebGL test #287]
expected: FAIL
[WebGL test #288]
expected: FAIL
[WebGL test #289]
expected: FAIL
[WebGL test #29]
expected: FAIL
[WebGL test #290]
expected: FAIL
[WebGL test #291]
expected: FAIL
[WebGL test #292]
expected: FAIL
[WebGL test #293]
expected: FAIL
[WebGL test #294]
expected: FAIL
[WebGL test #295]
expected: FAIL
[WebGL test #296]
expected: FAIL
[WebGL test #30]
expected: FAIL
[WebGL test #301]
expected: FAIL
[WebGL test #302]
expected: FAIL
[WebGL test #303]
expected: FAIL
[WebGL test #304]
expected: FAIL
[WebGL test #309]
expected: FAIL
[WebGL test #31]
expected: FAIL
[WebGL test #310]
expected: FAIL
[WebGL test #311]
expected: FAIL
[WebGL test #312]
expected: FAIL
[WebGL test #313]
expected: FAIL
[WebGL test #32]
expected: FAIL
[WebGL test #37]
expected: FAIL
[WebGL test #38]
expected: FAIL
[WebGL test #39]
expected: FAIL
[WebGL test #40]
expected: FAIL
[WebGL test #45]
expected: FAIL
[WebGL test #46]
expected: FAIL
[WebGL test #47]
expected: FAIL
[WebGL test #48]
expected: FAIL
[WebGL test #5]
expected: FAIL
[WebGL test #53]
expected: FAIL
[WebGL test #54]
expected: FAIL
[WebGL test #55]
expected: FAIL
[WebGL test #56]
expected: FAIL
[WebGL test #6]
expected: FAIL
[WebGL test #61]
expected: FAIL
[WebGL test #62]
expected: FAIL
[WebGL test #63]
expected: FAIL
[WebGL test #64]
expected: FAIL
[WebGL test #69]
expected: FAIL
[WebGL test #7]
expected: FAIL
[WebGL test #70]
expected: FAIL
[WebGL test #71]
expected: FAIL
[WebGL test #72]
expected: FAIL
[WebGL test #77]
expected: FAIL
[WebGL test #78]
expected: FAIL
[WebGL test #79]
expected: FAIL
[WebGL test #8]
expected: FAIL
[WebGL test #80]
expected: FAIL
[WebGL test #85]
expected: FAIL
[WebGL test #86]
expected: FAIL
[WebGL test #87]
expected: FAIL
[WebGL test #88]
expected: FAIL
[WebGL test #93]
expected: FAIL
[WebGL test #94]
expected: FAIL
[WebGL test #95]
expected: FAIL
[WebGL test #96]
expected: FAIL

View file

@ -1,13 +1,4 @@
[tex-3d-mipmap-levels-intel-bug.html]
[WebGL test #1]
expected: FAIL
[WebGL test #2]
expected: FAIL
[WebGL test #3]
expected: FAIL
[WebGL test #4]
expected: FAIL

View file

@ -1,4 +1,4 @@
[tex-3d-size-limit.html]
expected: ERROR
expected: CRASH
[WebGL test #1]
expected: FAIL

View file

@ -1,9 +0,0 @@
[tex-base-level-bug.html]
[WebGL test #1]
expected: FAIL
[WebGL test #3]
expected: FAIL
[WebGL test #5]
expected: FAIL

View file

@ -8,3 +8,9 @@
[WebGL test #8]
expected: FAIL
[WebGL test #11]
expected: FAIL
[WebGL test #12]
expected: FAIL

View file

@ -12,8 +12,11 @@
[WebGL test #68]
expected: FAIL
[WebGL test #70]
[WebGL test #76]
expected: FAIL
[WebGL test #71]
[WebGL test #77]
expected: FAIL
[WebGL test #79]
expected: FAIL

View file

@ -6,26 +6,8 @@
[WebGL test #11]
expected: FAIL
[WebGL test #14]
expected: FAIL
[WebGL test #15]
expected: FAIL
[WebGL test #21]
expected: FAIL
[WebGL test #23]
expected: FAIL
[WebGL test #24]
expected: FAIL
[WebGL test #4]
expected: FAIL
[WebGL test #5]
expected: FAIL
[WebGL test #9]
[WebGL test #25]
expected: FAIL

View file

@ -1,4 +1,4 @@
[tex-new-formats.html]
expected: ERROR
[WebGL test #8]
[WebGL test #10]
expected: FAIL

View file

@ -1,8 +1,5 @@
[tex-subimage3d-pixel-buffer-bug.html]
expected: ERROR
[WebGL test #1]
expected: FAIL
[WebGL test #2]
expected: FAIL

View file

@ -8,3 +8,18 @@
[WebGL test #11]
expected: FAIL
[WebGL test #13]
expected: FAIL
[WebGL test #14]
expected: FAIL
[WebGL test #15]
expected: FAIL
[WebGL test #16]
expected: FAIL
[WebGL test #17]
expected: FAIL