Add support for WebGL2 framebuffer attachments

Adds an initial implementation for the framebuffer attachments
introduced with WebGL2 and the related enums and constrains checks.
This commit is contained in:
Mátyás Mustoha 2020-02-20 13:32:38 +01:00
parent f5ff38b875
commit b41805a920
11 changed files with 463 additions and 433 deletions

View file

@ -1,164 +1,8 @@
[framebuffer-test.html]
[WebGL test #35: gl.getFramebufferAttachmentParameter(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #1: getError expected: INVALID_ENUM. Was INVALID_OPERATION : getFramebufferAttachmentParameter(COLOR_ATTACHMENT0) on the default framebuffer.]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #30: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.]
expected: FAIL
[WebGL test #26: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.]
expected: FAIL
[WebGL test #44: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #42: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.]
expected: FAIL
[WebGL test #38: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer with no attachment.]
expected: FAIL
[WebGL test #52: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_RED_SIZE) on read framebuffer with no attachment.]
expected: FAIL
[WebGL test #21: getError expected: NO_ERROR. Was INVALID_VALUE : framebufferTexture2D with an appropriate mipmap level.]
expected: FAIL
[WebGL test #46: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.]
expected: FAIL
[WebGL test #40: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #18: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) with no attachment.]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(BACK) on the default framebuffer.]
expected: FAIL
[WebGL test #11: getError expected: NO_ERROR. Was INVALID_ENUM : checkFramebufferStatus(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #27: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #37: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer.]
expected: FAIL
[WebGL test #36: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read framebuffer with no attachment.]
expected: FAIL
[WebGL test #16: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferTexImage2D(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #17: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferRenderbuffer(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) with no attachment.]
expected: FAIL
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.]
expected: FAIL
[WebGL test #43: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.]
expected: FAIL
[WebGL test #56: getError expected: NO_ERROR. Was INVALID_ENUM : bind draw framebuffer to default (null) framebuffer.]
expected: FAIL
[WebGL test #12: getError expected: NO_ERROR. Was INVALID_ENUM : bindFramebuffer(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #55: getError expected: NO_ERROR. Was INVALID_ENUM : bind read framebuffer to default (null) framebuffer.]
expected: FAIL
[WebGL test #49: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on read framebuffer without depth attachment.]
expected: FAIL
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #48: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.]
expected: FAIL
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer.]
expected: FAIL
[WebGL test #54: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_RED_SIZE) on read framebuffer with no attachment.]
expected: FAIL
[WebGL test #51: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on read framebuffer without depth attachment.]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #46: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #57: getError expected: NO_ERROR. Was INVALID_ENUM : bind read framebuffer to default (null) framebuffer.]
expected: FAIL
[WebGL test #40: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer with no attachment.]
expected: FAIL
[WebGL test #35: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.]
expected: FAIL
[WebGL test #20: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) with no attachment.]
expected: FAIL
[WebGL test #37: gl.getFramebufferAttachmentParameter(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #42: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #23: getError expected: NO_ERROR. Was INVALID_VALUE : framebufferTexture2D with an appropriate mipmap level.]
expected: FAIL
[WebGL test #32: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.]
expected: FAIL
[WebGL test #58: getError expected: NO_ERROR. Was INVALID_ENUM : bind draw framebuffer to default (null) framebuffer.]
expected: FAIL
[WebGL test #44: getError expected: NO_ERROR. Was INVALID_ENUM : detach a renderbuffer from a read/draw framebuffer.]
expected: FAIL
[WebGL test #38: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read framebuffer with no attachment.]
expected: FAIL
[WebGL test #41: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.]
expected: FAIL
[WebGL test #31: getError expected: NO_ERROR. Was INVALID_ENUM : detach a texture from read/draw framebuffer.]
expected: FAIL
[WebGL test #18: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferTexImage2D(COLOR_ATTACHMENT1).]
expected: FAIL
[WebGL test #45: getError expected: NO_ERROR. Was INVALID_ENUM : attaching a renderbuffer to a read/draw framebuffer.]
expected: FAIL
[WebGL test #19: getError expected: NO_ERROR. Was INVALID_ENUM : framebufferRenderbuffer(COLOR_ATTACHMENT1).]
expected: FAIL
[WebGL test #28: getError expected: NO_ERROR. Was INVALID_ENUM : attach a texture to read/draw framebuffer binding point.]
[WebGL test #1: getError expected: INVALID_ENUM. Was INVALID_OPERATION : getFramebufferAttachmentParameter(COLOR_ATTACHMENT0) on the default framebuffer.]
expected: FAIL
[WebGL test #33: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
@ -167,12 +11,36 @@
[WebGL test #42: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #51: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on read framebuffer without depth attachment.]
expected: FAIL
[WebGL test #40: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer with no attachment.]
expected: FAIL
[WebGL test #46: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
[WebGL test #54: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_RED_SIZE) on read framebuffer with no attachment.]
expected: FAIL
[WebGL test #20: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) with no attachment.]
expected: FAIL
[WebGL test #53: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_RED_SIZE) on draw framebuffer without color attachment.]
expected: FAIL
[WebGL test #37: gl.getFramebufferAttachmentParameter(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) should be 0 (of type number). Was null (of type object).]
expected: FAIL
[WebGL test #2: getError expected: NO_ERROR. Was INVALID_OPERATION : getFramebufferAttachmentParameter(BACK) on the default framebuffer.]
expected: FAIL
[WebGL test #56: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on draw framebuffer with no attachment.]
expected: FAIL
[WebGL test #15: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) with no attachment.]
expected: FAIL
[WebGL test #29: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer.]
expected: FAIL
@ -188,7 +56,7 @@
[WebGL test #39: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on draw framebuffer.]
expected: FAIL
[WebGL test #56: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) on draw framebuffer with no attachment.]
[WebGL test #9: getError expected: NO_ERROR. Was INVALID_ENUM : getFramebufferAttachmentParameter(READ_FRAMEBUFFER).]
expected: FAIL
[WebGL test #30: getError expected: INVALID_OPERATION. Was INVALID_ENUM : getFramebufferAttachmentParameter(FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) on read/draw framebuffer with no attachment.]