Impl copyTexImage2D and copyTexSubImage2D

Implement copyTexImage2D and copyTexSubImage2D for
WebGLRenderingContext.
This commit is contained in:
Daniel Robertson 2016-05-21 10:50:47 -04:00
parent f1efeb00af
commit 867cd9be29
9 changed files with 365 additions and 131 deletions

View file

@ -1,5 +0,0 @@
[copyTexImage2D.html]
type: testharness
[WebGL test #0: testTexImage2D]
expected: FAIL

View file

@ -1,5 +0,0 @@
[copyTexImage2DBadArgs.html]
type: testharness
[WebGL test #0: testTexImage2D]
expected: FAIL

View file

@ -1,5 +0,0 @@
[copyTexSubImage2D.html]
type: testharness
[WebGL test #0: testTexImage2D]
expected: FAIL

View file

@ -1,5 +0,0 @@
[copyTexSubImage2DBadArgs.html]
type: testharness
[WebGL test #0: testTexImage2D]
expected: FAIL

View file

@ -1,5 +1,14 @@
[copy-tex-image-2d-formats.html]
type: testharness
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #3: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #6: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : should be no errors]
expected: FAIL
[WebGL test #16: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL

View file

@ -1,10 +1,5 @@
[texture-npot.html]
type: testharness
[WebGL test #1: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #4: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
expected: FAIL
[WebGL test #4: at (0, 0) expected: 0,0,0,255 was 192,0,128,64]
expected: FAIL
@ -15,6 +10,110 @@
[WebGL test #7: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #9: successfullyParsed should be true (of type boolean). Was undefined (of type undefined).]
[WebGL test #9: getError expected: INVALID_VALUE. Was INVALID_ENUM : copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #14: getError expected: NO_ERROR. Was INVALID_OPERATION : gl.texImage2D with NPOT texture at level 0 should succeed]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #20: at (0, 0) expected: 192,0,128,255 was 0,0,0,255]
expected: FAIL
[WebGL test #21: getError expected: INVALID_VALUE. Was INVALID_ENUM : copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.]
expected: FAIL
[WebGL test #24: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_OPERATION : gl.texImage2D with NPOT texture at level 0 should succeed]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #32: at (0, 0) expected: 192,192,192,255 was 0,0,0,255]
expected: FAIL
[WebGL test #33: getError expected: INVALID_VALUE. Was INVALID_ENUM : copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.]
expected: FAIL
[WebGL test #36: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #38: getError expected: NO_ERROR. Was INVALID_OPERATION : gl.texImage2D with NPOT texture at level 0 should succeed]
expected: FAIL
[WebGL test #41: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #43: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #44: at (0, 0) expected: 0,0,0,64 was 0,0,0,255]
expected: FAIL
[WebGL test #45: getError expected: INVALID_VALUE. Was INVALID_ENUM : copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.]
expected: FAIL
[WebGL test #48: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #50: getError expected: NO_ERROR. Was INVALID_OPERATION : gl.texImage2D with NPOT texture at level 0 should succeed]
expected: FAIL
[WebGL test #53: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #55: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #56: at (0, 0) expected: 192,192,192,64 was 0,0,0,255]
expected: FAIL
[WebGL test #57: getError expected: INVALID_VALUE. Was INVALID_ENUM : copyTexImage2D with NPOT texture with level > 0 should return INVALID_VALUE.]
expected: FAIL
[WebGL test #60: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #64: at (0, 0) expected: 0,0,0,255 was 0,192,128,255]
expected: FAIL
[WebGL test #65: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from draw.]
expected: FAIL
[WebGL test #67: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #69: getError expected: NO_ERROR. Was INVALID_ENUM : gl.texImage2D with POT texture at level 0 should succeed]
expected: FAIL
[WebGL test #71: getError expected: NO_ERROR. Was INVALID_ENUM : gl.generateMipmap with POT texture should return succeed]
expected: FAIL
[WebGL test #76: at (0, 0) expected: 0,0,0,255 was 0,192,128,255]
expected: FAIL
[WebGL test #77: getError returned INVALID_ENUM. Possibly Chromium bug where texture unit is set to 0 instead of GL_TEXTURE0.]
expected: FAIL
[WebGL test #79: getError expected: NO_ERROR. Was INVALID_ENUM : Should be no errors from setup.]
expected: FAIL
[WebGL test #81: getError expected: NO_ERROR. Was INVALID_ENUM : gl.texImage2D with POT texture at level 0 should succeed]
expected: FAIL
[WebGL test #83: getError expected: NO_ERROR. Was INVALID_ENUM : gl.generateMipmap with POT texture should return succeed]
expected: FAIL