mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
webgl: Fix handling of UNPACK_ALIGNMENT.
We were setting it to whatever value from {1,2,4,8} the user requested and otherwise ignoring it. There were two problems there: 1) Validation ignored it, so GL could read outside of the user's array in TexImage() or TexSubImage() if the aligment was greater than cpp. 2) TexImage()/TexSubImage() from image/canvas sources wasn't packing its data according to the unpack alignment. To fix this, start tracking the user-requested alignment in the DOM side of the context. Set the GL's alignment to 1 for image/canvas sources or the user's value for array sources, and pass the user's alignment in to validation so that it can figure out the correct size of image that the GL will ready.
This commit is contained in:
parent
dfc4de0d84
commit
fcef92f5ba
6 changed files with 57 additions and 195 deletions
|
@ -1,122 +0,0 @@
|
|||
[tex-image-and-sub-image-2d-with-array-buffer-view.html]
|
||||
type: testharness
|
||||
[WebGL test #288: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #289: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #313: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #336: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #337: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #361: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #576: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #577: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #601: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #624: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #625: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #649: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #672: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #673: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #697: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #720: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #721: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #745: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #960: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #961: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #985: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1008: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1009: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1033: at (0, 9) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1056: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1057: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1081: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1104: at (6, 0) expected: 0,255,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1105: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1129: at (13, 8) expected: 255,0,0,255 was 0,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #312: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #360: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #600: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #648: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #696: at (0, 3) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #744: at (0, 3) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #984: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1032: at (0, 5) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1080: at (0, 3) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #1128: at (0, 3) expected: 0,0,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[tex-image-and-sub-image-2d-with-canvas-rgb565.html]
|
||||
type: testharness
|
||||
[WebGL test #0: at (0, 16) expected: 255,0,0 was 123,227,0]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[tex-image-and-sub-image-2d-with-canvas-rgba4444.html]
|
||||
type: testharness
|
||||
[WebGL test #0: at (0, 16) expected: 255,0,0 was 119,255,0]
|
||||
expected: FAIL
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
[tex-image-and-sub-image-2d-with-canvas-rgba5551.html]
|
||||
type: testharness
|
||||
[WebGL test #0: at (0, 16) expected: 255,0,0 was 123,231,0]
|
||||
expected: FAIL
|
||||
|
|
@ -36,39 +36,3 @@
|
|||
[WebGL test #35: at (0, 1) expected: 255,255,0,255 was 0,255,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #44: at (0, 1) expected: 255,0,0,255 was 255,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #45: at (0, 0) expected: 255,0,0,255 was 0,255,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #47: at (0, 0) expected: 0,255,0,255 was 255,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #50: at (0, 1) expected: 0,255,0,255 was 0,255,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #51: at (0, 0) expected: 255,0,255,255 was 0,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #54: at (0, 1) expected: 0,255,255,255 was 0,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #62: at (0, 1) expected: 0,255,0,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #63: at (0, 0) expected: 0,255,0,255 was 255,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #65: at (0, 0) expected: 0,0,255,255 was 255,0,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #68: at (0, 1) expected: 0,0,255,255 was 255,0,255,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #69: at (0, 0) expected: 255,0,0,255 was 255,255,0,255]
|
||||
expected: FAIL
|
||||
|
||||
[WebGL test #72: at (0, 1) expected: 255,0,255,255 was 255,255,0,255]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue