Changeset 271444 in webkit
- Timestamp:
- Jan 13, 2021 10:56:35 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271442 r271444 1 2021-01-13 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] fbostatequery, negativebufferapi, negativevertexarrayapi, shaderstatequery conformance failures 4 https://bugs.webkit.org/show_bug.cgi?id=220372 5 6 Reviewed by Darin Adler. 7 8 Rebaseline tests which are either now passing or which have 9 progressed. 10 11 * webgl/2.0.0/conformance/programs/program-test-expected.txt: 12 * webgl/2.0.0/conformance2/state/gl-object-get-calls-expected.txt: 13 * webgl/2.0.0/deqp/functional/gles3/fbostatequery-expected.txt: 14 * webgl/2.0.0/deqp/functional/gles3/negativebufferapi-expected.txt: 15 * webgl/2.0.0/deqp/functional/gles3/negativevertexarrayapi-expected.txt: 16 * webgl/2.0.0/deqp/functional/gles3/shaderstatequery-expected.txt: 17 1 18 2021-01-13 Rini Patel <rini_patel@apple.com> 2 19 -
trunk/LayoutTests/webgl/2.0.0/conformance/programs/program-test-expected.txt
r265534 r271444 2 2 3 3 Test: ../../resources/webgl_test_files/conformance/programs/program-test.html 4 5 [ 1: PASS ] context exists 6 [ 2: PASS ] good vertex shader should compile 7 [ 3: PASS ] getError was expected value: NO_ERROR : should be no errors at this point 8 [ 4: PASS ] invalid call to getShaderParameter should return null 9 [ 5: PASS ] getError was expected value: INVALID_ENUM : INFO_LOG_LENGTH is not a valid argument to getShaderParameter in WebGL 10 [ 6: PASS ] invalid call to getShaderParameter should return null 11 [ 7: PASS ] getError was expected value: INVALID_ENUM : SHADER_SOURCE_LENGTH is not a valid argument to getShaderParameter in WebGL 12 [ 8: PASS ] good vertex shader #2 should compile 13 [ 9: PASS ] good fragment shader should compile 14 [ 10: PASS ] good fragment shader #2 should compile 15 [ 11: PASS ] getError was expected value: NO_ERROR : should be no errors at this point 16 [ 12: PASS ] getError was expected value: NO_ERROR : attaching a vertex shader should succeed 17 [ 13: PASS ] getError was expected value: INVALID_OPERATION : attaching an already attached vertex shader should generate INVALID_OPERATION 18 [ 14: PASS ] getError was expected value: NO_ERROR : attaching a fragment shader should succeed 19 [ 15: PASS ] getError was expected value: INVALID_OPERATION : attaching an already attached fragment shader should generate INVALID_OPERATION 20 [ 16: PASS ] getError was expected value: INVALID_OPERATION : attaching shaders of the same type to a program should generate INVALID_OPERATION 21 [ 17: PASS ] getError was expected value: INVALID_OPERATION : attaching shaders of the same type to a program should generate INVALID_OPERATION 22 [ 18: PASS ] getError was expected value: NO_ERROR : detaching a vertex shader should succeed 23 [ 19: PASS ] getError was expected value: INVALID_OPERATION : detaching a not already attached vertex shader should generate INVALID_OPERATION 24 [ 20: PASS ] getError was expected value: NO_ERROR : detaching a fragment shader should succeed 25 [ 21: PASS ] getError was expected value: INVALID_OPERATION : detaching a not already attached fragment shader should generate INVALID_OPERATION 26 [ 22: PASS ] getAttachedShaders should return an empty list by default 27 [ 23: PASS ] attaching a single shader should give the expected list 28 [ 24: PASS ] attaching some shaders should give the expected list 29 [ 25: PASS ] attaching a shader and detaching it should leave an empty list 30 [ 26: PASS ] attaching some shaders and detaching them in same order should leave an empty list 31 [ 27: PASS ] attaching some shaders and detaching them in random order should leave an empty list 32 [ 28: PASS ] attaching and detaching some shaders should leave the difference list 33 [ 29: PASS ] attaching and detaching some shaders should leave the difference list 34 [ 30: PASS ] attaching a shader that failed to compile should still show it in the list 35 [ 31: PASS ] attaching shaders, including one that failed to compile, should still show the it in the list 36 [ 32: PASS ] valid program should link 37 [ 33: PASS ] invalid call to getProgramParameter should return null 38 [ 34: PASS ] getError was expected value: INVALID_ENUM : INFO_LOG_LENGTH is not a valid argument to getProgramParameter in WebGL 39 [ 35: PASS ] invalid call to getProgramParameter should return null 40 [ 36: PASS ] getError was expected value: INVALID_ENUM : ACTIVE_ATTRIBUTE_MAX_LENGTH is not a valid argument to getProgramParameter in WebGL 41 [ 37: PASS ] invalid call to getProgramParameter should return null 42 [ 38: PASS ] getError was expected value: INVALID_ENUM : ACTIVE_UNIFORM_MAX_LENGTH is not a valid argument to getProgramParameter in WebGL 43 [ 39: PASS ] getError was expected value: NO_ERROR : using a valid program should succeed 44 [ 40: PASS ] valid program #2 should link 45 [ 41: PASS ] getError was expected value: NO_ERROR : using a valid program should succeed 46 [ 42: PASS ] program with no fragment shader should fail to link 47 [ 43: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 48 [ 44: PASS ] program with no vertex shader should fail to link 49 [ 45: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 50 [ 46: PASS ] program with bad vertex shader should fail to link 51 [ 47: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 52 [ 48: PASS ] program with bad fragment shader should fail to link 53 [ 49: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 54 [ 50: PASS ] program with bad shaders should fail to link 55 [ 51: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 56 [ 52: PASS ] getError was expected value: NO_ERROR : using a valid program shouldn't generate a GL error 57 [ 53: PASS ] getError was expected value: NO_ERROR : should be no errors at this point #2 58 [ 54: PASS ] getError was expected value: INVALID_OPERATION : drawing with a null program should generate INVALID_OPERATION 59 [ 55: PASS ] getError was expected value: NO_ERROR : drawing with a valid program shouldn't generate a GL error 60 [ 56: PASS ] getError was expected value: INVALID_OPERATION : using an invalid program should generate INVALID_OPERATION 61 [ 57: PASS ] getError was expected value: NO_ERROR : Try to use an invalid program should not change the current rendering state 62 [ 58: PASS ] getError was expected value: NO_ERROR : drawing with a valid program shouldn't generate a GL error 63 [ 59: PASS ] linking should fail with in-use formerly good program, with new bad shader attached 64 [ 60: PASS ] getError was expected value: NO_ERROR : drawing with a valid program shouldn't generate a GL error 65 [ 61: PASS ] getError was expected value: NO_ERROR : drawing with a valid when last used program shouldn't generate a GL error 66 [ 62: PASS ] delete shaders after attaching them and before linking program should not affect linkProgram 67 [ 63: PASS ] getError was expected value: NO_ERROR : using a valid program should succeed 68 [ 64: PASS ] getError was expected value: NO_ERROR : drawing with a valid when last used program shouldn't generate a GL error 69 [ 65: PASS ] getError was expected value: NO_ERROR : delete the current program shouldn't change the current rendering state 70 [ 66: PASS ] getError was expected value: NO_ERROR : The current program shouldn't be deleted 71 [ 67: PASS ] good fragment shader should compile 72 [ 68: PASS ] getError was expected value: INVALID_VALUE : an unattached shader should be deleted immediately 73 [ 69: PASS ] good fragment shader should compile 74 [ 70: FAIL ] an attached shader shouldn't be deleted 75 [ 71: FAIL ] getError expected: INVALID_VALUE. Was INVALID_OPERATION : a delete-marked program should be deleted once it's no longer the current program 76 [ 72: PASS ] getError was expected value: INVALID_VALUE : a delete-marked shader should be deleted once all its attachments are removed 77 [ 73: PASS ] should be red 78 [ 74: PASS ] should be green 79 [ 75: PASS ] should be red 80 [ 76: PASS ] should be tranparent black 81 [ 77: PASS ] getError was expected value: NO_ERROR : should be no errors 82 [ 78: PASS ] successfullyParsed is true 83 [ FAIL ] 2 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/conformance2/state/gl-object-get-calls-expected.txt
r265841 r271444 43 43 [ 39: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 44 44 [ 40: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 45 [ 41: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) should be 0 (of type number). Was null (of type object).45 [ 41: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) is 0 46 46 [ 42: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.TEXTURE 47 47 [ 43: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is anotherTexture … … 54 54 [ 50: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 55 55 [ 51: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 56 [ 52: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) should be 0 (of type number). Was null (of type object).56 [ 52: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) is 0 57 57 [ 53: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 58 58 [ 54: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 59 59 [ 55: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 60 60 [ 56: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 61 [ 57: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 36161. Was 0.62 [ 58: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer]. Was null.61 [ 57: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 62 [ 58: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 63 63 [ 59: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) is non-zero. 64 64 [ 60: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE) is non-zero. … … 67 67 [ 63: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 68 68 [ 64: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 69 [ 65: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM: after evaluating: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE)69 [ 65: PASS ] getError was expected value: INVALID_OPERATION : after evaluating: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) 70 70 [ 66: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 71 [ 67: FAIL ] getFramebufferAttachmentParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR71 [ 67: PASS ] getFramebufferAttachmentParameter correctly handled invalid parameter enums 72 72 [ 68: PASS ] getFramebufferAttachmentParameter correctly handled invalid target enums 73 73 [ 69: PASS ] getFramebufferAttachmentParameter correctly handled invalid attachment enums 74 74 [ 70: PASS ] gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE 75 [ 71: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 33304. Was 5890.76 [ 72: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 33304. Was 0.77 [ 73: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 33304. Was 0.75 [ 71: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.FRAMEBUFFER_DEFAULT 76 [ 72: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.FRAMEBUFFER_DEFAULT 77 [ 73: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.FRAMEBUFFER_DEFAULT 78 78 [ 74: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_RED_SIZE) is non-zero. 79 79 [ 75: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_GREEN_SIZE) is non-zero. … … 106 106 [ 102: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 107 107 [ 103: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 108 [ 104: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) should be 0 (of type number). Was null (of type object).108 [ 104: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 0, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) is 0 109 109 [ 105: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.TEXTURE 110 110 [ 106: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is anotherTexture … … 117 117 [ 113: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 118 118 [ 114: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 119 [ 115: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) should be 0 (of type number). Was null (of type object).119 [ 115: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0 + 7, gl.FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER) is 0 120 120 [ 116: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 121 121 [ 117: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 122 122 [ 118: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 123 123 [ 119: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 124 [ 120: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 36161. Was 0.125 [ 121: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) should be [object WebGLRenderbuffer]. Was null.124 [ 120: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.RENDERBUFFER 125 [ 121: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME) is renderbuffer 126 126 [ 122: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) is non-zero. 127 127 [ 123: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE) is non-zero. … … 130 130 [ 126: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) is non-zero. 131 131 [ 127: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 132 [ 128: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_ENUM: after evaluating: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE)132 [ 128: PASS ] getError was expected value: INVALID_OPERATION : after evaluating: gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE) 133 133 [ 129: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING) is non-zero. 134 [ 130: FAIL ] getFramebufferAttachmentParameter did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR134 [ 130: PASS ] getFramebufferAttachmentParameter correctly handled invalid parameter enums 135 135 [ 131: PASS ] getFramebufferAttachmentParameter correctly handled invalid target enums 136 136 [ 132: PASS ] getFramebufferAttachmentParameter correctly handled invalid attachment enums 137 137 [ 133: PASS ] gl.checkFramebufferStatus(gl.FRAMEBUFFER) is gl.FRAMEBUFFER_COMPLETE 138 [ 134: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 33304. Was 5890.139 [ 135: FAIL ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) should be 33304. Was 0.138 [ 134: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.FRAMEBUFFER_DEFAULT 139 [ 135: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.FRAMEBUFFER_DEFAULT 140 140 [ 136: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.STENCIL, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.NONE 141 141 [ 137: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.BACK, gl.FRAMEBUFFER_ATTACHMENT_RED_SIZE) is non-zero. … … 271 271 [ 267: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_NORMALIZED) is false 272 272 [ 268: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_DIVISOR) is 0 273 [ 269: FAIL ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be false (of type boolean). Was null (of type object).273 [ 269: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) is false 274 274 [ 270: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_DIVISOR) is 2 275 275 [ 271: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_STRIDE) is 36 … … 277 277 [ 273: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_ENABLED) is false 278 278 [ 274: PASS ] gl.getVertexAttrib(1, gl.CURRENT_VERTEX_ATTRIB) is [5, 6, 7, 8] 279 [ 275: FAIL ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_TYPE) should be 5124. Was 5126.280 [ 276: FAIL ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be true (of type boolean). Was null (of type object).281 [ 277: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM:279 [ 275: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_TYPE) is gl.INT 280 [ 276: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) is true 281 [ 277: PASS ] getError was expected value: NO_ERROR : 282 282 [ 278: PASS ] getVertexAttrib correctly handled invalid parameter enums 283 283 [ 279: PASS ] getError was expected value: INVALID_VALUE : after evaluating: gl.getVertexAttrib(16, gl.CURRENT_VERTEX_ATTRIB) … … 366 366 [ 362: PASS ] getError was expected value: NO_ERROR : 367 367 [ 363: PASS ] successfullyParsed is true 368 [ FAIL ] 35failures reported368 [ FAIL ] 14 failures reported -
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/fbostatequery-expected.txt
r265534 r271444 2 2 3 3 Test: ../../../resources/webgl_test_files/deqp/functional/gles3/fbostatequery.html 4 5 [ 1: FAIL ] fbo.draw_framebuffer_default_framebuffer: 6 [ 2: FAIL ] fbo.read_framebuffer_default_framebuffer: 7 [ 3: PASS ] fbo.framebuffer_attachment_object: Passed 8 [ 4: PASS ] fbo.framebuffer_attachment_texture_level: Passed 9 [ 5: PASS ] fbo.framebuffer_attachment_texture_cube_map_face: Passed 10 [ 6: FAIL ] fbo.framebuffer_attachment_texture_layer: 11 [ 7: PASS ] fbo.framebuffer_attachment_color_encoding: Passed 12 [ 8: PASS ] fbo.framebuffer_attachment_component_type: Passed 13 [ 9: PASS ] fbo.framebuffer_attachment_x_size_initial: Passed 14 [ 10: PASS ] fbo.framebuffer_attachment_x_size_rbo: Passed 15 [ 11: PASS ] fbo.framebuffer_attachment_x_size_texture: Passed 16 [ 12: PASS ] fbo.framebuffer_unspecified_attachment_color_encoding: Passed 17 [ 13: PASS ] fbo.framebuffer_unspecified_attachment_component_type: Passed 18 [ 14: PASS ] fbo.framebuffer_unspecified_attachment_x_size_rbo: Passed 19 [ 15: PASS ] fbo.framebuffer_unspecified_attachment_x_size_texture: Passed 20 [ 16: PASS ] fbo.framebuffer_unspecified_attachment_x_size_texture: successfullyParsed is true 21 [ FAIL ] 3 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/negativebufferapi-expected.txt
r265534 r271444 2 2 3 3 Test: ../../../resources/webgl_test_files/deqp/functional/gles3/negativebufferapi.html 4 5 [ 1: PASS ] negativeBufferApi.bind_buffer: Passed 6 [ 2: PASS ] negativeBufferApi.buffer_data: Passed 7 [ 3: PASS ] negativeBufferApi.buffer_sub_data: Passed 8 [ 4: PASS ] negativeBufferApi.buffer_sub_data_size_offset: Passed 9 [ 5: PASS ] negativeBufferApi.clear: Passed 10 [ 6: PASS ] negativeBufferApi.read_pixels: Passed 11 [ 7: PASS ] negativeBufferApi.read_pixels_format_mismatch: Passed 12 [ 8: PASS ] negativeBufferApi.read_pixels_fbo_format_mismatch: Passed 13 [ 9: PASS ] negativeBufferApi.bind_buffer_range: Passed 14 [ 10: PASS ] negativeBufferApi.bind_buffer_base: Passed 15 [ 11: PASS ] negativeBufferApi.clear_bufferiv: Passed 16 [ 12: PASS ] negativeBufferApi.clear_bufferuiv: Passed 17 [ 13: PASS ] negativeBufferApi.clear_bufferfv: Passed 18 [ 14: PASS ] negativeBufferApi.clear_bufferfi: Passed 19 [ 15: FAIL ] negativeBufferApi.copy_buffer_sub_data: Expected gl.INVALID_OPERATION, but got gl.INVALID_VALUE. 20 [ 16: FAIL ] negativeBufferApi.draw_buffers: Expected gl.NO_ERROR, but got gl.INVALID_OPERATION. 21 [ 17: PASS ] negativeBufferApi.bind_framebuffer: Passed 22 [ 18: PASS ] negativeBufferApi.bind_renderbuffer: Passed 23 [ 19: PASS ] negativeBufferApi.check_framebuffer_status: Passed 24 [ 20: PASS ] negativeBufferApi.framebuffer_renderbuffer: Passed 25 [ 21: PASS ] negativeBufferApi.framebuffer_texture2d: Passed 26 [ 22: FAIL ] negativeBufferApi.renderbuffer_storage: Expected gl.INVALID_VALUE, but got gl.NO_ERROR. 27 [ 23: PASS ] negativeBufferApi.blit_framebuffer: Passed 28 [ 24: PASS ] negativeBufferApi.blit_framebuffer_multisample: Passed 29 [ 25: PASS ] negativeBufferApi.framebuffer_texture_layer: Passed 30 [ 26: PASS ] negativeBufferApi.invalidate_framebuffer: Passed 31 [ 27: PASS ] negativeBufferApi.invalidate_sub_framebuffer: Passed 32 [ 28: FAIL ] negativeBufferApi.renderbuffer_storage_multisample: Expected gl.INVALID_VALUE, but got gl.NO_ERROR. 33 [ 29: PASS ] successfullyParsed is true 34 [ FAIL ] 4 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/negativevertexarrayapi-expected.txt
r265534 r271444 2 2 3 3 Test: ../../../resources/webgl_test_files/deqp/functional/gles3/negativevertexarrayapi.html 4 5 [ 1: PASS ] vertex_array.vertex_attribf: Passed 6 [ 2: PASS ] vertex_array.vertex_attribfv: Passed 7 [ 3: PASS ] vertex_array.vertex_attribi4: Passed 8 [ 4: PASS ] vertex_array.vertex_attribi4v: Passed 9 [ 5: PASS ] vertex_array.vertex_attrib_pointer: Passed 10 [ 6: PASS ] vertex_array.vertex_attrib_i_pointer: Passed 11 [ 7: PASS ] vertex_array.enable_vertex_attrib_array: Passed 12 [ 8: PASS ] vertex_array.disable_vertex_attrib_array: Passed 13 [ 9: PASS ] vertex_array.vertex_attrib_divisor: Passed 14 [ 10: PASS ] vertex_array.draw_arrays: Passed 15 [ 11: PASS ] vertex_array.draw_arrays_invalid_program: Passed 16 [ 12: PASS ] vertex_array.draw_arrays_incomplete_primitive: Passed 17 [ 13: PASS ] vertex_array.draw_elements: Passed 18 [ 14: PASS ] vertex_array.draw_elements_invalid_program: Passed 19 [ 15: PASS ] vertex_array.draw_elements_incomplete_primitive: Passed 20 [ 16: PASS ] vertex_array.draw_arrays_instanced: Passed 21 [ 17: PASS ] vertex_array.draw_arrays_instanced_invalid_program: Passed 22 [ 18: PASS ] vertex_array.draw_arrays_instanced_incomplete_primitive: Passed 23 [ 19: FAIL ] vertex_array.draw_elements_instanced: Expected gl.INVALID_VALUE, but got gl.NO_ERROR. 24 [ 20: PASS ] vertex_array.draw_elements_instanced_invalid_program: Passed 25 [ 21: FAIL ] vertex_array.draw_elements_instanced_incomplete_primitive: Expected gl.INVALID_VALUE, but got gl.NO_ERROR. 26 [ 22: PASS ] vertex_array.draw_range_elements: Passed 27 [ 23: PASS ] vertex_array.draw_range_elements_invalid_program: Passed 28 [ 24: PASS ] vertex_array.draw_range_elements_incomplete_primitive: Passed 29 [ 25: PASS ] vertex_array.draw_range_elements_incomplete_primitive: successfullyParsed is true 30 [ FAIL ] 2 failures reported 4 [ PASS ] All tests passed -
trunk/LayoutTests/webgl/2.0.0/deqp/functional/gles3/shaderstatequery-expected.txt
r265534 r271444 2 2 3 3 Test: ../../../resources/webgl_test_files/deqp/functional/gles3/shaderstatequery.html 4 5 [ 1: PASS ] shader.shader_type: Passed 6 [ 2: PASS ] shader.shader_compile_status: Passed 7 [ 3: PASS ] shader.shader_info_log: Passed 8 [ 4: PASS ] shader.shader_source: Passed 9 [ 5: FAIL ] shader.delete_status: 10 [ 6: PASS ] shader.current_vertex_attrib_initial: Passed 11 [ 7: PASS ] shader.current_vertex_attrib_float: Passed 12 [ 8: PASS ] shader.current_vertex_attrib_int: Passed 13 [ 9: PASS ] shader.current_vertex_attrib_uint: Passed 14 [ 10: PASS ] shader.program_info_log: Passed 15 [ 11: PASS ] shader.program_validate_status: Passed 16 [ 12: PASS ] shader.program_attached_shaders: Passed 17 [ 13: PASS ] shader.program_active_uniform_name: Passed 18 [ 14: PASS ] shader.program_active_uniform_types: Passed 19 [ 15: FAIL ] shader.program_active_uniform_blocks: Expected { 1, 2}; got {1, 2} 20 [ 16: PASS ] shader.transform_feedback: Passed 21 [ 17: PASS ] shader.active_attributes: Passed 22 [ 18: PASS ] shader.vertex_attrib_size: Passed 23 [ 19: FAIL ] shader.vertex_attrib_type: 24 [ 20: FAIL ] shader.vertex_attrib_stride: 25 [ 21: FAIL ] shader.vertex_attrib_normalized: 26 [ 22: FAIL ] shader.vertex_attrib_integer: 27 [ 23: PASS ] shader.vertex_attrib_array_enabled: Passed 28 [ 24: PASS ] shader.vertex_attrib_array_divisor: Passed 29 [ 25: PASS ] shader.vertex_attrib_array_buffer_binding: Passed 30 [ 26: PASS ] shader.vertex_attrib_offset: Passed 31 [ 27: PASS ] shader.uniform_value_float: Passed 32 [ 28: PASS ] shader.uniform_value_int: Passed 33 [ 29: PASS ] shader.uniform_value_uint: Passed 34 [ 30: PASS ] shader.uniform_value_boolean: Passed 35 [ 31: PASS ] shader.uniform_value_sampler: Passed 36 [ 32: PASS ] shader.uniform_value_array: Passed 37 [ 33: PASS ] shader.uniform_value_matrix: Passed 38 [ 34: PASS ] shader.precision_vertex_lowp_float: Passed 39 [ 35: PASS ] shader.precision_vertex_mediump_float: Passed 40 [ 36: PASS ] shader.precision_vertex_highp_float: Passed 41 [ 37: PASS ] shader.precision_vertex_lowp_int: Passed 42 [ 38: PASS ] shader.precision_vertex_mediump_int: Passed 43 [ 39: PASS ] shader.precision_vertex_highp_int: Passed 44 [ 40: PASS ] shader.precision_fragment_lowp_float: Passed 45 [ 41: PASS ] shader.precision_fragment_mediump_float: Passed 46 [ 42: PASS ] shader.precision_fragment_highp_float: Passed 47 [ 43: PASS ] shader.precision_fragment_lowp_int: Passed 48 [ 44: PASS ] shader.precision_fragment_mediump_int: Passed 49 [ 45: PASS ] shader.precision_fragment_highp_int: Passed 50 [ 46: PASS ] shader.precision_fragment_highp_int: successfullyParsed is true 51 [ FAIL ] 6 failures reported 4 [ PASS ] All tests passed -
trunk/Source/ThirdParty/ANGLE/ChangeLog
r271334 r271444 1 2021-01-13 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] fbostatequery, negativebufferapi, negativevertexarrayapi, shaderstatequery conformance failures 4 https://bugs.webkit.org/show_bug.cgi?id=220372 5 6 Reviewed by Darin Adler. 7 8 Add a needed early-out in drawArraysInstanced validation when the 9 primitive count is zero. This patch will be upstreamed to ANGLE 10 afterward. 11 12 * src/libANGLE/validationES.h: 13 (gl::ValidateDrawArraysAttribs): 14 (gl::ValidateDrawArraysCommon): 15 1 16 2021-01-08 Kyle Piddington <kpiddington@apple.com> 2 17 -
trunk/Source/ThirdParty/ANGLE/src/libANGLE/validationES.h
r270351 r271444 792 792 } 793 793 794 ANGLE_INLINE bool ValidateDrawArraysAttribs(const Context *context, GLint first, GLsizei count )794 ANGLE_INLINE bool ValidateDrawArraysAttribs(const Context *context, GLint first, GLsizei count, GLsizei primcount) 795 795 { 796 796 if (!context->isBufferAccessValidationEnabled()) … … 812 812 } 813 813 814 if (primcount == 0) 815 { 816 // Skip the specific validation of the non-instanced vertex element limit. 817 return true; 818 } 819 814 820 return ValidateDrawAttribs(context, maxVertex); 815 821 } … … 871 877 } 872 878 873 return ValidateDrawArraysAttribs(context, first, count );879 return ValidateDrawArraysAttribs(context, first, count, primcount); 874 880 } 875 881 -
trunk/Source/WebCore/ChangeLog
r271441 r271444 1 2021-01-13 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] fbostatequery, negativebufferapi, negativevertexarrayapi, shaderstatequery conformance failures 4 https://bugs.webkit.org/show_bug.cgi?id=220372 5 6 Reviewed by Darin Adler. 7 8 Fix validation of program and shader objects to address 9 conformance test failures. Unify and clean up validation of some 10 other object types. 11 12 Fix bugs in queries of framebuffer attachments and integer vertex 13 attributes. 14 15 Remove an old macOS workaround from GraphicsContextGLANGLE which 16 was causing test failures of maximum renderbuffer sizes. 17 18 Generate tests' expected OpenGL errors for a few APIs. 19 20 Covered by existing WebGL 2.0 conformance tests. 21 22 * html/canvas/WebGL2RenderingContext.cpp: 23 (WebCore::WebGL2RenderingContext::copyBufferSubData): 24 (WebCore::WebGL2RenderingContext::bindFramebuffer): 25 (WebCore::WebGL2RenderingContext::getFragDataLocation): 26 (WebCore::WebGL2RenderingContext::vertexAttribIPointer): 27 (WebCore::WebGL2RenderingContext::drawBuffers): 28 (WebCore::WebGL2RenderingContext::isQuery): 29 (WebCore::WebGL2RenderingContext::beginQuery): 30 (WebCore::WebGL2RenderingContext::getQueryParameter): 31 (WebCore::WebGL2RenderingContext::isSampler): 32 (WebCore::WebGL2RenderingContext::isSync): 33 (WebCore::WebGL2RenderingContext::deleteSync): 34 (WebCore::WebGL2RenderingContext::clientWaitSync): 35 (WebCore::WebGL2RenderingContext::waitSync): 36 (WebCore::WebGL2RenderingContext::getSyncParameter): 37 (WebCore::WebGL2RenderingContext::deleteTransformFeedback): 38 (WebCore::WebGL2RenderingContext::isTransformFeedback): 39 (WebCore::WebGL2RenderingContext::bindTransformFeedback): 40 (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): 41 (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying): 42 (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): 43 (WebCore::WebGL2RenderingContext::getUniformIndices): 44 (WebCore::WebGL2RenderingContext::getActiveUniforms): 45 (WebCore::WebGL2RenderingContext::getUniformBlockIndex): 46 (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter): 47 (WebCore::WebGL2RenderingContext::getActiveUniformBlockName): 48 (WebCore::WebGL2RenderingContext::uniformBlockBinding): 49 (WebCore::WebGL2RenderingContext::deleteVertexArray): 50 (WebCore::WebGL2RenderingContext::isVertexArray): 51 (WebCore::WebGL2RenderingContext::bindVertexArray): 52 (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): 53 * html/canvas/WebGLObject.cpp: 54 (WebCore::WebGLObject::deleteObject): 55 * html/canvas/WebGLObject.h: 56 * html/canvas/WebGLRenderingContextBase.cpp: 57 (WebCore::WebGLRenderingContextBase::attachShader): 58 (WebCore::WebGLRenderingContextBase::bindAttribLocation): 59 (WebCore::WebGLRenderingContextBase::validateNullableWebGLObject): 60 (WebCore::WebGLRenderingContextBase::bindBuffer): 61 (WebCore::WebGLRenderingContextBase::bindFramebuffer): 62 (WebCore::WebGLRenderingContextBase::bindRenderbuffer): 63 (WebCore::WebGLRenderingContextBase::bindTexture): 64 (WebCore::WebGLRenderingContextBase::compileShader): 65 (WebCore::WebGLRenderingContextBase::detachShader): 66 (WebCore::WebGLRenderingContextBase::validateWebGLObject): 67 (WebCore::WebGLRenderingContextBase::validateWebGLProgramOrShader): 68 (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer): 69 (WebCore::WebGLRenderingContextBase::framebufferTexture2D): 70 (WebCore::WebGLRenderingContextBase::getActiveAttrib): 71 (WebCore::WebGLRenderingContextBase::getActiveUniform): 72 (WebCore::WebGLRenderingContextBase::getAttachedShaders): 73 (WebCore::WebGLRenderingContextBase::getAttribLocation): 74 (WebCore::WebGLRenderingContextBase::getProgramInfoLog): 75 (WebCore::WebGLRenderingContextBase::getShaderInfoLog): 76 (WebCore::WebGLRenderingContextBase::getShaderSource): 77 (WebCore::WebGLRenderingContextBase::getUniform): 78 (WebCore::WebGLRenderingContextBase::getUniformLocation): 79 (WebCore::WebGLRenderingContextBase::getVertexAttrib): 80 (WebCore::WebGLRenderingContextBase::isBuffer): 81 (WebCore::WebGLRenderingContextBase::isFramebuffer): 82 (WebCore::WebGLRenderingContextBase::isProgram): 83 (WebCore::WebGLRenderingContextBase::isRenderbuffer): 84 (WebCore::WebGLRenderingContextBase::isShader): 85 (WebCore::WebGLRenderingContextBase::isTexture): 86 (WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations): 87 (WebCore::WebGLRenderingContextBase::shaderSource): 88 (WebCore::WebGLRenderingContextBase::useProgram): 89 (WebCore::WebGLRenderingContextBase::validateProgram): 90 (WebCore::WebGLRenderingContextBase::vertexAttribPointer): 91 (WebCore::WebGLRenderingContextBase::drawArraysInstanced): 92 (WebCore::WebGLRenderingContextBase::drawElementsInstanced): 93 (WebCore::WebGLRenderingContextBase::checkObjectToBeBound): Deleted. 94 * html/canvas/WebGLRenderingContextBase.h: 95 * html/canvas/WebGLVertexArrayObjectBase.cpp: 96 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): 97 * html/canvas/WebGLVertexArrayObjectBase.h: 98 * platform/graphics/angle/GraphicsContextGLANGLE.cpp: 99 (WebCore::GraphicsContextGLOpenGL::getIntegerv): 100 1 101 2021-01-13 Rob Buis <rbuis@igalia.com> 2 102 -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
r270400 r271444 582 582 RefPtr<WebGLBuffer> writeBuffer = validateBufferDataParameters("copyBufferSubData", writeTarget, GraphicsContextGL::STATIC_DRAW); 583 583 if (!readBuffer || !writeBuffer) { 584 synthesizeGLError(GraphicsContextGL::INVALID_ VALUE, "copyBufferSubData", "Invalid readTarget or writeTarget");584 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "copyBufferSubData", "Invalid readTarget or writeTarget"); 585 585 return; 586 586 } … … 690 690 auto locker = holdLock(objectGraphLock()); 691 691 692 if (! checkObjectToBeBound("bindFramebuffer", buffer))692 if (!validateNullableWebGLObject("bindFramebuffer", buffer)) 693 693 return; 694 694 … … 1494 1494 GCGLint WebGL2RenderingContext::getFragDataLocation(WebGLProgram& program, const String& name) 1495 1495 { 1496 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getFragDataLocation", &program))1496 if (!validateWebGLProgramOrShader("getFragDataLocation", &program)) 1497 1497 return -1; 1498 1498 return m_context->getFragDataLocation(program.object(), name); … … 1705 1705 void WebGL2RenderingContext::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLint64 offset) 1706 1706 { 1707 if (isContextLostOrPending()) 1708 return; 1709 1707 auto locker = holdLock(objectGraphLock()); 1708 1709 if (isContextLostOrPending()) 1710 return; 1711 1712 switch (type) { 1713 case GraphicsContextGL::BYTE: 1714 case GraphicsContextGL::UNSIGNED_BYTE: 1715 case GraphicsContextGL::SHORT: 1716 case GraphicsContextGL::UNSIGNED_SHORT: 1717 case GraphicsContextGL::FLOAT: 1718 case GraphicsContextGL::INT: 1719 case GraphicsContextGL::UNSIGNED_INT: 1720 break; 1721 default: 1722 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "vertexAttribIPointer", "invalid type"); 1723 return; 1724 } 1725 if (index >= m_maxVertexAttribs) { 1726 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribIPointer", "index out of range"); 1727 return; 1728 } 1729 if (size < 1 || size > 4) { 1730 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribIPointer", "bad size"); 1731 return; 1732 } 1733 if (stride < 0 || stride > 255) { 1734 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribIPointer", "bad stride"); 1735 return; 1736 } 1737 if (offset < 0 || offset > std::numeric_limits<int32_t>::max()) { 1738 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribIPointer", "bad offset"); 1739 return; 1740 } 1741 if (!m_boundArrayBuffer && offset) { 1742 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "vertexAttribIPointer", "no bound ARRAY_BUFFER"); 1743 return; 1744 } 1745 // Determine the number of elements the bound buffer can hold, given the offset, size, type and stride. 1746 auto typeSize = sizeInBytes(type); 1747 if (!typeSize) { 1748 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "vertexAttribIPointer", "invalid type"); 1749 return; 1750 } 1751 if ((stride % typeSize) || (static_cast<GCGLintptr>(offset) % typeSize)) { 1752 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "vertexAttribIPointer", "stride or offset not valid for type"); 1753 return; 1754 } 1755 GCGLsizei bytesPerElement = size * typeSize; 1756 1757 m_boundVertexArrayObject->setVertexAttribState(locker, index, bytesPerElement, size, type, false, stride, static_cast<GCGLintptr>(offset), true, m_boundArrayBuffer.get()); 1710 1758 m_context->vertexAttribIPointer(index, size, type, stride, offset); 1711 1759 } … … 1749 1797 GCGLsizei n = buffers.size(); 1750 1798 const GCGLenum* bufs = buffers.data(); 1799 for (GCGLsizei i = 0; i < n; ++i) { 1800 switch (bufs[i]) { 1801 case GraphicsContextGL::NONE: 1802 case GraphicsContextGL::BACK: 1803 case GraphicsContextGL::COLOR_ATTACHMENT0: 1804 continue; 1805 default: 1806 if (bufs[i] > GraphicsContextGL::COLOR_ATTACHMENT0 1807 && bufs[i] < GraphicsContextGL::COLOR_ATTACHMENT0 + getMaxColorAttachments()) { 1808 continue; 1809 } 1810 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "drawBuffers", "invalid buffer"); 1811 return; 1812 } 1813 } 1751 1814 if (!m_framebufferBinding) { 1752 1815 if (n != 1) { 1753 synthesizeGLError(GraphicsContextGL::INVALID_ VALUE, "drawBuffers", "more than one buffer");1816 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "drawBuffers", "more than one buffer"); 1754 1817 return; 1755 1818 } … … 1854 1917 GCGLboolean WebGL2RenderingContext::isQuery(WebGLQuery* query) 1855 1918 { 1856 if (isContextLostOrPending() || !query || !query-> object() || !validateWebGLObject("isQuery", query))1919 if (isContextLostOrPending() || !query || !query->validate(contextGroup(), *this)) 1857 1920 return false; 1921 1922 if (query->isDeleted()) 1923 return false; 1924 1858 1925 return m_context->isQuery(query->object()); 1859 1926 } … … 1875 1942 1876 1943 GCGLenum targetKey; 1877 if ( isContextLostOrPending() ||!validateWebGLObject("beginQuery", &query) || !validateQueryTarget("beginQuery", target, &targetKey))1944 if (!validateWebGLObject("beginQuery", &query) || !validateQueryTarget("beginQuery", target, &targetKey)) 1878 1945 return; 1879 1946 … … 1936 2003 WebGLAny WebGL2RenderingContext::getQueryParameter(WebGLQuery& query, GCGLenum pname) 1937 2004 { 1938 if ( isContextLostOrPending() ||!validateWebGLObject("getQueryParameter", &query))2005 if (!validateWebGLObject("getQueryParameter", &query)) 1939 2006 return nullptr; 1940 2007 … … 1986 2053 GCGLboolean WebGL2RenderingContext::isSampler(WebGLSampler* sampler) 1987 2054 { 1988 if (isContextLostOrPending() || !sampler || sampler->isDeleted() || !validateWebGLObject("isSampler", sampler))2055 if (isContextLostOrPending() || !sampler || !sampler->validate(contextGroup(), *this) || sampler->isDeleted()) 1989 2056 return false; 1990 2057 … … 2075 2142 GCGLboolean WebGL2RenderingContext::isSync(WebGLSync* sync) 2076 2143 { 2077 return !isContextLostOrPending() && sync && !sync->isDeleted() && validateWebGLObject("isSync", sync); 2144 if (isContextLostOrPending() || !sync || !sync->validate(contextGroup(), *this)) 2145 return false; 2146 2147 if (sync->isDeleted()) 2148 return false; 2149 2150 return !!sync->object(); 2078 2151 } 2079 2152 … … 2082 2155 auto locker = holdLock(objectGraphLock()); 2083 2156 2084 if (isContextLostOrPending() || !sync || sync->isDeleted() || !validateWebGLObject("deleteSync", sync))2085 return;2086 2157 deleteObject(locker, sync); 2087 2158 } … … 2089 2160 GCGLenum WebGL2RenderingContext::clientWaitSync(WebGLSync& sync, GCGLbitfield flags, GCGLuint64 timeout) 2090 2161 { 2091 if ( isContextLostOrPending() ||!validateWebGLObject("clientWaitSync", &sync))2162 if (!validateWebGLObject("clientWaitSync", &sync)) 2092 2163 return GraphicsContextGL::WAIT_FAILED_WEBGL; 2093 2164 … … 2112 2183 void WebGL2RenderingContext::waitSync(WebGLSync& sync, GCGLbitfield flags, GCGLint64 timeout) 2113 2184 { 2114 if ( isContextLostOrPending() ||!validateWebGLObject("waitSync", &sync))2185 if (!validateWebGLObject("waitSync", &sync)) 2115 2186 return; 2116 2187 … … 2125 2196 WebGLAny WebGL2RenderingContext::getSyncParameter(WebGLSync& sync, GCGLenum pname) 2126 2197 { 2127 if ( isContextLostOrPending() ||!validateWebGLObject("getSyncParameter", &sync))2198 if (!validateWebGLObject("getSyncParameter", &sync)) 2128 2199 return nullptr; 2129 2200 … … 2155 2226 auto locker = holdLock(objectGraphLock()); 2156 2227 2157 if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("deleteTransformFeedback", feedbackObject)) 2158 return; 2159 2228 // We have to short-circuit the deletion process if the transform feedback is 2229 // active. This requires duplication of some validation logic. 2230 if (isContextLostOrPending() && feedbackObject && feedbackObject->validate(contextGroup(), *this)) { 2231 if (feedbackObject->isActive()) { 2232 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "deleteTransformFeedback", "attempt to delete an active transform feedback object"); 2233 return; 2234 } 2235 } 2236 2160 2237 ASSERT(feedbackObject != m_defaultTransformFeedback); 2161 2162 if (feedbackObject->isActive()) { 2163 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "deleteTransformFeedback", "attempt to delete an active transform feedback object"); 2164 return; 2165 } 2238 2239 if (!deleteObject(locker, feedbackObject)) 2240 return; 2166 2241 2167 2242 if (m_boundTransformFeedback == feedbackObject) 2168 2243 m_boundTransformFeedback = m_defaultTransformFeedback; 2169 2170 deleteObject(locker, feedbackObject);2171 2244 } 2172 2245 2173 2246 GCGLboolean WebGL2RenderingContext::isTransformFeedback(WebGLTransformFeedback* feedbackObject) 2174 2247 { 2175 if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("isTransformFeedback", feedbackObject))2248 if (isContextLostOrPending() || !feedbackObject || !feedbackObject->validate(contextGroup(), *this)) 2176 2249 return false; 2177 2250 2251 if (!feedbackObject->hasEverBeenBound()) 2252 return false; 2253 if (feedbackObject->isDeleted()) 2254 return false; 2255 2178 2256 return m_context->isTransformFeedback(feedbackObject->object()); 2179 2257 } … … 2183 2261 auto locker = holdLock(objectGraphLock()); 2184 2262 2185 if (isContextLostOrPending()) 2186 return; 2187 2188 if (feedbackObject) { 2189 if (feedbackObject->isDeleted()) { 2190 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bindTransformFeedback", "cannot bind a deleted Transform Feedback object"); 2191 return; 2192 } 2193 2194 if (!validateWebGLObject("bindTransformFeedback", feedbackObject)) 2195 return; 2196 } 2263 if (!validateNullableWebGLObject("bindTransformFeedback", feedbackObject)) 2264 return; 2197 2265 2198 2266 if (target != GraphicsContextGL::TRANSFORM_FEEDBACK) { … … 2206 2274 2207 2275 auto toBeBound = feedbackObject ? feedbackObject : m_defaultTransformFeedback.get(); 2276 toBeBound->setHasEverBeenBound(); 2208 2277 m_context->bindTransformFeedback(target, toBeBound->object()); 2209 2278 m_boundTransformFeedback = toBeBound; … … 2275 2344 void WebGL2RenderingContext::transformFeedbackVaryings(WebGLProgram& program, const Vector<String>& varyings, GCGLenum bufferMode) 2276 2345 { 2277 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("transformFeedbackVaryings", &program))2346 if (!validateWebGLProgramOrShader("transformFeedbackVaryings", &program)) 2278 2347 return; 2279 2348 … … 2298 2367 RefPtr<WebGLActiveInfo> WebGL2RenderingContext::getTransformFeedbackVarying(WebGLProgram& program, GCGLuint index) 2299 2368 { 2300 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getTransformFeedbackVarying", &program))2369 if (!validateWebGLProgramOrShader("getTransformFeedbackVarying", &program)) 2301 2370 return nullptr; 2302 2371 … … 2351 2420 auto locker = holdLock(objectGraphLock()); 2352 2421 2353 if (isContextLostOrPending()) 2354 return false; 2355 2356 if (!checkObjectToBeBound(functionName, buffer)) 2422 if (!validateNullableWebGLObject(functionName, buffer)) 2357 2423 return false; 2358 2424 … … 2446 2512 Optional<Vector<GCGLuint>> WebGL2RenderingContext::getUniformIndices(WebGLProgram& program, const Vector<String>& names) 2447 2513 { 2448 #if USE(ANGLE) 2449 if (isContextLostOrPending() || !validateWebGLProgramOrShader("getUniformIndices", &program)) 2514 if (!validateWebGLProgramOrShader("getUniformIndices", &program)) 2450 2515 return WTF::nullopt; 2451 2516 return m_context->getUniformIndices(program.object(), names); 2452 #else2453 LOG(WebGL, "[[ NOT IMPLEMENTED ]] getUniformIndices()");2454 UNUSED_PARAM(program);2455 UNUSED_PARAM(names);2456 return WTF::nullopt;2457 #endif2458 2517 } 2459 2518 2460 2519 WebGLAny WebGL2RenderingContext::getActiveUniforms(WebGLProgram& program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) 2461 2520 { 2462 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getActiveUniforms", &program))2521 if (!validateWebGLProgramOrShader("getActiveUniforms", &program)) 2463 2522 return nullptr; 2464 2523 … … 2489 2548 GCGLuint WebGL2RenderingContext::getUniformBlockIndex(WebGLProgram& program, const String& uniformBlockName) 2490 2549 { 2491 #if USE(ANGLE) 2492 if (isContextLostOrPending() || !validateWebGLProgramOrShader("getUniformBlockIndex", &program)) 2550 if (!validateWebGLProgramOrShader("getUniformBlockIndex", &program)) 2493 2551 return 0; 2494 2552 return m_context->getUniformBlockIndex(program.object(), uniformBlockName); 2495 #else2496 UNUSED_PARAM(program);2497 UNUSED_PARAM(uniformBlockName);2498 LOG(WebGL, "[[ NOT IMPLEMENTED ]] getUniformBlockIndex()");2499 return 0;2500 #endif2501 2553 } 2502 2554 2503 2555 WebGLAny WebGL2RenderingContext::getActiveUniformBlockParameter(WebGLProgram& program, GCGLuint uniformBlockIndex, GCGLenum pname) 2504 2556 { 2505 #if USE(ANGLE) 2506 if (isContextLostOrPending() || !validateWebGLProgramOrShader("getActiveUniformBlockParameter", &program)) 2557 if (!validateWebGLProgramOrShader("getActiveUniformBlockParameter", &program)) 2507 2558 return nullptr; 2508 2559 switch (pname) { … … 2515 2566 Vector<GCGLint> params(size, 0); 2516 2567 m_context->getActiveUniformBlockiv(program.object(), uniformBlockIndex, pname, params); 2517 return params.map([](auto x) { return static_cast<GCGLuint>(x); });2568 return Uint32Array::tryCreate(reinterpret_cast<GCGLuint*>(params.data()), params.size()); 2518 2569 } 2519 2570 case GraphicsContextGL::UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: … … 2524 2575 return nullptr; 2525 2576 } 2526 #else2527 UNUSED_PARAM(program);2528 UNUSED_PARAM(uniformBlockIndex);2529 UNUSED_PARAM(pname);2530 LOG(WebGL, "[[ NOT IMPLEMENTED ]] getActiveUniformBlockParameter()");2531 return nullptr;2532 #endif2533 2577 } 2534 2578 2535 2579 WebGLAny WebGL2RenderingContext::getActiveUniformBlockName(WebGLProgram& program, GCGLuint index) 2536 2580 { 2537 #if USE(ANGLE) 2538 if (isContextLostOrPending() || !validateWebGLProgramOrShader("getActiveUniformBlockName", &program)) 2581 if (!validateWebGLProgramOrShader("getActiveUniformBlockName", &program)) 2539 2582 return String(); 2540 2583 if (!program.getLinkStatus()) { … … 2546 2589 return nullptr; 2547 2590 return name; 2548 #else2549 UNUSED_PARAM(program);2550 UNUSED_PARAM(index);2551 LOG(WebGL, "[[ NOT IMPLEMENTED ]] getActiveUniformBlockName()");2552 return nullptr;2553 #endif2554 2591 } 2555 2592 2556 2593 void WebGL2RenderingContext::uniformBlockBinding(WebGLProgram& program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) 2557 2594 { 2558 #if USE(ANGLE) 2559 if (isContextLostOrPending() || !validateWebGLProgramOrShader("uniformBlockBinding", &program)) 2595 if (!validateWebGLProgramOrShader("uniformBlockBinding", &program)) 2560 2596 return; 2561 2597 m_context->uniformBlockBinding(program.object(), uniformBlockIndex, uniformBlockBinding); 2562 #else2563 UNUSED_PARAM(program);2564 UNUSED_PARAM(uniformBlockIndex);2565 UNUSED_PARAM(uniformBlockBinding);2566 LOG(WebGL, "[[ NOT IMPLEMENTED ]] uniformBlockBinding()");2567 #endif2568 2598 } 2569 2599 … … 2582 2612 auto locker = holdLock(objectGraphLock()); 2583 2613 2614 // validateWebGLObject generates an error if the object has already been 2615 // deleted, so we must replicate most of its checks here. 2584 2616 if (!arrayObject || isContextLost()) 2585 2617 return; 2586 2618 2619 if (!arrayObject->validate(contextGroup(), *this)) { 2620 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "deleteVertexArray", "object does not belong to this context"); 2621 return; 2622 } 2623 2587 2624 if (arrayObject->isDeleted()) 2588 2625 return; 2589 2626 2590 2627 if (!arrayObject->isDefaultObject() && arrayObject == m_boundVertexArrayObject) { 2591 #if USE(OPENGL_ES)2592 setBoundVertexArrayObject(locker, nullptr);2593 #else2594 2628 // bindVertexArray grabs the lock internally. 2595 2629 locker.unlockEarly(); 2596 2630 bindVertexArray(nullptr); // The default VAO was removed in OpenGL 3.3 but not from WebGL 2; bind the default for WebGL to use. 2597 2631 locker = holdLock(objectGraphLock()); 2598 #endif2599 2632 } 2600 2633 … … 2604 2637 GCGLboolean WebGL2RenderingContext::isVertexArray(WebGLVertexArrayObject* arrayObject) 2605 2638 { 2606 if (!arrayObject || isContextLost() )2639 if (!arrayObject || isContextLost() || !arrayObject->validate(0, *this)) 2607 2640 return false; 2608 2641 2609 if (!arrayObject->hasEverBeenBound() || !arrayObject->validate(0, *this))2642 if (!arrayObject->hasEverBeenBound()) 2610 2643 return false; 2644 if (arrayObject->isDeleted()) 2645 return false; 2611 2646 2612 2647 return m_context->isVertexArray(arrayObject->object()); … … 2617 2652 auto locker = holdLock(objectGraphLock()); 2618 2653 2619 if (isContextLost()) 2620 return; 2621 2622 if (arrayObject && (arrayObject->isDeleted() || !arrayObject->validate(0, *this) || !m_contextObjects.contains(arrayObject))) { 2623 m_context->synthesizeGLError(GraphicsContextGL::INVALID_OPERATION); 2624 return; 2625 } 2654 if (!validateNullableWebGLObject("bindVertexArray", arrayObject)) 2655 return; 2656 2626 2657 if (arrayObject && !arrayObject->isDefaultObject() && arrayObject->object()) { 2627 2658 m_context->bindVertexArray(arrayObject->object()); … … 2748 2779 2749 2780 if (!targetFramebuffer) { 2750 // OpenGL ES 3: Default framebuffer is bound.2751 2781 if (!validateDefaultFramebufferAttachment(attachment)) { 2752 2782 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid attachment"); 2753 2783 return nullptr; 2754 2784 } 2755 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2785 2786 // We can look directly at m_attributes because in WebGL 2, 2787 // they are required to be honored. 2788 bool hasDepth = m_attributes.depth; 2789 bool hasStencil = m_attributes.stencil; 2790 bool missingImage = (attachment == GraphicsContextGL::DEPTH && !hasDepth) || (attachment == GraphicsContextGL::STENCIL && !hasStencil); 2791 if (missingImage) { 2792 switch (pname) { 2793 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 2794 return static_cast<unsigned>(GraphicsContextGL::NONE); 2795 default: 2796 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "invalid parameter name"); 2797 return nullptr; 2798 } 2799 } 2800 2801 switch (pname) { 2802 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 2803 return GraphicsContextGL::FRAMEBUFFER_DEFAULT; 2804 default: 2805 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2806 } 2756 2807 } 2757 2808 if (!validateNonDefaultFramebufferAttachment(functionName, attachment)) 2758 2809 return nullptr; 2759 2810 2760 auto object = makeRefPtr(targetFramebuffer->getAttachmentObject(attachment)); 2761 if (!object) { 2811 RefPtr<WebGLSharedObject> attachmentObject; 2812 if (attachment == GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT) { 2813 attachmentObject = makeRefPtr(targetFramebuffer->getAttachmentObject(GraphicsContextGL::DEPTH_ATTACHMENT)); 2814 auto stencilAttachment = makeRefPtr(targetFramebuffer->getAttachmentObject(GraphicsContextGL::STENCIL_ATTACHMENT)); 2815 if (attachmentObject != stencilAttachment) { 2816 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "different objects bound to DEPTH_ATTACHMENT and STENCIL_ATTACHMENT"); 2817 return nullptr; 2818 } 2819 } else 2820 attachmentObject = makeRefPtr(targetFramebuffer->getAttachmentObject(attachment)); 2821 2822 if (!attachmentObject) { 2762 2823 if (pname == GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) 2763 2824 return static_cast<unsigned>(GraphicsContextGL::NONE); … … 2769 2830 2770 2831 switch (pname) { 2832 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 2833 if (attachmentObject->isTexture()) 2834 return static_cast<unsigned>(GraphicsContextGL::TEXTURE); 2835 return static_cast<unsigned>(GraphicsContextGL::RENDERBUFFER); 2836 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 2837 if (attachmentObject->isTexture()) 2838 return makeRefPtr(reinterpret_cast<WebGLTexture&>(*attachmentObject)); 2839 return makeRefPtr(reinterpret_cast<WebGLRenderbuffer&>(*attachmentObject)); 2840 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 2841 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 2842 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 2843 if (!attachmentObject->isTexture()) 2844 break; 2845 FALLTHROUGH; 2771 2846 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_RED_SIZE: 2772 2847 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: … … 2775 2850 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 2776 2851 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 2852 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 2853 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2777 2854 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 2778 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2779 } 2780 2781 if (object->isTexture()) { 2782 switch (pname) { 2783 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 2784 return static_cast<unsigned>(GraphicsContextGL::TEXTURE); 2785 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 2786 return makeRefPtr(reinterpret_cast<WebGLTexture&>(*object)); 2787 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 2788 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 2789 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 2790 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2791 default: 2792 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid parameter name for texture attachment"); 2855 if (attachment == GraphicsContextGL::DEPTH_STENCIL_ATTACHMENT) { 2856 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "COMPONENT_TYPE can't be queried for DEPTH_STENCIL_ATTACHMENT"); 2793 2857 return nullptr; 2794 2858 } 2795 } else { 2796 ASSERT(object->isRenderbuffer()); 2797 switch (pname) { 2798 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 2799 return static_cast<unsigned>(GraphicsContextGL::RENDERBUFFER); 2800 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 2801 return makeRefPtr(reinterpret_cast<WebGLRenderbuffer&>(*object)); 2802 case GraphicsContextGL::FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : { 2803 auto& renderBuffer = reinterpret_cast<WebGLRenderbuffer&>(*object); 2804 auto format = renderBuffer.getInternalFormat(); 2805 if (format == GraphicsContextGL::SRGB8_ALPHA8 2806 || format == GraphicsContextGL::COMPRESSED_SRGB8_ETC2 2807 || format == GraphicsContextGL::COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 2808 || format == GraphicsContextGL::COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2) { 2809 return static_cast<unsigned>(GraphicsContextGL::SRGB); 2810 } 2811 return static_cast<unsigned>(GraphicsContextGL::LINEAR); 2812 } 2813 default: 2814 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid parameter name for renderbuffer attachment"); 2815 return nullptr; 2816 } 2817 } 2859 return m_context->getFramebufferAttachmentParameteri(target, attachment, pname); 2860 } 2861 2862 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, functionName, "invalid parameter name for attachment"); 2863 return nullptr; 2818 2864 } 2819 2865 -
trunk/Source/WebCore/html/canvas/WebGLObject.cpp
r269850 r271444 68 68 return; 69 69 70 // ANGLE correctly handles object deletion with WebGL semantics.71 // For other GL implementations, delay deletion until we know72 // the object is not attached anywhere.73 #if USE(ANGLE)74 if (!m_calledDelete) {75 m_calledDelete = true;76 #else77 70 if (!m_attachmentCount) { 78 #endif79 71 if (!context3d) 80 72 context3d = getAGraphicsContextGL(); -
trunk/Source/WebCore/html/canvas/WebGLObject.h
r269850 r271444 95 95 unsigned m_attachmentCount { 0 }; 96 96 bool m_deleted { false }; 97 #if USE(ANGLE)98 bool m_calledDelete { false };99 #endif100 97 }; 101 98 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
r271065 r271444 1343 1343 auto locker = holdLock(objectGraphLock()); 1344 1344 1345 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("attachShader", &program) || !validateWebGLProgramOrShader("attachShader", &shader))1345 if (!validateWebGLProgramOrShader("attachShader", &program) || !validateWebGLProgramOrShader("attachShader", &shader)) 1346 1346 return; 1347 1347 if (!program.attachShader(locker, &shader)) { … … 1355 1355 void WebGLRenderingContextBase::bindAttribLocation(WebGLProgram& program, GCGLuint index, const String& name) 1356 1356 { 1357 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("bindAttribLocation", &program))1357 if (!validateWebGLProgramOrShader("bindAttribLocation", &program)) 1358 1358 return; 1359 1359 if (!validateLocationLength("bindAttribLocation", name)) … … 1372 1372 } 1373 1373 1374 bool WebGLRenderingContextBase::checkObjectToBeBound(const char* functionName, WebGLObject* object) 1375 { 1376 if (isContextLostOrPending()) 1377 return false; 1378 if (object) { 1379 if (!object->validate(contextGroup(), *this)) { 1380 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "object not from this context"); 1381 return false; 1382 } 1383 if (!object->object()) { 1384 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "deleted objects cannot be bound"); 1385 return false; 1386 } 1387 } 1388 return true; 1374 bool WebGLRenderingContextBase::validateNullableWebGLObject(const char* functionName, WebGLObject* object) 1375 { 1376 if (isContextLostOrPending()) 1377 return false; 1378 if (!object) { 1379 // This differs in behavior to ValidateWebGLObject; null objects are allowed 1380 // in these entry points. 1381 return true; 1382 } 1383 return validateWebGLObject(functionName, object); 1389 1384 } 1390 1385 … … 1448 1443 auto locker = holdLock(objectGraphLock()); 1449 1444 1450 if (! checkObjectToBeBound("bindBuffer", buffer))1445 if (!validateNullableWebGLObject("bindBuffer", buffer)) 1451 1446 return; 1452 1447 … … 1461 1456 auto locker = holdLock(objectGraphLock()); 1462 1457 1463 if (! checkObjectToBeBound("bindFramebuffer", buffer))1458 if (!validateNullableWebGLObject("bindFramebuffer", buffer)) 1464 1459 return; 1465 1460 … … 1476 1471 auto locker = holdLock(objectGraphLock()); 1477 1472 1478 if (! checkObjectToBeBound("bindRenderbuffer", renderBuffer))1473 if (!validateNullableWebGLObject("bindRenderbuffer", renderBuffer)) 1479 1474 return; 1480 1475 if (target != GraphicsContextGL::RENDERBUFFER) { … … 1492 1487 auto locker = holdLock(objectGraphLock()); 1493 1488 1494 if (! checkObjectToBeBound("bindTexture", texture))1489 if (!validateNullableWebGLObject("bindTexture", texture)) 1495 1490 return; 1496 1491 if (texture && texture->getTarget() && texture->getTarget() != target) { … … 1752 1747 void WebGLRenderingContextBase::compileShader(WebGLShader& shader) 1753 1748 { 1754 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("compileShader", &shader))1749 if (!validateWebGLProgramOrShader("compileShader", &shader)) 1755 1750 return; 1756 1751 m_context->compileShader(shader.object()); … … 2167 2162 auto locker = holdLock(objectGraphLock()); 2168 2163 2169 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("detachShader", &program) || !validateWebGLProgramOrShader("detachShader", &shader))2164 if (!validateWebGLProgramOrShader("detachShader", &program) || !validateWebGLProgramOrShader("detachShader", &shader)) 2170 2165 return; 2171 2166 if (!program.detachShader(locker, &shader)) { … … 2382 2377 bool WebGLRenderingContextBase::validateWebGLObject(const char* functionName, WebGLObject* object) 2383 2378 { 2379 if (isContextLostOrPending()) 2380 return false; 2384 2381 if (!object) { 2385 2382 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "object is null"); 2386 2383 return false; 2387 2384 } 2388 if ( !object->object()) {2385 if (object->isDeleted()) { 2389 2386 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "attempt to use a deleted object"); 2390 2387 return false; … … 2399 2396 bool WebGLRenderingContextBase::validateWebGLProgramOrShader(const char* functionName, WebGLObject* object) 2400 2397 { 2398 if (isContextLostOrPending()) 2399 return false; 2401 2400 if (!object) { 2402 2401 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "program or shader is null"); 2403 2402 return false; 2404 2403 } 2405 // Using a deleted program or shader is INVALID_VALUE instead of INVALID_OPERATION as for 2406 // other WebGL objects. 2404 // OpenGL ES 3.0.5 p. 45: 2405 // "Commands that accept shader or program object names will generate the 2406 // error INVALID_VALUE if the provided name is not the name of either a shader 2407 // or program object and INVALID_OPERATION if the provided name identifies an 2408 // object that is not the expected type." 2409 // 2410 // Programs and shaders also have slightly different lifetime rules than other 2411 // objects in the API; they continue to be usable after being marked for 2412 // deletion. 2407 2413 if (!object->object()) { 2408 2414 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "attempt to use a deleted program or shader"); … … 2713 2719 return; 2714 2720 } 2715 if (buffer && !buffer->validate(contextGroup(), *this)) { 2716 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "framebufferRenderbuffer", "no buffer or buffer not from this context"); 2717 return; 2718 } 2721 if (!validateNullableWebGLObject("framebufferRenderbuffer", buffer)) 2722 return; 2719 2723 if (buffer && !buffer->hasEverBeenBound()) { 2720 2724 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "framebufferRenderbuffer", "buffer has never been bound"); … … 2742 2746 return; 2743 2747 } 2744 if (texture && !texture->validate(contextGroup(), *this)) { 2745 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "framebufferTexture2D", "no texture or texture not from this context"); 2746 return; 2747 } 2748 2749 WebGLFramebuffer* framebufferBinding = getFramebufferBinding(target); 2748 if (!validateNullableWebGLObject("framebufferTexture2D", texture)) 2749 return; 2750 2750 2751 2751 // Don't allow the default framebuffer to be mutated; all current 2752 2752 // implementations use an FBO internally in place of the default 2753 2753 // FBO. 2754 WebGLFramebuffer* framebufferBinding = getFramebufferBinding(target); 2754 2755 if (!framebufferBinding || !framebufferBinding->object()) { 2755 2756 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "framebufferTexture2D", "no framebuffer bound"); … … 2811 2812 RefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveAttrib(WebGLProgram& program, GCGLuint index) 2812 2813 { 2813 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getActiveAttrib", &program))2814 if (!validateWebGLProgramOrShader("getActiveAttrib", &program)) 2814 2815 return nullptr; 2815 2816 GraphicsContextGL::ActiveInfo info; … … 2824 2825 RefPtr<WebGLActiveInfo> WebGLRenderingContextBase::getActiveUniform(WebGLProgram& program, GCGLuint index) 2825 2826 { 2826 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getActiveUniform", &program))2827 if (!validateWebGLProgramOrShader("getActiveUniform", &program)) 2827 2828 return nullptr; 2828 2829 GraphicsContextGL::ActiveInfo info; … … 2841 2842 Optional<Vector<RefPtr<WebGLShader>>> WebGLRenderingContextBase::getAttachedShaders(WebGLProgram& program) 2842 2843 { 2843 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getAttachedShaders", &program))2844 if (!validateWebGLProgramOrShader("getAttachedShaders", &program)) 2844 2845 return WTF::nullopt; 2845 2846 … … 2859 2860 GCGLint WebGLRenderingContextBase::getAttribLocation(WebGLProgram& program, const String& name) 2860 2861 { 2861 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getAttribLocation", &program))2862 if (!validateWebGLProgramOrShader("getAttribLocation", &program)) 2862 2863 return -1; 2863 2864 if (!validateLocationLength("getAttribLocation", name)) … … 3257 3258 String WebGLRenderingContextBase::getProgramInfoLog(WebGLProgram& program) 3258 3259 { 3259 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getProgramInfoLog", &program))3260 if (!validateWebGLProgramOrShader("getProgramInfoLog", &program)) 3260 3261 return String(); 3261 3262 return ensureNotNull(m_context->getProgramInfoLog(program.object())); … … 3363 3364 String WebGLRenderingContextBase::getShaderInfoLog(WebGLShader& shader) 3364 3365 { 3365 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getShaderInfoLog", &shader))3366 if (!validateWebGLProgramOrShader("getShaderInfoLog", &shader)) 3366 3367 return String(); 3367 3368 return ensureNotNull(m_context->getShaderInfoLog(shader.object())); … … 3401 3402 String WebGLRenderingContextBase::getShaderSource(WebGLShader& shader) 3402 3403 { 3403 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getShaderSource", &shader))3404 if (!validateWebGLProgramOrShader("getShaderSource", &shader)) 3404 3405 return String(); 3405 3406 return ensureNotNull(shader.getSource()); … … 3432 3433 WebGLAny WebGLRenderingContextBase::getUniform(WebGLProgram& program, const WebGLUniformLocation& uniformLocation) 3433 3434 { 3434 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getUniform", &program))3435 if (!validateWebGLProgramOrShader("getUniform", &program)) 3435 3436 return nullptr; 3436 3437 if (uniformLocation.program() != &program) { … … 3636 3637 RefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGLProgram& program, const String& name) 3637 3638 { 3638 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("getUniformLocation", &program))3639 if (!validateWebGLProgramOrShader("getUniformLocation", &program)) 3639 3640 return nullptr; 3640 3641 if (!validateLocationLength("getUniformLocation", name)) … … 3690 3691 if ((isWebGL2() || m_angleInstancedArrays) && pname == GraphicsContextGL::VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE) 3691 3692 return state.divisor; 3693 3694 if (isWebGL2() && pname == GraphicsContextGL::VERTEX_ATTRIB_ARRAY_INTEGER) 3695 return state.isInteger; 3692 3696 3693 3697 switch (pname) { … … 3810 3814 GCGLboolean WebGLRenderingContextBase::isBuffer(WebGLBuffer* buffer) 3811 3815 { 3812 if (!buffer || isContextLostOrPending() )3816 if (!buffer || isContextLostOrPending() || !buffer->validate(contextGroup(), *this)) 3813 3817 return 0; 3814 3818 3815 3819 if (!buffer->hasEverBeenBound()) 3820 return 0; 3821 if (buffer->isDeleted()) 3816 3822 return 0; 3817 3823 … … 3856 3862 GCGLboolean WebGLRenderingContextBase::isFramebuffer(WebGLFramebuffer* framebuffer) 3857 3863 { 3858 if (!framebuffer || isContextLostOrPending() )3864 if (!framebuffer || isContextLostOrPending() || !framebuffer->validate(contextGroup(), *this)) 3859 3865 return 0; 3860 3866 3861 3867 if (!framebuffer->hasEverBeenBound()) 3862 3868 return 0; 3869 if (framebuffer->isDeleted()) 3870 return 0; 3863 3871 3864 3872 return m_context->isFramebuffer(framebuffer->object()); … … 3867 3875 GCGLboolean WebGLRenderingContextBase::isProgram(WebGLProgram* program) 3868 3876 { 3869 if (!program || isContextLostOrPending() )3877 if (!program || isContextLostOrPending() || !program->validate(contextGroup(), *this)) 3870 3878 return 0; 3871 3879 3880 // OpenGL ES special-cases the behavior of program objects; if they're deleted 3881 // while attached to the current context state, glIsProgram is supposed to 3882 // still return true. For this reason, isDeleted is not checked here. 3883 3872 3884 return m_context->isProgram(program->object()); 3873 3885 } … … 3875 3887 GCGLboolean WebGLRenderingContextBase::isRenderbuffer(WebGLRenderbuffer* renderbuffer) 3876 3888 { 3877 if (!renderbuffer || isContextLostOrPending() )3889 if (!renderbuffer || isContextLostOrPending() || !renderbuffer->validate(contextGroup(), *this)) 3878 3890 return 0; 3879 3891 3880 3892 if (!renderbuffer->hasEverBeenBound()) 3881 3893 return 0; 3894 if (renderbuffer->isDeleted()) 3895 return 0; 3882 3896 3883 3897 return m_context->isRenderbuffer(renderbuffer->object()); … … 3886 3900 GCGLboolean WebGLRenderingContextBase::isShader(WebGLShader* shader) 3887 3901 { 3888 if (!shader || isContextLostOrPending() )3902 if (!shader || isContextLostOrPending() || !shader->validate(contextGroup(), *this)) 3889 3903 return 0; 3890 3904 3905 // OpenGL ES special-cases the behavior of shader objects; if they're deleted 3906 // while attached to a program, glIsShader is supposed to still return true. 3907 // For this reason, isDeleted is not checked here. 3908 3891 3909 return m_context->isShader(shader->object()); 3892 3910 } … … 3894 3912 GCGLboolean WebGLRenderingContextBase::isTexture(WebGLTexture* texture) 3895 3913 { 3896 if (!texture || isContextLostOrPending() )3914 if (!texture || isContextLostOrPending() || !texture->validate(contextGroup(), *this)) 3897 3915 return 0; 3898 3916 3899 3917 if (!texture->hasEverBeenBound()) 3900 3918 return 0; 3919 if (texture->isDeleted()) 3920 return 0; 3901 3921 3902 3922 return m_context->isTexture(texture->object()); … … 3920 3940 bool WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations(WebGLProgram* program) 3921 3941 { 3922 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("linkProgram", program))3942 if (!validateWebGLProgramOrShader("linkProgram", program)) 3923 3943 return false; 3924 3944 … … 4472 4492 void WebGLRenderingContextBase::shaderSource(WebGLShader& shader, const String& string) 4473 4493 { 4474 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("shaderSource", &shader))4494 if (!validateWebGLProgramOrShader("shaderSource", &shader)) 4475 4495 return; 4476 4496 #if USE(ANGLE) … … 5997 6017 auto locker = holdLock(objectGraphLock()); 5998 6018 5999 if (! checkObjectToBeBound("useProgram", program))6019 if (!validateNullableWebGLObject("useProgram", program)) 6000 6020 return; 6001 6021 if (program && !program->getLinkStatus()) { … … 6015 6035 void WebGLRenderingContextBase::validateProgram(WebGLProgram& program) 6016 6036 { 6017 if ( isContextLostOrPending() ||!validateWebGLProgramOrShader("validateProgram", &program))6037 if (!validateWebGLProgramOrShader("validateProgram", &program)) 6018 6038 return; 6019 6039 m_context->validateProgram(program.object()); … … 6127 6147 GCGLsizei bytesPerElement = size * typeSize; 6128 6148 6129 m_boundVertexArrayObject->setVertexAttribState(locker, index, bytesPerElement, size, type, normalized, stride, static_cast<GCGLintptr>(offset), m_boundArrayBuffer.get());6149 m_boundVertexArrayObject->setVertexAttribState(locker, index, bytesPerElement, size, type, normalized, stride, static_cast<GCGLintptr>(offset), false, m_boundArrayBuffer.get()); 6130 6150 m_context->vertexAttribPointer(index, size, type, normalized, stride, static_cast<GCGLintptr>(offset)); 6131 6151 } … … 7719 7739 if (isContextLostOrPending()) 7720 7740 return; 7721 #endif // USE(ANGLE) 7722 7723 if (!primcount) { 7724 markContextChanged(); 7725 return; 7726 } 7727 7728 #if !USE(ANGLE) 7741 #else 7729 7742 if (!validateDrawArrays("drawArraysInstanced", mode, first, count, primcount)) 7730 7743 return; … … 7764 7777 if (isContextLostOrPending()) 7765 7778 return; 7766 #endif 7767 7768 if (!primcount) { 7769 markContextChanged(); 7770 return; 7771 } 7772 7773 #if !USE(ANGLE) 7779 #else 7774 7780 unsigned numElements = 0; 7775 7781 if (!validateDrawElements("drawElementsInstanced", mode, count, type, offset, numElements, primcount)) -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r271065 r271444 496 496 bool validateVertexAttributes(unsigned elementCount, unsigned primitiveCount = 0); 497 497 498 // Validates the incoming WebGL object, which is assumed to be non-null. 499 // Checks that the object belongs to this context and that it's not marked for 500 // deletion. Performs a context lost check internally. 498 501 bool validateWebGLObject(const char*, WebGLObject*); 502 503 // Validates the incoming WebGL program or shader, which is assumed to be 504 // non-null. OpenGL ES's validation rules differ for these types of objects 505 // compared to others. Performs a context lost check internally. 499 506 bool validateWebGLProgramOrShader(const char*, WebGLObject*); 500 507 … … 1047 1054 bool deleteObject(const WTF::AbstractLocker&, WebGLObject*); 1048 1055 1049 // Helper function for bind* (bindBuffer, bindTexture, etc) and useProgram. 1050 // Return false if caller should return without further processing. 1051 bool checkObjectToBeBound(const char* functionName, WebGLObject*); 1056 // Helper function for APIs which can legally receive null objects, including 1057 // the bind* calls (bindBuffer, bindTexture, etc.) and useProgram. Checks that 1058 // the object belongs to this context and that it's not marked for deletion. 1059 // Returns false if the caller should return without further processing. 1060 // Performs a context lost check internally. 1061 // This returns true for null WebGLObject arguments! 1062 bool validateNullableWebGLObject(const char* functionName, WebGLObject*); 1052 1063 1053 1064 // Helper function to validate the target for bufferData and -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp
r265708 r271444 53 53 } 54 54 55 void WebGLVertexArrayObjectBase::setVertexAttribState(const AbstractLocker& locker, GCGLuint index, GCGLsizei bytesPerElement, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset, WebGLBuffer* buffer)55 void WebGLVertexArrayObjectBase::setVertexAttribState(const AbstractLocker& locker, GCGLuint index, GCGLsizei bytesPerElement, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset, bool isInteger, WebGLBuffer* buffer) 56 56 { 57 57 GCGLsizei validatedStride = stride ? stride : bytesPerElement; … … 72 72 state.originalStride = stride; 73 73 state.offset = offset; 74 state.isInteger = isInteger; 74 75 } 75 76 -
trunk/Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h
r269850 r271444 61 61 GCGLintptr offset { 0 }; 62 62 GCGLuint divisor { 0 }; 63 bool isInteger { false }; 63 64 }; 64 65 … … 72 73 73 74 VertexAttribState& getVertexAttribState(int index) { return m_vertexAttribState[index]; } 74 void setVertexAttribState(const WTF::AbstractLocker&, GCGLuint, GCGLsizei, GCGLint, GCGLenum, GCGLboolean, GCGLsizei, GCGLintptr, WebGLBuffer*);75 void setVertexAttribState(const WTF::AbstractLocker&, GCGLuint, GCGLsizei, GCGLint, GCGLenum, GCGLboolean, GCGLsizei, GCGLintptr, bool, WebGLBuffer*); 75 76 void unbindBuffer(const WTF::AbstractLocker&, WebGLBuffer&); 76 77 -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
r270964 r271444 293 293 return; 294 294 gl::GetIntegervRobustANGLE(pname, value.bufSize, nullptr, value.data); 295 296 switch (pname) {297 #if PLATFORM(MAC)298 // Some older hardware advertises a larger maximum than they299 // can actually handle. Rather than detecting such devices, simply300 // clamp the maximum to 8192, which is big enough for a 5K display.301 case MAX_RENDERBUFFER_SIZE:302 *value = std::min(8192, *value);303 break;304 case MAX_VIEWPORT_DIMS:305 value[0] = std::min(8192, value[0]);306 value[1] = std::min(8192, value[1]);307 break;308 #endif309 default:310 break;311 }312 295 } 313 296
Note: See TracChangeset
for help on using the changeset viewer.