Changeset 263999 in webkit
- Timestamp:
- Jul 6, 2020 5:01:51 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/webgl/2.0.0/conformance2/rendering/instanced-arrays-expected.txt
r263281 r263999 2 2 3 3 Test: ../../resources/webgl_test_files/conformance2/rendering/instanced-arrays.html 4 [ 1: PASS ] WebGL context exists 5 [ 2: PASS ] gl.VERTEX_ATTRIB_ARRAY_DIVISOR is 0x88FE 6 [ 3: PASS ] Vertex attribute 0 must has a default divisor of 0 7 [ 4: PASS ] Vertex attribute 1 must has a default divisor of 0 8 [ 5: PASS ] Vertex attribute 2 must has a default divisor of 0 9 [ 6: PASS ] Vertex attribute 3 must has a default divisor of 0 10 [ 7: PASS ] Vertex attribute 4 must has a default divisor of 0 11 [ 8: PASS ] Vertex attribute 5 must has a default divisor of 0 12 [ 9: PASS ] Vertex attribute 6 must has a default divisor of 0 13 [ 10: PASS ] Vertex attribute 7 must has a default divisor of 0 14 [ 11: PASS ] Vertex attribute 8 must has a default divisor of 0 15 [ 12: PASS ] Vertex attribute 9 must has a default divisor of 0 16 [ 13: PASS ] Vertex attribute 10 must has a default divisor of 0 17 [ 14: PASS ] Vertex attribute 11 must has a default divisor of 0 18 [ 15: PASS ] Vertex attribute 12 must has a default divisor of 0 19 [ 16: PASS ] Vertex attribute 13 must has a default divisor of 0 20 [ 17: PASS ] Vertex attribute 14 must has a default divisor of 0 21 [ 18: PASS ] Vertex attribute 15 must has a default divisor of 0 22 [ 19: PASS ] getError was expected value: INVALID_VALUE : vertexAttribDivisor index set greater than or equal to MAX_VERTEX_ATTRIBS should be an invalid value 23 [ 20: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : vertexAttribDivisor index set less than MAX_VERTEX_ATTRIBS should succeed 24 [ 21: PASS ] Set value of VERTEX_ATTRIB_ARRAY_DIVISOR matches expecation 25 [ 22: FAIL ] should be 255,0,0,255 at (0, 25) expected: 255,0,0,255 was 0,0,0,0 26 [ 23: FAIL ] should be 0,255,0,255 at (25, 25) expected: 0,255,0,255 was 0,0,0,0 27 [ 24: FAIL ] should be 0,0,255,255 at (0, 0) expected: 0,0,255,255 was 0,0,0,0 28 [ 25: FAIL ] should be 255,255,0,255 at (25, 0) expected: 255,255,0,255 was 0,0,0,0 29 [ 26: FAIL ] getError expected: INVALID_VALUE. Was INVALID_OPERATION : drawArraysInstanced cannot have a primcount less than 0 30 [ 27: PASS ] getError was expected value: INVALID_VALUE : drawArraysInstanced cannot have a count less than 0 31 [ 28: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : It's allowed for all vertex attributes to have non-zero divisors when calling drawArraysInstanced 32 [ 29: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced with POINTS should succeed 33 [ 30: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced with LINES should succeed 34 [ 31: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced with LINE_LIST should return succeed 35 [ 32: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced with TRI_LIST should succeed 36 [ 33: PASS ] getError was expected value: INVALID_ENUM : drawArraysInstanced with QUAD_STRIP should return INVALID_ENUM 37 [ 34: PASS ] getError was expected value: INVALID_ENUM : drawArraysInstanced with QUADS should return INVALID_ENUM 38 [ 35: PASS ] getError was expected value: INVALID_ENUM : drawArraysInstanced with POLYGON should return INVALID_ENUM 39 [ 36: FAIL ] should be 255,0,0,255 at (0, 25) expected: 255,0,0,255 was 0,0,0,0 40 [ 37: FAIL ] should be 0,255,0,255 at (25, 25) expected: 0,255,0,255 was 0,0,0,0 41 [ 38: FAIL ] should be 0,0,255,255 at (0, 0) expected: 0,0,255,255 was 0,0,0,0 42 [ 39: FAIL ] should be 255,255,0,255 at (25, 0) expected: 255,255,0,255 was 0,0,0,0 43 [ 40: PASS ] getError was expected value: INVALID_VALUE : drawElementsInstanced cannot have a primcount less than 0 44 [ 41: PASS ] getError was expected value: INVALID_VALUE : drawElementsInstanced cannot have a count less than 0 45 [ 42: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : It's allowed for all vertex attributes to have non-zero divisors when calling drawElementsInstanced 46 [ 43: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawElementsInstanced with UNSIGNED_BYTE should succeed 47 [ 44: PASS ] getError was expected value: NO_ERROR : drawElementsInstanced with POINTS should succeed 48 [ 45: PASS ] getError was expected value: NO_ERROR : drawElementsInstanced with LINES should succeed 49 [ 46: PASS ] getError was expected value: NO_ERROR : drawElementsInstanced with LINE_LIST should return succeed 50 [ 47: PASS ] getError was expected value: NO_ERROR : drawElementsInstanced with TRI_LIST should succeed 51 [ 48: PASS ] getError was expected value: INVALID_ENUM : drawElementsInstanced with QUAD_STRIP should return INVALID_ENUM 52 [ 49: PASS ] getError was expected value: INVALID_ENUM : drawElementsInstanced with QUADS should return INVALID_ENUM 53 [ 50: PASS ] getError was expected value: INVALID_ENUM : drawElementsInstanced with POLYGON should return INVALID_ENUM 54 [ 51: PASS ] getError was expected value: NO_ERROR : there should be no errors 55 [ 52: PASS ] successfullyParsed is true 56 [ FAIL ] 17 failures reported 4 [ PASS ] All tests passed 57 5 -
trunk/LayoutTests/webgl/2.0.0/conformance2/rendering/instanced-rendering-bug-expected.txt
r256836 r263999 2 2 3 3 Test: ../../resources/webgl_test_files/conformance2/rendering/instanced-rendering-bug.html 4 [ 1: PASS ] WebGL context exists 5 [ 2: PASS ] Set up program succeeded 6 [ 3: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced should succeed 7 [ 4: FAIL ] instance 0 should be 127,0,0,255 at (1, 0) expected: 127,0,0,255 was 0,0,0,0 8 [ 5: FAIL ] instance 1 should be 127,0,0,255 at (38, 0) expected: 127,0,0,255 was 0,0,0,0 9 [ 6: FAIL ] instance 2 should be 127,0,0,255 at (76, 0) expected: 127,0,0,255 was 0,0,0,0 10 [ 7: FAIL ] instance 3 should be 127,0,0,255 at (113, 0) expected: 127,0,0,255 was 0,0,0,0 11 [ 8: FAIL ] instance 4 should be 255,0,0,255 at (151, 0) expected: 255,0,0,255 was 0,0,0,0 12 [ 9: FAIL ] instance 5 should be 255,0,0,255 at (188, 0) expected: 255,0,0,255 was 0,0,0,0 13 [ 10: FAIL ] instance 6 should be 255,0,0,255 at (226, 0) expected: 255,0,0,255 was 0,0,0,0 14 [ 11: FAIL ] instance 7 should be 255,0,0,255 at (263, 0) expected: 255,0,0,255 was 0,0,0,0 15 [ 12: PASS ] getError was expected value: NO_ERROR : clean up should succeed 16 [ 13: PASS ] Set up program succeeded 17 [ 14: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced should succeed 18 [ 15: FAIL ] instance 0 should be 102,0,0,255 at (1, 0) expected: 102,0,0,255 was 0,0,0,0 19 [ 16: FAIL ] instance 1 should be 102,0,0,255 at (51, 0) expected: 102,0,0,255 was 0,0,0,0 20 [ 17: FAIL ] instance 2 should be 102,0,0,255 at (101, 0) expected: 102,0,0,255 was 0,0,0,0 21 [ 18: FAIL ] instance 3 should be 102,0,0,255 at (151, 0) expected: 102,0,0,255 was 0,0,0,0 22 [ 19: FAIL ] instance 4 should be 204,0,0,255 at (201, 0) expected: 204,0,0,255 was 0,0,0,0 23 [ 20: FAIL ] instance 5 should be 204,0,0,255 at (251, 0) expected: 204,0,0,255 was 0,0,0,0 24 [ 21: PASS ] getError was expected value: NO_ERROR : clean up should succeed 25 [ 22: PASS ] Set up program succeeded 26 [ 23: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced should succeed 27 [ 24: FAIL ] instance 0 should be 127,0,0,255 at (1, 0) expected: 127,0,0,255 was 0,0,0,0 28 [ 25: FAIL ] instance 1 should be 127,0,0,255 at (51, 0) expected: 127,0,0,255 was 0,0,0,0 29 [ 26: FAIL ] instance 2 should be 127,0,0,255 at (101, 0) expected: 127,0,0,255 was 0,0,0,0 30 [ 27: FAIL ] instance 3 should be 255,0,0,255 at (151, 0) expected: 255,0,0,255 was 0,0,0,0 31 [ 28: FAIL ] instance 4 should be 255,0,0,255 at (201, 0) expected: 255,0,0,255 was 0,0,0,0 32 [ 29: FAIL ] instance 5 should be 255,0,0,255 at (251, 0) expected: 255,0,0,255 was 0,0,0,0 33 [ 30: PASS ] getError was expected value: NO_ERROR : clean up should succeed 34 [ 31: PASS ] Set up program succeeded 35 [ 32: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawArraysInstanced should succeed 36 [ 33: FAIL ] instance 0 should be 69,0,0,255 at (1, 0) expected: 69,0,0,255 was 0,0,0,0 37 [ 34: FAIL ] instance 1 should be 69,0,0,255 at (38, 0) expected: 69,0,0,255 was 0,0,0,0 38 [ 35: FAIL ] instance 2 should be 69,0,0,255 at (76, 0) expected: 69,0,0,255 was 0,0,0,0 39 [ 36: FAIL ] instance 3 should be 139,0,0,255 at (113, 0) expected: 139,0,0,255 was 0,0,0,0 40 [ 37: FAIL ] instance 4 should be 139,0,0,255 at (151, 0) expected: 139,0,0,255 was 0,0,0,0 41 [ 38: FAIL ] instance 5 should be 139,0,0,255 at (188, 0) expected: 139,0,0,255 was 0,0,0,0 42 [ 39: FAIL ] instance 6 should be 208,0,0,255 at (226, 0) expected: 208,0,0,255 was 0,0,0,0 43 [ 40: FAIL ] instance 7 should be 208,0,0,255 at (263, 0) expected: 208,0,0,255 was 0,0,0,0 44 [ 41: PASS ] getError was expected value: NO_ERROR : clean up should succeed 45 [ 42: PASS ] Set up program succeeded 46 [ 43: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawElementsInstanced should succeed 47 [ 44: FAIL ] instance 0 should be 127,0,0,255 at (1, 0) expected: 127,0,0,255 was 0,0,0,0 48 [ 45: FAIL ] instance 1 should be 127,0,0,255 at (38, 0) expected: 127,0,0,255 was 0,0,0,0 49 [ 46: FAIL ] instance 2 should be 127,0,0,255 at (76, 0) expected: 127,0,0,255 was 0,0,0,0 50 [ 47: FAIL ] instance 3 should be 127,0,0,255 at (113, 0) expected: 127,0,0,255 was 0,0,0,0 51 [ 48: FAIL ] instance 4 should be 255,0,0,255 at (151, 0) expected: 255,0,0,255 was 0,0,0,0 52 [ 49: FAIL ] instance 5 should be 255,0,0,255 at (188, 0) expected: 255,0,0,255 was 0,0,0,0 53 [ 50: FAIL ] instance 6 should be 255,0,0,255 at (226, 0) expected: 255,0,0,255 was 0,0,0,0 54 [ 51: FAIL ] instance 7 should be 255,0,0,255 at (263, 0) expected: 255,0,0,255 was 0,0,0,0 55 [ 52: PASS ] getError was expected value: NO_ERROR : clean up should succeed 56 [ 53: PASS ] Set up program succeeded 57 [ 54: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawElementsInstanced should succeed 58 [ 55: FAIL ] instance 0 should be 102,0,0,255 at (1, 0) expected: 102,0,0,255 was 0,0,0,0 59 [ 56: FAIL ] instance 1 should be 102,0,0,255 at (51, 0) expected: 102,0,0,255 was 0,0,0,0 60 [ 57: FAIL ] instance 2 should be 102,0,0,255 at (101, 0) expected: 102,0,0,255 was 0,0,0,0 61 [ 58: FAIL ] instance 3 should be 102,0,0,255 at (151, 0) expected: 102,0,0,255 was 0,0,0,0 62 [ 59: FAIL ] instance 4 should be 204,0,0,255 at (201, 0) expected: 204,0,0,255 was 0,0,0,0 63 [ 60: FAIL ] instance 5 should be 204,0,0,255 at (251, 0) expected: 204,0,0,255 was 0,0,0,0 64 [ 61: PASS ] getError was expected value: NO_ERROR : clean up should succeed 65 [ 62: PASS ] Set up program succeeded 66 [ 63: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawElementsInstanced should succeed 67 [ 64: FAIL ] instance 0 should be 127,0,0,255 at (1, 0) expected: 127,0,0,255 was 0,0,0,0 68 [ 65: FAIL ] instance 1 should be 127,0,0,255 at (51, 0) expected: 127,0,0,255 was 0,0,0,0 69 [ 66: FAIL ] instance 2 should be 127,0,0,255 at (101, 0) expected: 127,0,0,255 was 0,0,0,0 70 [ 67: FAIL ] instance 3 should be 255,0,0,255 at (151, 0) expected: 255,0,0,255 was 0,0,0,0 71 [ 68: FAIL ] instance 4 should be 255,0,0,255 at (201, 0) expected: 255,0,0,255 was 0,0,0,0 72 [ 69: FAIL ] instance 5 should be 255,0,0,255 at (251, 0) expected: 255,0,0,255 was 0,0,0,0 73 [ 70: PASS ] getError was expected value: NO_ERROR : clean up should succeed 74 [ 71: PASS ] Set up program succeeded 75 [ 72: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION : drawElementsInstanced should succeed 76 [ 73: FAIL ] instance 0 should be 69,0,0,255 at (1, 0) expected: 69,0,0,255 was 0,0,0,0 77 [ 74: FAIL ] instance 1 should be 69,0,0,255 at (38, 0) expected: 69,0,0,255 was 0,0,0,0 78 [ 75: FAIL ] instance 2 should be 69,0,0,255 at (76, 0) expected: 69,0,0,255 was 0,0,0,0 79 [ 76: FAIL ] instance 3 should be 139,0,0,255 at (113, 0) expected: 139,0,0,255 was 0,0,0,0 80 [ 77: FAIL ] instance 4 should be 139,0,0,255 at (151, 0) expected: 139,0,0,255 was 0,0,0,0 81 [ 78: FAIL ] instance 5 should be 139,0,0,255 at (188, 0) expected: 139,0,0,255 was 0,0,0,0 82 [ 79: FAIL ] instance 6 should be 208,0,0,255 at (226, 0) expected: 208,0,0,255 was 0,0,0,0 83 [ 80: FAIL ] instance 7 should be 208,0,0,255 at (263, 0) expected: 208,0,0,255 was 0,0,0,0 84 [ 81: PASS ] getError was expected value: NO_ERROR : clean up should succeed 85 [ 82: PASS ] successfullyParsed is true 86 [ FAIL ] 64 failures reported 4 [ PASS ] All tests passed 87 5 -
trunk/LayoutTests/webgl/2.0.0/conformance2/state/gl-object-get-calls-expected.txt
r263281 r263999 280 280 [ 276: FAIL ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_INTEGER) should be true (of type boolean). Was null (of type object). 281 281 [ 277: FAIL ] getError expected: NO_ERROR. Was INVALID_ENUM : 282 [ 278: FAIL ] getVertexAttrib did not generate INVALID_ENUM for invalid parameter enum: NO_ERROR283 [ 279: FAIL ] getError expected: INVALID_VALUE. Was INVALID_ENUM: after evaluating: gl.getVertexAttrib(16, gl.CURRENT_VERTEX_ATTRIB)282 [ 278: PASS ] getVertexAttrib correctly handled invalid parameter enums 283 [ 279: PASS ] getError was expected value: INVALID_VALUE : after evaluating: gl.getVertexAttrib(16, gl.CURRENT_VERTEX_ATTRIB) 284 284 [ 280: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.NONE 285 [ 281: FAIL ] getError expected: INVALID_OPERATION. Was INVALID_VALUE:285 [ 281: PASS ] getError was expected value: INVALID_OPERATION : 286 286 [ 282: PASS ] gl.getFramebufferAttachmentParameter(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT, gl.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE) is gl.NONE 287 287 [ 283: PASS ] gl.getVertexAttrib(1, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) is null 288 [ 284: FAIL ] getError expected: NO_ERROR. Was INVALID_OPERATION:288 [ 284: PASS ] getError was expected value: NO_ERROR : 289 289 [ 285: PASS ] gl.getInternalformatParameter(gl.RENDERBUFFER, gl.R32I, gl.SAMPLES) is non-null. 290 290 [ 286: PASS ] getError was expected value: NO_ERROR : … … 312 312 [ 308: FAIL ] gl.getSyncParameter(sync, gl.OBJECT_TYPE) should be 37142. Threw exception TypeError: Argument 1 ('sync') to WebGL2RenderingContext.getSyncParameter must be an instance of WebGLSync 313 313 [ 309: FAIL ] successfullyParsed should be true (of type boolean). Was undefined (of type undefined). 314 [ FAIL ] 5 8failures reported314 [ FAIL ] 54 failures reported 315 315 -
trunk/LayoutTests/webgl/2.0.0/conformance2/transform_feedback/transform_feedback-expected.txt
r263281 r263999 2 2 3 3 Test: ../../resources/webgl_test_files/conformance2/transform_feedback/transform_feedback.html 4 [ 1: PASS ] WebGL context exists 5 [ 2: PASS ] gl.TRANSFORM_FEEDBACK_BINDING is 0x8E25 6 [ 3: PASS ] getError was expected value: NO_ERROR : TRANSFORM_FEEDBACK_BINDING query should succeed 7 [ 4: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is null 8 [ 5: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is null 9 [ 6: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is tf 10 [ 7: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is tf1 11 [ 8: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is null 12 [ 9: PASS ] getError was expected value: INVALID_OPERATION : binding a deleted Transform Feedback object 13 [ 10: PASS ] gl.getParameter(gl.TRANSFORM_FEEDBACK_BINDING) is null 14 [ 11: PASS ] getError was expected value: NO_ERROR : there should be no errors 15 [ 12: FAIL ] gl.getIndexedParameter(gl.TRANSFORM_FEEDBACK_BUFFER_BINDING, 0) should be null. Was [object WebGLBuffer]. 16 [ 13: PASS ] getError was expected value: NO_ERROR : binding buffer to ARRAY_BUFFER 17 [ 14: PASS ] getError was expected value: NO_ERROR : createTransformFeedback should not set an error 18 [ 15: PASS ] tf is non-null. 19 [ 16: PASS ] gl.isTransformFeedback(tf) is false 20 [ 17: PASS ] gl.isTransformFeedback(tf) is true 21 [ 18: PASS ] gl.isTransformFeedback(tf) is true 22 [ 19: PASS ] gl.isTransformFeedback(tf) is false 23 [ 20: PASS ] gl.isTransformFeedback(null) is false 24 [ 21: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 25 [ 22: PASS ] program is non-null. 26 [ 23: PASS ] getError was expected value: NO_ERROR : after evaluating: gl.getBufferSubData(gl.TRANSFORM_FEEDBACK_BUFFER, 0, retArray, 0, retArray.length) 27 [ 24: PASS ] getError was expected value: NO_ERROR : after evaluating: gl.getBufferSubData(gl.TRANSFORM_FEEDBACK_BUFFER, 0, retArray, 0, retArray.length) 28 [ 25: PASS ] getError was expected value: INVALID_OPERATION : after evaluating: gl.getBufferSubData(gl.TRANSFORM_FEEDBACK_BUFFER, 0, retArray, 0, retArray.length) 29 [ 26: PASS ] buffer should match expected values 30 [ 27: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 31 [ 28: PASS ] program is non-null. 32 [ 29: PASS ] buffer should match expected values 33 [ 30: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 34 [ 31: PASS ] program is non-null. 35 [ 32: PASS ] buffer should match expected values 36 [ 33: PASS ] buffer should match expected values 37 [ 34: PASS ] TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN query's result didn't become available too early 38 [ 35: PASS ] TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN query returned a correct result (3) 39 [ 36: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 40 [ 37: PASS ] program is non-null. 41 [ 38: PASS ] gl.getProgramParameter(program, gl.TRANSFORM_FEEDBACK_VARYINGS) is 2 42 [ 39: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 43 [ 40: PASS ] activeInfo is non-null. 44 [ 41: PASS ] activeInfo.name is 'out_add' 45 [ 42: PASS ] activeInfo.type is gl.FLOAT_VEC4 46 [ 43: PASS ] activeInfo.size is 1 47 [ 44: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 48 [ 45: PASS ] activeInfo is non-null. 49 [ 46: PASS ] activeInfo.name is 'out_mul' 50 [ 47: PASS ] activeInfo.type is gl.FLOAT_VEC4 51 [ 48: PASS ] activeInfo.size is 1 52 [ 49: PASS ] getError was expected value: INVALID_VALUE : Should be INVALID_VALUE when calling getTransformFeedbackVarying with an invalid index. 53 [ 50: PASS ] activeInfo is null 54 [ 51: PASS ] gl.getProgramParameter(program, gl.TRANSFORM_FEEDBACK_VARYINGS) is 2 55 [ 52: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 56 [ 53: PASS ] activeInfo is non-null. 57 [ 54: PASS ] activeInfo.name is 'out_add' 58 [ 55: PASS ] activeInfo.type is gl.FLOAT_VEC4 59 [ 56: PASS ] activeInfo.size is 1 60 [ 57: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 61 [ 58: PASS ] activeInfo is non-null. 62 [ 59: PASS ] activeInfo.name is 'out_mul' 63 [ 60: PASS ] activeInfo.type is gl.FLOAT_VEC4 64 [ 61: PASS ] activeInfo.size is 1 65 [ 62: PASS ] getError was expected value: INVALID_VALUE : Should be INVALID_VALUE when calling getTransformFeedbackVarying with an invalid index. 66 [ 63: PASS ] activeInfo is null 67 [ 64: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 68 [ 65: PASS ] gl.getProgramParameter(program, gl.LINK_STATUS) is true 69 [ 66: PASS ] gl.getProgramParameter(program, gl.TRANSFORM_FEEDBACK_VARYINGS) is 1 70 [ 67: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 71 [ 68: PASS ] activeInfo is non-null. 72 [ 69: PASS ] activeInfo.name is 'out_mul' 73 [ 70: PASS ] activeInfo.type is gl.FLOAT_VEC4 74 [ 71: PASS ] activeInfo.size is 1 75 [ 72: PASS ] getError was expected value: INVALID_VALUE : Should be INVALID_VALUE when calling getTransformFeedbackVarying with an invalid index. 76 [ 73: PASS ] activeInfo is null 77 [ 74: PASS ] getError was expected value: INVALID_VALUE : Should be INVALID_VALUE when calling getTransformFeedbackVarying with an invalid index. 78 [ 75: PASS ] activeInfo is null 79 [ 76: PASS ] getError was expected value: NO_ERROR : linking transform feedback shader should not set an error 80 [ 77: PASS ] gl.getProgramParameter(program, gl.LINK_STATUS) is true 81 [ 78: PASS ] gl.getProgramParameter(program, gl.TRANSFORM_FEEDBACK_VARYINGS) is 2 82 [ 79: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 83 [ 80: PASS ] activeInfo is non-null. 84 [ 81: PASS ] activeInfo.name is 'out_add' 85 [ 82: PASS ] activeInfo.type is gl.FLOAT_VEC4 86 [ 83: PASS ] activeInfo.size is 1 87 [ 84: PASS ] getError was expected value: NO_ERROR : Should be no errors from valid getTransformFeedbackVarying. 88 [ 85: PASS ] activeInfo is non-null. 89 [ 86: PASS ] activeInfo.name is 'out_mul' 90 [ 87: PASS ] activeInfo.type is gl.FLOAT_VEC4 91 [ 88: PASS ] activeInfo.size is 1 92 [ 89: PASS ] getError was expected value: INVALID_VALUE : Should be INVALID_VALUE when calling getTransformFeedbackVarying with an invalid index. 93 [ 90: PASS ] activeInfo is null 94 [ 91: PASS ] successfullyParsed is true 95 [ FAIL ] 1 failures reported 4 [ PASS ] All tests passed 96 5 -
trunk/Source/WebCore/ChangeLog
r263998 r263999 1 2020-07-06 James Darpinian <jdarpinian@chromium.org> 2 3 Fix transform feedback tests 4 https://bugs.webkit.org/show_bug.cgi?id=213906 5 6 Reviewed by Dean Jackson. 7 8 Fix transform feedback conformance tests by implementing missing functionality such as: 9 - Transform feedback object state tracking 10 - Validation for all GL errors that can affect state tracking before calling ANGLE 11 - Default transform feedback object 12 - Pause/resume 13 - Fix vertexAttribDivisor in WebGL 2 (unrelated to transform feedback) 14 15 After this, all related tests pass except for a few that also fail in Chrome, and one that uses 16 PIXEL_PACK_BUFFER which is not yet supported. 17 18 * html/canvas/WebGL2RenderingContext.cpp: 19 (WebCore::WebGL2RenderingContext::~WebGL2RenderingContext): 20 (WebCore::WebGL2RenderingContext::initializeNewContext): 21 (WebCore::WebGL2RenderingContext::deleteTransformFeedback): 22 (WebCore::WebGL2RenderingContext::bindTransformFeedback): 23 (WebCore::ValidateTransformFeedbackPrimitiveMode): 24 (WebCore::WebGL2RenderingContext::beginTransformFeedback): 25 (WebCore::WebGL2RenderingContext::endTransformFeedback): 26 (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): 27 (WebCore::WebGL2RenderingContext::pauseTransformFeedback): 28 (WebCore::WebGL2RenderingContext::resumeTransformFeedback): 29 (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): 30 (WebCore::WebGL2RenderingContext::getIndexedParameter): 31 (WebCore::WebGL2RenderingContext::getMaxTransformFeedbackSeparateAttribs): 32 (WebCore::WebGL2RenderingContext::getParameter): 33 (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer): 34 * html/canvas/WebGL2RenderingContext.h: 35 * html/canvas/WebGLProgram.cpp: 36 (WebCore::WebGLProgram::cacheInfoIfNeeded): 37 * html/canvas/WebGLProgram.h: 38 * html/canvas/WebGLTransformFeedback.cpp: 39 (WebCore::WebGLTransformFeedback::create): 40 (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): 41 (WebCore::WebGLTransformFeedback::setProgram): 42 (WebCore::WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer): 43 (WebCore::WebGLTransformFeedback::getBoundIndexedTransformFeedbackBuffer): 44 (WebCore::WebGLTransformFeedback::hasEnoughBuffers const): 45 (WebCore::WebGLTransformFeedback::usesBuffer): 46 (WebCore::WebGLTransformFeedback::unbindBuffer): 47 (WebCore::WebGLTransformFeedback::validateProgramForResume const): 48 * html/canvas/WebGLTransformFeedback.h: 49 * platform/graphics/angle/GraphicsContextGLANGLE.cpp: 50 (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): 51 1 52 2020-07-06 Myles C. Maxfield <mmaxfield@apple.com> 2 53 -
trunk/Source/WebCore/bindings/js/CallTracerTypes.h
r252864 r263999 62 62 #include "WebGLSync.h" 63 63 #include "WebGLTexture.h" 64 #include "WebGLTransformFeedback.h"65 64 #include "WebGLUniformLocation.h" 66 65 #include "WebGLVertexArrayObject.h" … … 69 68 #if ENABLE(WEBGL2) 70 69 #include "WebGL2RenderingContext.h" 70 #include "WebGLTransformFeedback.h" 71 71 #endif 72 72 … … 102 102 WebGLSync*, 103 103 WebGLTexture*, 104 WebGLTransformFeedback*,105 104 WebGLUniformLocation*, 106 105 WebGLVertexArrayObject*, 106 #endif 107 #if ENABLE(WEBGL2) 108 WebGLTransformFeedback*, 107 109 #endif 108 110 RefPtr<ArrayBuffer>, -
trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h
r263403 r263999 236 236 macro(WebGL2RenderingContext) \ 237 237 macro(WebGLVertexArrayObject) \ 238 macro(WebGLTransformFeedback) \ 238 239 macro(WebKitMediaKeyError) \ 239 240 macro(WebKitMediaKeyMessageEvent) \ -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
r263281 r263999 113 113 m_readFramebufferBinding = nullptr; 114 114 m_boundTransformFeedback = nullptr; 115 m_boundTransformFeedbackBuffers.clear();116 115 m_boundTransformFeedbackBuffer = nullptr; 117 116 m_boundUniformBuffer = nullptr; … … 136 135 // NEEDS_PORT: boolean occlusion query, transform feedback primitives written query, elapsed query 137 136 138 int maxTransformFeedbackAttribs = getIntParameter(GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS); 139 ASSERT(maxTransformFeedbackAttribs >= 4); 140 m_boundTransformFeedbackBuffers.resize(maxTransformFeedbackAttribs); 141 142 // NEEDS_PORT: set up default transform feedback object 137 m_maxTransformFeedbackSeparateAttribs = getUnsignedIntParameter(GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS); 138 ASSERT(m_maxTransformFeedbackSeparateAttribs >= 4); 139 140 m_defaultTransformFeedback = createTransformFeedback(); 141 m_context->bindTransformFeedback(GraphicsContextGL::TRANSFORM_FEEDBACK, m_defaultTransformFeedback->object()); 142 m_boundTransformFeedback = m_defaultTransformFeedback; 143 143 144 144 m_boundIndexedUniformBuffers.resize(getIntParameter(GraphicsContextGL::MAX_UNIFORM_BUFFER_BINDINGS)); … … 1786 1786 void WebGL2RenderingContext::deleteTransformFeedback(WebGLTransformFeedback* feedbackObject) 1787 1787 { 1788 if (isContextLostOrPending()) 1789 return; 1788 if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("deleteTransformFeedback", feedbackObject)) 1789 return; 1790 1791 ASSERT(feedbackObject != m_defaultTransformFeedback); 1792 1793 if (feedbackObject->isActive()) { 1794 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "deleteTransformFeedback", "attempt to delete an active transform feedback object"); 1795 return; 1796 } 1790 1797 1791 1798 if (m_boundTransformFeedback == feedbackObject) 1792 m_boundTransformFeedback = nullptr;1799 m_boundTransformFeedback = m_defaultTransformFeedback; 1793 1800 1794 1801 deleteObject(feedbackObject); … … 1818 1825 } 1819 1826 1820 m_context->bindTransformFeedback(target, objectOrZero(feedbackObject)); 1821 m_boundTransformFeedback = feedbackObject; 1827 if (target != GraphicsContextGL::TRANSFORM_FEEDBACK) { 1828 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "bindTransformFeedback", "target must be TRANSFORM_FEEDBACK"); 1829 return; 1830 } 1831 if (m_boundTransformFeedback->isActive() && !m_boundTransformFeedback->isPaused()) { 1832 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bindTransformFeedback", "transform feedback is active and not paused"); 1833 return; 1834 } 1835 1836 auto toBeBound = feedbackObject ? feedbackObject : m_defaultTransformFeedback.get(); 1837 m_context->bindTransformFeedback(target, toBeBound->object()); 1838 m_boundTransformFeedback = toBeBound; 1839 } 1840 1841 static bool ValidateTransformFeedbackPrimitiveMode(GCGLenum mode) 1842 { 1843 switch (mode) { 1844 case GL_POINTS: 1845 case GL_LINES: 1846 case GL_TRIANGLES: 1847 return true; 1848 default: 1849 return false; 1850 } 1822 1851 } 1823 1852 … … 1826 1855 if (isContextLostOrPending()) 1827 1856 return; 1857 1858 if (!ValidateTransformFeedbackPrimitiveMode(primitiveMode)) { 1859 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "beginTransformFeedback", "invalid transform feedback primitive mode"); 1860 return; 1861 } 1862 if (!m_currentProgram) { 1863 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "beginTransformFeedback", "no program is active"); 1864 return; 1865 } 1866 if (m_boundTransformFeedback->isActive()) { 1867 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "beginTransformFeedback", "transform feedback is already active"); 1868 return; 1869 } 1870 int requiredBufferCount = m_currentProgram->requiredTransformFeedbackBufferCount(); 1871 if (!requiredBufferCount) { 1872 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "beginTransformFeedback", "current active program does not specify any transform feedback varyings to record"); 1873 return; 1874 } 1875 if (!m_boundTransformFeedback->hasEnoughBuffers(requiredBufferCount)) { 1876 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "beginTransformFeedback", "not enough transform feedback buffers bound"); 1877 return; 1878 } 1828 1879 1829 1880 m_context->beginTransformFeedback(primitiveMode); 1881 1882 m_boundTransformFeedback->setProgram(*m_currentProgram); 1883 m_boundTransformFeedback->setActive(true); 1884 m_boundTransformFeedback->setPaused(false); 1830 1885 } 1831 1886 … … 1835 1890 return; 1836 1891 1892 if (!m_boundTransformFeedback->isActive()) { 1893 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "endTransformFeedback", "transform feedback is not active"); 1894 return; 1895 } 1896 1837 1897 m_context->endTransformFeedback(); 1898 1899 m_boundTransformFeedback->setPaused(false); 1900 m_boundTransformFeedback->setActive(false); 1838 1901 } 1839 1902 1840 1903 void WebGL2RenderingContext::transformFeedbackVaryings(WebGLProgram& program, const Vector<String>& varyings, GCGLenum bufferMode) 1841 1904 { 1842 if (isContextLostOrPending() || varyings.isEmpty() || !validateWebGLObject("transformFeedbackVaryings", &program)) 1843 return; 1905 if (isContextLostOrPending() || !validateWebGLObject("transformFeedbackVaryings", &program)) 1906 return; 1907 1908 switch (bufferMode) { 1909 case GraphicsContextGL::SEPARATE_ATTRIBS: 1910 if (varyings.size() > m_maxTransformFeedbackSeparateAttribs) { 1911 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "transformFeedbackVaryings", "too many varyings"); 1912 return; 1913 } 1914 break; 1915 case GraphicsContextGL::INTERLEAVED_ATTRIBS: 1916 break; 1917 default: 1918 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "transformFeedbackVaryings", "invalid buffer mode"); 1919 return; 1920 } 1921 program.setRequiredTransformFeedbackBufferCount(bufferMode == GraphicsContextGL::INTERLEAVED_ATTRIBS ? 1 : varyings.size()); 1844 1922 1845 1923 m_context->transformFeedbackVaryings(program.object(), varyings, bufferMode); … … 1862 1940 void WebGL2RenderingContext::pauseTransformFeedback() 1863 1941 { 1864 LOG(WebGL, "[[ NOT IMPLEMENTED ]] pauseTransformFeedback()"); 1942 if (isContextLostOrPending()) 1943 return; 1944 1945 if (!m_boundTransformFeedback->isActive()) { 1946 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "pauseTransformFeedback", "transform feedback is not active"); 1947 return; 1948 } 1949 1950 if (m_boundTransformFeedback->isPaused()) { 1951 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "pauseTransformFeedback", "transform feedback is already paused"); 1952 return; 1953 } 1954 1955 m_boundTransformFeedback->setPaused(true); 1956 m_context->pauseTransformFeedback(); 1865 1957 } 1866 1958 1867 1959 void WebGL2RenderingContext::resumeTransformFeedback() 1868 1960 { 1869 LOG(WebGL, "[[ NOT IMPLEMENTED ]] resumeTransformFeedback()"); 1961 if (isContextLostOrPending()) 1962 return; 1963 1964 if (!m_boundTransformFeedback->validateProgramForResume(m_currentProgram.get())) { 1965 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "resumeTransformFeedback", "the current program is not the same as when beginTransformFeedback was called"); 1966 return; 1967 } 1968 if (!m_boundTransformFeedback->isActive() || !m_boundTransformFeedback->isPaused()) { 1969 synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "resumeTransformFeedback", "transform feedback is not active or not paused"); 1970 return; 1971 } 1972 1973 m_boundTransformFeedback->setPaused(false); 1974 m_context->resumeTransformFeedback(); 1870 1975 } 1871 1976 … … 1880 1985 switch (target) { 1881 1986 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER: 1882 if (index > = m_boundTransformFeedbackBuffers.size()) {1987 if (index > m_maxTransformFeedbackSeparateAttribs) { 1883 1988 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, functionName, "index out of range"); 1884 1989 return false; … … 1901 2006 switch (target) { 1902 2007 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER: 1903 m_boundTransformFeedback Buffers[index] = buffer;2008 m_boundTransformFeedback->setBoundIndexedTransformFeedbackBuffer(index, buffer); 1904 2009 break; 1905 2010 case GraphicsContextGL::UNIFORM_BUFFER: … … 1939 2044 1940 2045 switch (target) { 1941 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING: 1942 if (index >= m_boundTransformFeedbackBuffers.size()) { 2046 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING: { 2047 WebGLBuffer* buffer; 2048 bool success = m_boundTransformFeedback->getBoundIndexedTransformFeedbackBuffer(index, &buffer); 2049 if (!success) { 1943 2050 synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "getIndexedParameter", "index out of range"); 1944 2051 return nullptr; 1945 2052 } 1946 return m_boundTransformFeedbackBuffers[index]; 2053 return makeRefPtr(buffer); 2054 } 1947 2055 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_SIZE: 1948 2056 case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_START: … … 1959 2067 } 1960 2068 return m_boundIndexedUniformBuffers[index]; 1961 return nullptr;1962 2069 default: 1963 2070 synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getIndexedParameter", "invalid parameter name"); … … 2483 2590 } 2484 2591 m_context->hint(target, mode); 2592 } 2593 2594 GCGLuint WebGL2RenderingContext::maxTransformFeedbackSeparateAttribs() const 2595 { 2596 return m_maxTransformFeedbackSeparateAttribs; 2485 2597 } 2486 2598 … … 2693 2805 return m_boundTransformFeedbackBuffer; 2694 2806 case GraphicsContextGL::TRANSFORM_FEEDBACK_BINDING: 2695 // FIXME: NEEDS_PORT: support default transform feedback object. 2696 return m_boundTransformFeedback; 2807 return m_boundTransformFeedback == m_defaultTransformFeedback ? nullptr : m_boundTransformFeedback; 2697 2808 case GraphicsContextGL::TRANSFORM_FEEDBACK_PAUSED: 2698 2809 return getBooleanParameter(pname); … … 3023 3134 REMOVE_BUFFER_FROM_BINDING(m_boundTransformFeedbackBuffer); 3024 3135 REMOVE_BUFFER_FROM_BINDING(m_boundUniformBuffer); 3025 3026 size_t index = m_boundTransformFeedbackBuffers.find(buffer); 3027 if (index < m_boundTransformFeedbackBuffers.size()) 3028 m_boundTransformFeedbackBuffers[index] = nullptr; 3136 m_boundTransformFeedback->unbindBuffer(*buffer); 3029 3137 3030 3138 WebGLRenderingContextBase::uncacheDeletedBuffer(buffer); -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.h
r263281 r263999 247 247 void renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; 248 248 void hint(GCGLenum target, GCGLenum mode) final; 249 GCGLuint maxTransformFeedbackSeparateAttribs() const; 249 250 250 251 private: … … 305 306 RefPtr<WebGLFramebuffer> m_readFramebufferBinding; 306 307 RefPtr<WebGLTransformFeedback> m_boundTransformFeedback; 307 Vector<RefPtr<WebGLBuffer>> m_boundTransformFeedbackBuffers;308 RefPtr<WebGLTransformFeedback> m_defaultTransformFeedback; 308 309 309 310 RefPtr<WebGLBuffer> m_boundCopyReadBuffer; … … 325 326 GCGLint m_unpackSkipImages { 0 }; 326 327 GCGLint m_uniformBufferOffsetAlignment { 0 }; 328 GCGLuint m_maxTransformFeedbackSeparateAttribs { 0 }; 327 329 }; 328 330 -
trunk/Source/WebCore/html/canvas/WebGLProgram.cpp
r260714 r263999 225 225 context->getProgramiv(object(), GraphicsContextGL::LINK_STATUS, &linkStatus); 226 226 m_linkStatus = linkStatus; 227 if (m_linkStatus) 227 if (m_linkStatus) { 228 228 cacheActiveAttribLocations(context); 229 m_requiredTransformFeedbackBufferCount = m_requiredTransformFeedbackBufferCountAfterNextLink; 230 } 229 231 m_infoValid = true; 230 232 } -
trunk/Source/WebCore/html/canvas/WebGLProgram.h
r260415 r263999 70 70 bool attachShader(WebGLShader*); 71 71 bool detachShader(WebGLShader*); 72 73 void setRequiredTransformFeedbackBufferCount(int count) 74 { 75 m_requiredTransformFeedbackBufferCountAfterNextLink = count; 76 } 77 int requiredTransformFeedbackBufferCount() 78 { 79 cacheInfoIfNeeded(); 80 return m_requiredTransformFeedbackBufferCount; 81 } 72 82 73 83 private: … … 90 100 91 101 bool m_infoValid { true }; 102 int m_requiredTransformFeedbackBufferCountAfterNextLink { 0 }; 103 int m_requiredTransformFeedbackBufferCount { 0 }; 92 104 }; 93 105 -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.cpp
r254481 r263999 26 26 #include "config.h" 27 27 28 #if ENABLE(WEBGL )28 #if ENABLE(WEBGL2) 29 29 #include "WebGLTransformFeedback.h" 30 30 … … 34 34 namespace WebCore { 35 35 36 Ref<WebGLTransformFeedback> WebGLTransformFeedback::create(WebGL RenderingContextBase& ctx)36 Ref<WebGLTransformFeedback> WebGLTransformFeedback::create(WebGL2RenderingContext& ctx) 37 37 { 38 38 return adoptRef(*new WebGLTransformFeedback(ctx)); … … 44 44 } 45 45 46 WebGLTransformFeedback::WebGLTransformFeedback(WebGL RenderingContextBase& ctx)46 WebGLTransformFeedback::WebGLTransformFeedback(WebGL2RenderingContext& ctx) 47 47 : WebGLSharedObject(ctx) 48 48 { 49 49 setObject(ctx.graphicsContextGL()->createTransformFeedback()); 50 m_boundIndexedTransformFeedbackBuffers.resize(ctx.maxTransformFeedbackSeparateAttribs()); 50 51 } 51 52 … … 55 56 } 56 57 58 void WebGLTransformFeedback::setProgram(WebGLProgram& program) 59 { 60 m_program = &program; 61 m_programLinkCount = program.getLinkCount(); 57 62 } 58 63 59 #endif // ENABLE(WEBGL) 64 void WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer(GCGLuint index, WebGLBuffer* buffer) 65 { 66 ASSERT(index < m_boundIndexedTransformFeedbackBuffers.size()); 67 m_boundIndexedTransformFeedbackBuffers[index] = buffer; 68 } 69 70 bool WebGLTransformFeedback::getBoundIndexedTransformFeedbackBuffer(GCGLuint index, WebGLBuffer** outBuffer) 71 { 72 if (index > m_boundIndexedTransformFeedbackBuffers.size()) 73 return false; 74 *outBuffer = m_boundIndexedTransformFeedbackBuffers[index].get(); 75 return true; 76 } 77 78 bool WebGLTransformFeedback::hasEnoughBuffers(GCGLuint numRequired) const 79 { 80 if (numRequired > m_boundIndexedTransformFeedbackBuffers.size()) 81 return false; 82 for (GCGLuint i = 0; i < numRequired; i++) { 83 if (!m_boundIndexedTransformFeedbackBuffers[i].get()) 84 return false; 85 } 86 return true; 87 } 88 89 void WebGLTransformFeedback::unbindBuffer(WebGLBuffer& buffer) 90 { 91 for (auto& boundBuffer : m_boundIndexedTransformFeedbackBuffers) { 92 if (boundBuffer == &buffer) 93 boundBuffer = nullptr; 94 } 95 } 96 97 bool WebGLTransformFeedback::validateProgramForResume(WebGLProgram* program) const 98 { 99 return program && m_program == program && program->getLinkCount() == m_programLinkCount; 100 } 101 102 } 103 104 #endif // ENABLE(WEBGL2) -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.h
r260415 r263999 26 26 #pragma once 27 27 28 #if ENABLE(WEBGL )28 #if ENABLE(WEBGL2) 29 29 30 #include "WebGL2RenderingContext.h" 30 31 #include "WebGLSharedObject.h" 31 32 … … 36 37 virtual ~WebGLTransformFeedback(); 37 38 38 static Ref<WebGLTransformFeedback> create(WebGLRenderingContextBase&); 39 static Ref<WebGLTransformFeedback> create(WebGL2RenderingContext&); 40 41 bool isActive() const { return m_active; } 42 bool isPaused() const { return m_paused; } 43 44 void setActive(bool active) { m_active = active; } 45 void setPaused(bool paused) { m_paused = paused; } 46 47 // These are the indexed bind points for transform feedback buffers. 48 // Returns false if index is out of range and the caller should 49 // synthesize a GL error. 50 void setBoundIndexedTransformFeedbackBuffer(GCGLuint index, WebGLBuffer*); 51 bool getBoundIndexedTransformFeedbackBuffer(GCGLuint index, WebGLBuffer** outBuffer); 52 53 bool validateProgramForResume(WebGLProgram*) const; 39 54 55 bool hasEverBeenBound() const { return object() && m_hasEverBeenBound; } 56 void setHasEverBeenBound() { m_hasEverBeenBound = true; } 57 58 WebGLProgram* program() const { return m_program.get(); } 59 void setProgram(WebGLProgram&); 60 61 void unbindBuffer(WebGLBuffer&); 62 63 bool hasEnoughBuffers(GCGLuint numRequired) const; 40 64 private: 41 WebGLTransformFeedback(WebGL RenderingContextBase&);65 WebGLTransformFeedback(WebGL2RenderingContext&); 42 66 43 67 void deleteObjectImpl(GraphicsContextGLOpenGL*, PlatformGLObject) override; 68 69 bool m_active { false }; 70 bool m_paused { false }; 71 bool m_hasEverBeenBound { false }; 72 unsigned m_programLinkCount { 0 }; 73 Vector<RefPtr<WebGLBuffer>> m_boundIndexedTransformFeedbackBuffers; 74 RefPtr<WebGLProgram> m_program; 44 75 }; 45 76 -
trunk/Source/WebCore/html/canvas/WebGLTransformFeedback.idl
r178963 r263999 25 25 26 26 [ 27 Conditional=WEBGL 27 Conditional=WEBGL2, 28 EnabledAtRuntime=WebGL2 28 29 ] interface WebGLTransformFeedback { 29 30 }; -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
r263281 r263999 1930 1930 void GraphicsContextGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) 1931 1931 { 1932 getExtensions().vertexAttribDivisor(index, divisor); 1932 if (m_isForWebGL2) 1933 gl::VertexAttribDivisor(index, divisor); 1934 else 1935 getExtensions().vertexAttribDivisor(index, divisor); 1933 1936 } 1934 1937
Note: See TracChangeset
for help on using the changeset viewer.