12021-09-08 Kimmo Kinnunen <kkinnunen@apple.com>
2
3 webgl/2.0.y/conformance2/vertex_arrays/vertex-array-object.html fails
4 https://bugs.webkit.org/show_bug.cgi?id=223360
5 <rdar://problem/75774546>
6
7 Reviewed by NOBODY (OOPS!).
8
9 Deleting a buffer will remove the buffer from currently active
10 vertex array buffer bindings. This worked.
11 Drawing with a vertex array object that has enabled indexes
12 but missing buffers for those indexes should fail. This
13 WebGL specific constraint is not checked by ANGLE. Add this check to
14 WebCore.
15
16 Fixed tests:
17 webgl/1.0.x/conformance/extensions/oes-vertex-array-object.html
18 webgl/2.0.y/conformance2/vertex_arrays/vertex-array-object.html
19
20 * html/canvas/WebGL2RenderingContext.cpp:
21 (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
22 (WebCore::WebGL2RenderingContext::drawRangeElements):
23 * html/canvas/WebGLRenderingContext.cpp:
24 (WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
25 * html/canvas/WebGLRenderingContextBase.cpp:
26 (WebCore::WebGLRenderingContextBase::disableVertexAttribArray):
27 (WebCore::WebGLRenderingContextBase::validateVertexArrayObject):
28 (WebCore::WebGLRenderingContextBase::drawArrays):
29 (WebCore::WebGLRenderingContextBase::drawElements):
30 (WebCore::WebGLRenderingContextBase::enableVertexAttribArray):
31 (WebCore::WebGLRenderingContextBase::vertexAttribPointer):
32 (WebCore::WebGLRenderingContextBase::initVertexAttrib0):
33 (WebCore::WebGLRenderingContextBase::drawArraysInstanced):
34 (WebCore::WebGLRenderingContextBase::drawElementsInstanced):
35 * html/canvas/WebGLRenderingContextBase.h:
36 * html/canvas/WebGLVertexArrayObjectBase.cpp:
37 (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
38 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribEnabled):
39 (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState):
40 (WebCore::WebGLVertexArrayObjectBase::unbindBuffer):
41 (WebCore::WebGLVertexArrayObjectBase::updateVertexAttrib0):
42 (WebCore::WebGLVertexArrayObjectBase::areAllEnabledAttribBuffersBound):
43 * html/canvas/WebGLVertexArrayObjectBase.h:
44 (WebCore::WebGLVertexArrayObjectBase::getVertexAttribState):
45 Make VertexAttribState& a const so that we can maintain confidence
46 that the cached value of "all enabled attrib buffers are bound"
47 is maintained, e.g. that the callers cannot modify enabled or bound
48 buffer status.
49