Bug 223360

Summary: webgl/2.0.y/conformance2/vertex_arrays/vertex-array-object.html fails
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebGLAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, changseok, dino, esprehn+autocc, ews-watchlist, gyuyoung.kim, kbr, kkinnunen, kondapallykalyan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 222812    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Kimmo Kinnunen
Reported 2021-03-17 00:49:36 PDT
webgl/2.0.1/conformance2/vertex_arrays/vertex-array-object.html fails https://www.khronos.org/registry/webgl/sdk/tests/conformance2/vertex_arrays/vertex-array-object.html?webglVersion=2&quiet=0&quick=1 This test verifies the functionality of the Vertex Array Objects. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS WebGL context exists Testing binding enum PASS gl.VERTEX_ARRAY_BINDING is 0x85B5 PASS getError was expected value: NO_ERROR : VERTEX_ARRAY_BINDING query should succeed PASS Default value of VERTEX_ARRAY_BINDING is null Testing binding a VAO PASS gl.getParameter(gl.VERTEX_ARRAY_BINDING) is null PASS gl.getParameter(gl.VERTEX_ARRAY_BINDING) is expected VAO PASS gl.getParameter(gl.VERTEX_ARRAY_BINDING) is expected VAO PASS gl.getParameter(gl.VERTEX_ARRAY_BINDING) is null PASS getError was expected value: INVALID_OPERATION : binding a deleted vertex array object PASS gl.getParameter(gl.VERTEX_ARRAY_BINDING) is null Testing object creation PASS getError was expected value: NO_ERROR : createVertexArray should not set an error PASS vao is non-null. PASS gl.isVertexArray(vao) is false PASS gl.isVertexArray(vao) is true PASS gl.isVertexArray(vao) is true PASS gl.isVertexArray(null) is false Testing attributes work across bindings PASS All attributes preserved across bindings Testing that attribute values are not attached to bindings PASS Vertex attribute values are not attached to bindings Testing draws with various VAO bindings PASS Draw 0 passed pixel test PASS Draw 1 passed pixel test PASS Draw 2 passed pixel test PASS should be green PASS should be green Testing using buffers that are deleted when attached to unbound VAOs PASS should be 255,0,0,255 PASS should be 0,255,0,255 PASS should be 0,0,255,255 PASS should be 0,255,255,255 Testing using buffers that are deleted when attached to bound VAOs FAIL getError expected: INVALID_OPERATION. Was NO_ERROR : Draw call should fail. PASS getError was expected value: NO_ERROR : Draw call should not fail. PASS getError was expected value: NO_ERROR : Draw call should not fail. PASS getError was expected value: NO_ERROR : Draw call should not fail. Testing that VAOs don't effect ARRAY_BUFFER binding. PASS should be red PASS should be green PASS getError was expected value: NO_ERROR : there should be no errors PASS successfullyParsed is true TEST COMPLETE
Attachments
Patch (22.79 KB, patch)
2021-09-08 06:47 PDT, Kimmo Kinnunen
no flags
Patch (23.27 KB, patch)
2021-09-08 07:52 PDT, Kimmo Kinnunen
no flags
Patch (23.45 KB, patch)
2021-09-08 13:08 PDT, Kimmo Kinnunen
no flags
Kimmo Kinnunen
Comment 1 2021-03-17 01:45:44 PDT
At least macOS 11.3, iMacPro1,1, Radeon Pro Vega 56
Radar WebKit Bug Importer
Comment 2 2021-03-24 00:50:13 PDT
Kimmo Kinnunen
Comment 3 2021-09-08 06:47:23 PDT
Kimmo Kinnunen
Comment 4 2021-09-08 07:52:16 PDT
Dean Jackson
Comment 5 2021-09-08 10:58:58 PDT
Comment on attachment 437627 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=437627&action=review > Source/WebCore/ChangeLog:14 > + WebGL specific constraint is not checked by ANGLE. Add this check to > + WebCore. Shouldn't this be in ANGLE when validating against WebGL?
Kimmo Kinnunen
Comment 6 2021-09-08 12:09:40 PDT
(In reply to Dean Jackson from comment #5) > Comment on attachment 437627 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=437627&action=review > > > Source/WebCore/ChangeLog:14 > > + WebGL specific constraint is not checked by ANGLE. Add this check to > > + WebCore. > > Shouldn't this be in ANGLE when validating against WebGL? This should be said about 90% of the `validate*` functions. But you're right, there's something special about this logic that I failed to express when writing the ChangeLog. I'll revise it: The problem is that when doing the ANGLE side VAO update on buffer delete, WebCore relies on deleting the ANGLE side buffer. This works when the deleted buffer is in only one VAO. However, when buffer is shared by multiple bindings, the ANGLE side buffer is not deleted until last binding is freed. Thus from ANGLE's perspective the buffer is in the VAO and the validation passes.
Kenneth Russell
Comment 7 2021-09-08 12:16:06 PDT
Comment on attachment 437627 [details] Patch Great; yes, this validation was most easily implemented in the browser's code rather than down in ANGLE due to the object lifetimes and the needed caching. (All objects bound into the WebGL context have to have mirrors at the C++ level; this includes vertex array objects.)
Kimmo Kinnunen
Comment 8 2021-09-08 13:08:41 PDT
EWS
Comment 9 2021-09-08 22:28:01 PDT
Committed r282192 (241479@main): <https://commits.webkit.org/241479@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 437659 [details].
Note You need to log in before you can comment on or make changes to this bug.