WebKit Bugzilla
Attachment 346439 Details for
Bug 188291
: WebGL 2 conformance: vertex_arrays/vertex_array_object.html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-188291-20180802180327.patch (text/plain), 8.09 KB, created by
Justin Fan
on 2018-08-02 18:03:27 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Justin Fan
Created:
2018-08-02 18:03:27 PDT
Size:
8.09 KB
patch
obsolete
>Subversion Revision: 234382 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 422ba3ddc8018a461ec404ba99901dc1bb78226b..747c0bcbd72ececfd15d272f04c8944f89762acf 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,29 @@ >+2018-08-02 Justin Fan <justin_fan@apple.com> >+ >+ WebGL 2 conformance: vertex_arrays/vertex_array_object.html >+ https://bugs.webkit.org/show_bug.cgi?id=188291 >+ <rdar://problem/42792709> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Get https://www.khronos.org/registry/webgl/conformance-suites/2.0.0/conformance2/vertex_arrays/vertex-array-object.html >+ working on Mac OS and iOS, and check in the new test expectation. >+ >+ Test: webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object.html >+ >+ * html/canvas/WebGL2RenderingContext.cpp: >+ (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects): >+ (WebCore::WebGL2RenderingContext::deleteVertexArray): >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::WebGLRenderingContextBase::deleteBuffer): >+ * html/canvas/WebGLVertexArrayObject.cpp: >+ (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): >+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: >+ (WebCore::GraphicsContext3D::createVertexArray): >+ (WebCore::GraphicsContext3D::deleteVertexArray): >+ (WebCore::GraphicsContext3D::isVertexArray): >+ (WebCore::GraphicsContext3D::bindVertexArray): >+ > 2018-07-30 Justin Fan <justin_fan@apple.com> > > [WebGL2] Support compilation of GLSL ES version 300 shaders >diff --git a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >index ba82dabab4ad2b2c4f6519854c54cee7081b8cf4..0904bc790e0e7a73a8fd81e08419e09ed176834f 100644 >--- a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >+++ b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >@@ -95,7 +95,11 @@ void WebGL2RenderingContext::initializeVertexArrayObjects() > { > m_defaultVertexArrayObject = WebGLVertexArrayObject::create(*this, WebGLVertexArrayObject::Type::Default); > addContextObject(*m_defaultVertexArrayObject); >+#if !USE(OPENGL_ES) >+ bindVertexArray(nullptr); // WebGL, unlike OpenGL 3.3+, expects a bound default VAO. >+#else > m_boundVertexArrayObject = m_defaultVertexArrayObject; >+#endif > if (!isGLES2Compliant()) > initVertexAttrib0(); > } >@@ -1063,7 +1067,11 @@ void WebGL2RenderingContext::deleteVertexArray(WebGLVertexArrayObject* arrayObje > return; > > if (!arrayObject->isDefaultObject() && arrayObject == m_boundVertexArrayObject) >+#if !USE(OPENGL_ES) >+ bindVertexArray(nullptr); // WebGL, unlike OpenGL 3.3+, expects a bound default VAO. >+#else > setBoundVertexArrayObject(nullptr); >+#endif > > arrayObject->deleteObject(graphicsContext3D()); > } >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >index fe8375b0abb1098ab9fc9c4d9dd089f2c8e78430..0ebf33724a3ed1481b27199c36c00c37042d77f3 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >@@ -1777,7 +1777,7 @@ bool WebGLRenderingContextBase::deleteObject(WebGLObject* object) > > void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer) > { >- if (!deleteObject(buffer)) >+ if (buffer->isDeleted() || !deleteObject(buffer)) > return; > if (m_boundArrayBuffer == buffer) > m_boundArrayBuffer = nullptr; >diff --git a/Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp b/Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp >index 89ae21f33ef8588cd18d4031c857aa8a144e5540..1b3257ceb2da2efcc1f101e071171d86b6e1af98 100644 >--- a/Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp >+++ b/Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp >@@ -46,13 +46,13 @@ WebGLVertexArrayObject::~WebGLVertexArrayObject() > WebGLVertexArrayObject::WebGLVertexArrayObject(WebGLRenderingContextBase& context, Type type) > : WebGLVertexArrayObjectBase(context, type) > { >- switch (m_type) { >- case Type::Default: >- break; >- case Type::User: >- setObject(this->context()->graphicsContext3D()->createVertexArray()); >- break; >- } >+#if !USE(OPENGL_ES) >+ ASSERT(!(type == Type::Default && this->context()->m_defaultVertexArrayObject)); >+#else >+ if (m_type != Type::User) >+ return; >+#endif >+ setObject(this->context()->graphicsContext3D()->createVertexArray()); > } > > void WebGLVertexArrayObject::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObject object) >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >index f41236e00306da0fe7eae0be567e913b8e643b22..fd87d32d7b7dc0234565ea5dd0487eb07cfcd267 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >@@ -1525,11 +1525,7 @@ Platform3DObject GraphicsContext3D::createVertexArray() > { > makeContextCurrent(); > GLuint array = 0; >-#if !USE(OPENGL_ES) && (PLATFORM(GTK) || PLATFORM(WIN)) >- glGenVertexArrays(1, &array); >-#elif defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object >- glGenVertexArraysAPPLE(1, &array); >-#endif >+ ::glGenVertexArrays(1, &array); > return array; > } > >@@ -1539,11 +1535,7 @@ void GraphicsContext3D::deleteVertexArray(Platform3DObject array) > return; > > makeContextCurrent(); >-#if !USE(OPENGL_ES) && (PLATFORM(GTK) || PLATFORM(WIN)) >- glDeleteVertexArrays(1, &array); >-#elif defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object >- glDeleteVertexArraysAPPLE(1, &array); >-#endif >+ ::glDeleteVertexArrays(1, &array); > } > > GC3Dboolean GraphicsContext3D::isVertexArray(Platform3DObject array) >@@ -1552,24 +1544,13 @@ GC3Dboolean GraphicsContext3D::isVertexArray(Platform3DObject array) > return GL_FALSE; > > makeContextCurrent(); >-#if !USE(OPENGL_ES) && (PLATFORM(GTK) || PLATFORM(WIN)) >- return glIsVertexArray(array); >-#elif defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object >- return glIsVertexArrayAPPLE(array); >-#endif >- return GL_FALSE; >+ return ::glIsVertexArray(array); > } > > void GraphicsContext3D::bindVertexArray(Platform3DObject array) > { > makeContextCurrent(); >-#if !USE(OPENGL_ES) && (PLATFORM(GTK) || PLATFORM(WIN)) >- glBindVertexArray(array); >-#elif defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object >- glBindVertexArrayAPPLE(array); >-#else >- UNUSED_PARAM(array); >-#endif >+ ::glBindVertexArray(array); > } > > void GraphicsContext3D::getBooleanv(GC3Denum pname, GC3Dboolean* value) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 39fd83f2d616e83e22bf6ea50468ac8781105834..6eb915233837243789740e373edddef2fc43c4a5 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-02 Justin Fan <justin_fan@apple.com> >+ >+ WebGL 2 conformance: vertex_arrays/vertex_array_object.html >+ https://bugs.webkit.org/show_bug.cgi?id=188291 >+ <rdar://problem/42792709> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestExpectations: Enable the vertex_array test directory for WebGL 2. >+ > 2018-07-30 Justin Fan <justin_fan@apple.com> > > [WebGL2] Support compilation of GLSL ES version 300 shaders >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 2c7f6dc1be9e844eb6ce226f01e98c6e6dcd75ba..e3b923fc93f6fff5d9215c32a20c582a971f6523 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -2055,6 +2055,7 @@ webkit.org/b/186574 media/video-buffering-allowed.html [ Pass Failure ] > # All WebGL 1 and 2 tests for now > webgl/2.0.0 [ Skip ] > webgl/2.0.0/conformance2/glsl3 [ Pass ] >+webgl/2.0.0/conformance2/vertex_arrays [ Pass ] > > imported/w3c/web-platform-tests/css/css-display/run-in/run-in-contains-table-row-001.xht [ ImageOnlyFailure ] > imported/w3c/web-platform-tests/css/css-text-decor/text-emphasis-style-008.html [ ImageOnlyFailure ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188291
:
346439
|
346442
|
346443
|
346445
|
346450
|
346456
|
346491
|
346553
|
346555