[WebGL 2] Implement transform feedback and pass transform feedback conformance tests
authorjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2020 02:34:34 +0000 (02:34 +0000)
committerjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jan 2020 02:34:34 +0000 (02:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=205823

Reviewed by Dean Jackson.

Source/WebCore:

Covered by webgl/2.0.0/conformance2/transform_feedback conformance tests.

* bindings/js/JSDOMConvertWebGL.cpp:
(WebCore::convertToJSValue):
* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::~WebGL2RenderingContext):
(WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache):
(WebCore::WebGL2RenderingContext::getBufferSubData): ANGLE validation in mapBufferRange may fail; prevent copying from a nullptr.
(WebCore::WebGL2RenderingContext::vertexAttribIPointer):

Bare minimum stubs to get WebGLQuery passing transform_feedback tests:
(WebCore::WebGL2RenderingContext::createQuery):
(WebCore::WebGL2RenderingContext::beginQuery):
(WebCore::WebGL2RenderingContext::endQuery):
(WebCore::WebGL2RenderingContext::getQueryParameter):
(WebCore::WebGLQuery::WebGLQuery):
* html/canvas/WebGLQuery.h:

Transform feedback functions:
(WebCore::WebGL2RenderingContext::createTransformFeedback):
(WebCore::WebGL2RenderingContext::deleteTransformFeedback):
(WebCore::WebGL2RenderingContext::isTransformFeedback):
(WebCore::WebGL2RenderingContext::bindTransformFeedback):
(WebCore::WebGL2RenderingContext::beginTransformFeedback):
(WebCore::WebGL2RenderingContext::endTransformFeedback):
(WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
(WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
* html/canvas/WebGLTransformFeedback.cpp:
(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
(WebCore::WebGLTransformFeedback::deleteObjectImpl):

Misc functions that needed added functionality:
(WebCore::WebGL2RenderingContext::bindBufferBase):
(WebCore::WebGL2RenderingContext::getIndexedParameter):
(WebCore::WebGL2RenderingContext::getParameter):

Helper functions to track WebGL2 state/objects:
(WebCore::WebGL2RenderingContext::uncacheDeletedBuffer):
* html/canvas/WebGL2RenderingContext.h:
* html/canvas/WebGLAny.h:
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::setTarget):
* html/canvas/WebGLBuffer.h:
* html/canvas/WebGLQuery.cpp:
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
(WebCore::WebGLRenderingContextBase::bindBuffer):
(WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer):
(WebCore::WebGLRenderingContextBase::deleteBuffer):
(WebCore::WebGLRenderingContextBase::getProgramParameter):
* html/canvas/WebGLRenderingContextBase.h:

Pipe new GraphicsContextGL methods to ANGLE:
* platform/graphics/GraphicsContextGL.h:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
(WebCore::GraphicsContextGLOpenGL::createQuery):
(WebCore::GraphicsContextGLOpenGL::beginQuery):
(WebCore::GraphicsContextGLOpenGL::endQuery):
(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::bindBufferBase):

Add missing unrelated GraphicsContextGL stubs for ANGLE builds:
* platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
(WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
(WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
(WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
(WebCore::GraphicsContextGLOpenGL::createQuery):
(WebCore::GraphicsContextGLOpenGL::beginQuery):
(WebCore::GraphicsContextGLOpenGL::endQuery):
(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::bindBufferBase):
(WebCore::GraphicsContextGLOpenGL::bufferData):
(WebCore::GraphicsContextGLOpenGL::bufferSubData):
(WebCore::GraphicsContextGLOpenGL::getBufferSubData):
(WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
(WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
(WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
(WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
(WebCore::GraphicsContextGLOpenGL::readBuffer):
(WebCore::GraphicsContextGLOpenGL::texImage3D):
(WebCore::GraphicsContextGLOpenGL::texSubImage3D):
(WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
(WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
(WebCore::GraphicsContextGLOpenGL::uniform1ui):
(WebCore::GraphicsContextGLOpenGL::uniform2ui):
(WebCore::GraphicsContextGLOpenGL::uniform3ui):
(WebCore::GraphicsContextGLOpenGL::uniform4ui):
(WebCore::GraphicsContextGLOpenGL::uniform1uiv):
(WebCore::GraphicsContextGLOpenGL::uniform2uiv):
(WebCore::GraphicsContextGLOpenGL::uniform3uiv):
(WebCore::GraphicsContextGLOpenGL::uniform4uiv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
(WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
(WebCore::GraphicsContextGLOpenGL::drawRangeElements):
(WebCore::GraphicsContextGLOpenGL::drawBuffers):
(WebCore::GraphicsContextGLOpenGL::clearBufferiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfv):
(WebCore::GraphicsContextGLOpenGL::clearBufferfi):
(WebCore::GraphicsContextGLOpenGL::deleteQuery):
(WebCore::GraphicsContextGLOpenGL::isQuery):
(WebCore::GraphicsContextGLOpenGL::getQuery):
(WebCore::GraphicsContextGLOpenGL::createSampler):
(WebCore::GraphicsContextGLOpenGL::deleteSampler):
(WebCore::GraphicsContextGLOpenGL::isSampler):
(WebCore::GraphicsContextGLOpenGL::bindSampler):
(WebCore::GraphicsContextGLOpenGL::samplerParameteri):
(WebCore::GraphicsContextGLOpenGL::samplerParameterf):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
(WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):
(WebCore::GraphicsContextGLOpenGL::fenceSync):
(WebCore::GraphicsContextGLOpenGL::isSync):
(WebCore::GraphicsContextGLOpenGL::deleteSync):
(WebCore::GraphicsContextGLOpenGL::clientWaitSync):
(WebCore::GraphicsContextGLOpenGL::waitSync):
(WebCore::GraphicsContextGLOpenGL::getSynciv):
(WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
(WebCore::GraphicsContextGLOpenGL::bindBufferRange):
(WebCore::GraphicsContextGLOpenGL::getUniformIndices):
(WebCore::GraphicsContextGLOpenGL::texImage2D):
(WebCore::GraphicsContextGLOpenGL::texSubImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
(WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
(WebCore::GraphicsContextGLOpenGL::uniform1fv):
(WebCore::GraphicsContextGLOpenGL::uniform2fv):
(WebCore::GraphicsContextGLOpenGL::uniform3fv):
(WebCore::GraphicsContextGLOpenGL::uniform4fv):
(WebCore::GraphicsContextGLOpenGL::uniform1iv):
(WebCore::GraphicsContextGLOpenGL::uniform2iv):
(WebCore::GraphicsContextGLOpenGL::uniform3iv):
(WebCore::GraphicsContextGLOpenGL::uniform4iv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
(WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
(WebCore::GraphicsContextGLOpenGL::readPixels):

* platform/graphics/opengl/GraphicsContextGLOpenGL.h:
* platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
(WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
(WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLOpenGL::glGetQueryObjectuiv): Deleted.

LayoutTests:

Add passing results for transform_feedback, as expected when ANGLE is enabled.

* webgl/2.0.0/conformance2/transform_feedback/two-unreferenced-varyings-expected.txt:
* webgl/2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/webgl/2.0.0/conformance2/transform_feedback/two-unreferenced-varyings-expected.txt
LayoutTests/webgl/2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMConvertWebGL.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGL2RenderingContext.h
Source/WebCore/html/canvas/WebGLAny.h
Source/WebCore/html/canvas/WebGLBuffer.cpp
Source/WebCore/html/canvas/WebGLBuffer.h
Source/WebCore/html/canvas/WebGLQuery.cpp
Source/WebCore/html/canvas/WebGLQuery.h
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/html/canvas/WebGLTransformFeedback.cpp
Source/WebCore/platform/graphics/GraphicsContextGL.h
Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h
Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp

index 1c0596e..82752b7 100644 (file)
@@ -1,3 +1,15 @@
+2020-01-13  Justin Fan  <justin_fan@apple.com>
+
+        [WebGL 2] Implement transform feedback and pass transform feedback conformance tests
+        https://bugs.webkit.org/show_bug.cgi?id=205823
+
+        Reviewed by Dean Jackson.
+
+        Add passing results for transform_feedback, as expected when ANGLE is enabled.
+
+        * webgl/2.0.0/conformance2/transform_feedback/two-unreferenced-varyings-expected.txt:
+        * webgl/2.0.0/conformance2/transform_feedback/unwritten-output-defaults-to-zero-expected.txt:
+
 2020-01-13  Chris Lord  <clord@igalia.com>
 
         REGRESSION(r253683): [GTK][WPE] Lots of offscreen-canvas WPT tests failing
index ab447e3..647ae94 100644 (file)
@@ -1,10 +1,5 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance2/transform_feedback/two-unreferenced-varyings.html
-[ 1: PASS ] WebGL context exists
-[ 2: PASS ] getError was expected value: NO_ERROR : Init transform feedback should succeed
-[ 3: PASS ] getError was expected value: NO_ERROR : Draw with transform feedback should succeed
-[ 4: FAIL ] buffer should match expected values
-[ 5: PASS ] successfullyParsed is true
-[ FAIL ] 1 failures reported
+[ PASS ] All tests passed
 
index 29c9a1e..6974da4 100644 (file)
@@ -1,11 +1,5 @@
 This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.
 
 Test: ../../resources/webgl_test_files/conformance2/transform_feedback/unwritten-output-defaults-to-zero.html
-[ 1: PASS ] WebGL context exists
-[ 2: PASS ] getError was expected value: NO_ERROR : Set up program should succeed
-[ 3: FAIL ] buffer should match expected values
-[ 4: PASS ] getError was expected value: NO_ERROR : Set up program should succeed
-[ 5: PASS ] buffer should match expected values
-[ 6: PASS ] successfullyParsed is true
-[ FAIL ] 1 failures reported
+[ PASS ] All tests passed
 
index 81c0c90..5e74aec 100644 (file)
@@ -1,3 +1,183 @@
+2020-01-13  Justin Fan  <justin_fan@apple.com>
+
+        [WebGL 2] Implement transform feedback and pass transform feedback conformance tests
+        https://bugs.webkit.org/show_bug.cgi?id=205823
+
+        Reviewed by Dean Jackson.
+
+        Covered by webgl/2.0.0/conformance2/transform_feedback conformance tests.
+
+        * bindings/js/JSDOMConvertWebGL.cpp:
+        (WebCore::convertToJSValue):
+        * html/canvas/WebGL2RenderingContext.cpp:
+        (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
+        (WebCore::WebGL2RenderingContext::~WebGL2RenderingContext):
+        (WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache):
+        (WebCore::WebGL2RenderingContext::getBufferSubData): ANGLE validation in mapBufferRange may fail; prevent copying from a nullptr. 
+        (WebCore::WebGL2RenderingContext::vertexAttribIPointer):
+
+        Bare minimum stubs to get WebGLQuery passing transform_feedback tests:
+        (WebCore::WebGL2RenderingContext::createQuery):
+        (WebCore::WebGL2RenderingContext::beginQuery):
+        (WebCore::WebGL2RenderingContext::endQuery):
+        (WebCore::WebGL2RenderingContext::getQueryParameter):
+        (WebCore::WebGLQuery::WebGLQuery):
+        * html/canvas/WebGLQuery.h:
+
+        Transform feedback functions:
+        (WebCore::WebGL2RenderingContext::createTransformFeedback):
+        (WebCore::WebGL2RenderingContext::deleteTransformFeedback):
+        (WebCore::WebGL2RenderingContext::isTransformFeedback):
+        (WebCore::WebGL2RenderingContext::bindTransformFeedback):
+        (WebCore::WebGL2RenderingContext::beginTransformFeedback):
+        (WebCore::WebGL2RenderingContext::endTransformFeedback):
+        (WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
+        (WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
+        * html/canvas/WebGLTransformFeedback.cpp:
+        (WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
+        (WebCore::WebGLTransformFeedback::deleteObjectImpl):
+
+        Misc functions that needed added functionality:
+        (WebCore::WebGL2RenderingContext::bindBufferBase):
+        (WebCore::WebGL2RenderingContext::getIndexedParameter):
+        (WebCore::WebGL2RenderingContext::getParameter):
+
+        Helper functions to track WebGL2 state/objects:
+        (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer):
+        * html/canvas/WebGL2RenderingContext.h:
+        * html/canvas/WebGLAny.h:
+        * html/canvas/WebGLBuffer.cpp:
+        (WebCore::WebGLBuffer::setTarget):
+        * html/canvas/WebGLBuffer.h:
+        * html/canvas/WebGLQuery.cpp:
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding):
+        (WebCore::WebGLRenderingContextBase::bindBuffer):
+        (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer):
+        (WebCore::WebGLRenderingContextBase::deleteBuffer):
+        (WebCore::WebGLRenderingContextBase::getProgramParameter):
+        * html/canvas/WebGLRenderingContextBase.h:
+
+        Pipe new GraphicsContextGL methods to ANGLE:
+        * platform/graphics/GraphicsContextGL.h:
+        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
+        (WebCore::GraphicsContextGLOpenGL::createQuery):
+        (WebCore::GraphicsContextGLOpenGL::beginQuery):
+        (WebCore::GraphicsContextGLOpenGL::endQuery):
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
+        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
+        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):
+
+        Add missing unrelated GraphicsContextGL stubs for ANGLE builds:
+        * platform/graphics/angle/GraphicsContextGLANGLE.cpp:
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribIPointer):
+        (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv):
+        (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName):
+        (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding):
+        (WebCore::GraphicsContextGLOpenGL::createQuery):
+        (WebCore::GraphicsContextGLOpenGL::beginQuery):
+        (WebCore::GraphicsContextGLOpenGL::endQuery):
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
+        (WebCore::GraphicsContextGLOpenGL::createTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::deleteTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::isTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::bindTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::beginTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::endTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::transformFeedbackVaryings):
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
+        (WebCore::GraphicsContextGLOpenGL::bindBufferBase):
+        (WebCore::GraphicsContextGLOpenGL::bufferData):
+        (WebCore::GraphicsContextGLOpenGL::bufferSubData):
+        (WebCore::GraphicsContextGLOpenGL::getBufferSubData):
+        (WebCore::GraphicsContextGLOpenGL::blitFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::framebufferTextureLayer):
+        (WebCore::GraphicsContextGLOpenGL::invalidateFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::invalidateSubFramebuffer):
+        (WebCore::GraphicsContextGLOpenGL::readBuffer):
+        (WebCore::GraphicsContextGLOpenGL::texImage3D):
+        (WebCore::GraphicsContextGLOpenGL::texSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::copyTexSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage3D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage3D):
+        (WebCore::GraphicsContextGLOpenGL::getFragDataLocation):
+        (WebCore::GraphicsContextGLOpenGL::uniform1ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform2ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform3ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform4ui):
+        (WebCore::GraphicsContextGLOpenGL::uniform1uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4uiv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2x4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3x4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4x3fv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4i):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4iv):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4ui):
+        (WebCore::GraphicsContextGLOpenGL::vertexAttribI4uiv):
+        (WebCore::GraphicsContextGLOpenGL::drawRangeElements):
+        (WebCore::GraphicsContextGLOpenGL::drawBuffers):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferiv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferuiv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfv):
+        (WebCore::GraphicsContextGLOpenGL::clearBufferfi):
+        (WebCore::GraphicsContextGLOpenGL::deleteQuery):
+        (WebCore::GraphicsContextGLOpenGL::isQuery):
+        (WebCore::GraphicsContextGLOpenGL::getQuery):
+        (WebCore::GraphicsContextGLOpenGL::createSampler):
+        (WebCore::GraphicsContextGLOpenGL::deleteSampler):
+        (WebCore::GraphicsContextGLOpenGL::isSampler):
+        (WebCore::GraphicsContextGLOpenGL::bindSampler):
+        (WebCore::GraphicsContextGLOpenGL::samplerParameteri):
+        (WebCore::GraphicsContextGLOpenGL::samplerParameterf):
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameterfv):
+        (WebCore::GraphicsContextGLOpenGL::getSamplerParameteriv):
+        (WebCore::GraphicsContextGLOpenGL::fenceSync):
+        (WebCore::GraphicsContextGLOpenGL::isSync):
+        (WebCore::GraphicsContextGLOpenGL::deleteSync):
+        (WebCore::GraphicsContextGLOpenGL::clientWaitSync):
+        (WebCore::GraphicsContextGLOpenGL::waitSync):
+        (WebCore::GraphicsContextGLOpenGL::getSynciv):
+        (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback):
+        (WebCore::GraphicsContextGLOpenGL::bindBufferRange):
+        (WebCore::GraphicsContextGLOpenGL::getUniformIndices):
+        (WebCore::GraphicsContextGLOpenGL::texImage2D):
+        (WebCore::GraphicsContextGLOpenGL::texSubImage2D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexImage2D):
+        (WebCore::GraphicsContextGLOpenGL::compressedTexSubImage2D):
+        (WebCore::GraphicsContextGLOpenGL::uniform1fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4fv):
+        (WebCore::GraphicsContextGLOpenGL::uniform1iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform2iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform3iv):
+        (WebCore::GraphicsContextGLOpenGL::uniform4iv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix2fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix3fv):
+        (WebCore::GraphicsContextGLOpenGL::uniformMatrix4fv):
+        (WebCore::GraphicsContextGLOpenGL::readPixels):
+
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
+        (WebCore::GraphicsContextGLOpenGL::getQueryObjectuiv):
+        (WebCore::GraphicsContextGLOpenGL::getTransformFeedbackVarying):
+        (WebCore::GraphicsContextGLOpenGL::glGetQueryObjectuiv): Deleted.
+
 2020-01-13  Ross Kirsling  <ross.kirsling@sony.com>
 
         Unreviewed build fix for PlayStation and clang-cl.
index 78a4ae6..184b330 100644 (file)
@@ -58,6 +58,7 @@
 #include "JSWebGLProgram.h"
 #include "JSWebGLRenderbuffer.h"
 #include "JSWebGLTexture.h"
+#include "JSWebGLTransformFeedback.h"
 #include "JSWebGLVertexArrayObject.h"
 #include "JSWebGLVertexArrayObjectOES.h"
 #include <JavaScriptCore/JSCInlines.h>
@@ -138,6 +139,9 @@ JSValue convertToJSValue(JSGlobalObject& lexicalGlobalObject, JSDOMGlobalObject&
         ,
         [&] (const RefPtr<WebGLVertexArrayObject>& array) {
             return toJS(&lexicalGlobalObject, &globalObject, array.get());
+        },
+        [&] (const RefPtr<WebGLTransformFeedback>& transformFeedback) {
+            return toJS(&lexicalGlobalObject, &globalObject, transformFeedback.get());
         }
 #endif
     );
index bae9b4b..26514e2 100644 (file)
@@ -30,6 +30,7 @@
 
 #include "CachedImage.h"
 #include "EXTTextureFilterAnisotropic.h"
+#include "EventLoop.h"
 #include "ExtensionsGL.h"
 #include "HTMLCanvasElement.h"
 #include "HTMLImageElement.h"
@@ -95,6 +96,16 @@ WebGL2RenderingContext::WebGL2RenderingContext(CanvasBase& canvas, Ref<GraphicsC
 {
     initializeShaderExtensions();
     initializeVertexArrayObjects();
+    initializeTransformFeedbackBufferCache();
+}
+
+WebGL2RenderingContext::~WebGL2RenderingContext()
+{
+    // Remove all references to WebGLObjects so if they are the last reference
+    // they will be freed before the last context is removed from the context group.
+    m_boundTransformFeedback = nullptr;
+    m_boundTransformFeedbackBuffers.clear();
+    m_activeQueries.clear();
 }
 
 void WebGL2RenderingContext::initializeVertexArrayObjects()
@@ -118,6 +129,14 @@ void WebGL2RenderingContext::initializeShaderExtensions()
     m_context->getExtensions().ensureEnabled("GL_EXT_frag_depth");
 }
 
+void WebGL2RenderingContext::initializeTransformFeedbackBufferCache()
+{
+    int maxTransformFeedbackAttribs = getIntParameter(GraphicsContextGL::MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS);
+    ASSERT(maxTransformFeedbackAttribs >= 4);
+
+    m_boundTransformFeedbackBuffers.resize(maxTransformFeedbackAttribs);
+}
+
 inline static Optional<unsigned> arrayBufferViewElementSize(const ArrayBufferView& data)
 {
     switch (data.getType()) {
@@ -307,7 +326,9 @@ void WebGL2RenderingContext::getBufferSubData(GCGLenum target, long long srcByte
 #if PLATFORM(COCOA)
     // FIXME: Coalesce multiple getBufferSubData() calls to use a single map() call
     void* ptr = m_context->mapBufferRange(target, checkedSrcByteOffset.unsafeGet(), static_cast<GCGLsizeiptr>(checkedCopyLengthPtr.unsafeGet() * checkedElementSize.unsafeGet()), GraphicsContextGL::MAP_READ_BIT);
-    memcpy(static_cast<char*>(dstData->baseAddress()) + dstData->byteOffset() + dstOffset * elementSize, ptr, copyLength * elementSize);
+    if (ptr)
+        memcpy(static_cast<char*>(dstData->baseAddress()) + dstData->byteOffset() + dstOffset * elementSize, ptr, copyLength * elementSize);
+
     if (!m_context->unmapBuffer(target))
         synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Failed while unmapping buffer");
 #endif
@@ -862,9 +883,12 @@ void WebGL2RenderingContext::vertexAttribI4uiv(GCGLuint, Uint32List&&)
     LOG(WebGL, "[[ NOT IMPLEMENTED ]] vertexAttribI4uiv()");
 }
 
-void WebGL2RenderingContext::vertexAttribIPointer(GCGLuint, GCGLint, GCGLenum, GCGLsizei, GCGLint64)
+void WebGL2RenderingContext::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLint64 offset)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] vertexAttribIPointer()");
+    if (isContextLostOrPending())
+        return;
+
+    m_context->vertexAttribIPointer(index, size, type, stride, offset);
 }
 
 void WebGL2RenderingContext::clear(GCGLbitfield mask)
@@ -1042,8 +1066,12 @@ void WebGL2RenderingContext::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer,
 
 RefPtr<WebGLQuery> WebGL2RenderingContext::createQuery()
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] createQuery()");
-    return nullptr;
+    if (isContextLostOrPending())
+        return nullptr;
+
+    auto query = WebGLQuery::create(*this);
+    addSharedObject(query.get());
+    return query;
 }
 
 void WebGL2RenderingContext::deleteQuery(WebGLQuery*)
@@ -1057,14 +1085,45 @@ GCGLboolean WebGL2RenderingContext::isQuery(WebGLQuery*)
     return false;
 }
 
-void WebGL2RenderingContext::beginQuery(GCGLenum, WebGLQuery&)
+void WebGL2RenderingContext::beginQuery(GCGLenum target, WebGLQuery& query)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] beginQuery()");
+    if (isContextLostOrPending())
+        return;
+
+    // FIXME: Add validation to prevent bad caching.
+
+    // Only one query object can be active per target.
+    auto targetKey = (target == GraphicsContextGL::ANY_SAMPLES_PASSED_CONSERVATIVE) ? GraphicsContextGL::ANY_SAMPLES_PASSED : target;
+
+    auto addResult = m_activeQueries.add(targetKey, makeRefPtr(&query));
+
+    if (!addResult.isNewEntry) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "beginQuery", "Query object of target is already active");
+        return;
+    }
+
+    m_context->beginQuery(target, query.object());
 }
 
-void WebGL2RenderingContext::endQuery(GCGLenum)
+void WebGL2RenderingContext::endQuery(GCGLenum target)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] endQuery()");
+    if (isContextLostOrPending() || !scriptExecutionContext())
+        return;
+
+    auto targetKey = (target == GraphicsContextGL::ANY_SAMPLES_PASSED_CONSERVATIVE) ? GraphicsContextGL::ANY_SAMPLES_PASSED : target;
+
+    auto query = m_activeQueries.take(targetKey);
+    if (!query) {
+        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "endQuery", "Query object of target is not active");
+        return;
+    }
+
+    m_context->endQuery(target);
+
+    // A query's result must not be made available until control has returned to the user agent's main loop.
+    scriptExecutionContext()->eventLoop().queueMicrotask([query] {
+        query->makeResultAvailable();
+    });
 }
 
 RefPtr<WebGLQuery> WebGL2RenderingContext::getQuery(GCGLenum, GCGLenum)
@@ -1073,10 +1132,25 @@ RefPtr<WebGLQuery> WebGL2RenderingContext::getQuery(GCGLenum, GCGLenum)
     return nullptr;
 }
 
-WebGLAny WebGL2RenderingContext::getQueryParameter(WebGLQuery&, GCGLenum)
+WebGLAny WebGL2RenderingContext::getQueryParameter(WebGLQuery& query, GCGLenum pname)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] getQueryParameter)");
-    return nullptr;
+    if (isContextLostOrPending())
+        return nullptr;
+
+    switch (pname) {
+    case GraphicsContextGL::QUERY_RESULT:
+    case GraphicsContextGL::QUERY_RESULT_AVAILABLE:
+        if (!query.isResultAvailable())
+            return 0;
+        break;
+    default:
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getQueryParameter", "Invalid pname");
+        return nullptr;
+    }
+
+    unsigned result = 0;
+    m_context->getQueryObjectuiv(query.object(), pname, &result);
+    return result;
 }
 
 RefPtr<WebGLSampler> WebGL2RenderingContext::createSampler()
@@ -1157,45 +1231,88 @@ WebGLAny WebGL2RenderingContext::getSyncParameter(WebGLSync&, GCGLenum)
 
 RefPtr<WebGLTransformFeedback> WebGL2RenderingContext::createTransformFeedback()
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] createTransformFeedback()");
-    return nullptr;
+    if (isContextLostOrPending())
+        return nullptr;
+
+    auto transformFeedback = WebGLTransformFeedback::create(*this);
+    addSharedObject(transformFeedback.get());
+    return transformFeedback;
 }
 
-void WebGL2RenderingContext::deleteTransformFeedback(WebGLTransformFeedback*)
+void WebGL2RenderingContext::deleteTransformFeedback(WebGLTransformFeedback* feedbackObject)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] deleteTransformFeedback()");
+    if (isContextLostOrPending())
+        return;
+
+    if (m_boundTransformFeedback == feedbackObject)
+        m_boundTransformFeedback = nullptr;
+
+    deleteObject(feedbackObject);
 }
 
-GCGLboolean WebGL2RenderingContext::isTransformFeedback(WebGLTransformFeedback*)
+GCGLboolean WebGL2RenderingContext::isTransformFeedback(WebGLTransformFeedback* feedbackObject)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] isTransformFeedback()");
-    return false;
+    if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("isTransformFeedback", feedbackObject))
+        return false;
+
+    return m_context->isTransformFeedback(feedbackObject->object());
 }
 
-void WebGL2RenderingContext::bindTransformFeedback(GCGLenum, WebGLTransformFeedback*)
+void WebGL2RenderingContext::bindTransformFeedback(GCGLenum target, WebGLTransformFeedback* feedbackObject)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] bindTransformFeedback()");
+    if (isContextLostOrPending())
+        return;
+
+    if (feedbackObject) {
+        if (feedbackObject->isDeleted()) {
+            synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bindTransformFeedback", "cannot bind a deleted Transform Feedback object");
+            return;
+        }
+
+        if (!validateWebGLObject("isTransformFeedback", feedbackObject))
+            return;
+    }
+
+    m_context->bindTransformFeedback(target, objectOrZero(feedbackObject));
+    m_boundTransformFeedback = feedbackObject;
 }
 
-void WebGL2RenderingContext::beginTransformFeedback(GCGLenum)
+void WebGL2RenderingContext::beginTransformFeedback(GCGLenum primitiveMode)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] beginTransformFeedback()");
+    if (isContextLostOrPending())
+        return;
+
+    m_context->beginTransformFeedback(primitiveMode);
 }
 
 void WebGL2RenderingContext::endTransformFeedback()
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] endTransformFeedback()");
+    if (isContextLostOrPending())
+        return;
+
+    m_context->endTransformFeedback();
 }
 
-void WebGL2RenderingContext::transformFeedbackVaryings(WebGLProgram&, const Vector<String>&, GCGLenum)
+void WebGL2RenderingContext::transformFeedbackVaryings(WebGLProgram& program, const Vector<String>& varyings, GCGLenum bufferMode)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] transformFeedbackVaryings()");
+    if (isContextLostOrPending() || varyings.isEmpty() || !validateWebGLObject("transformFeedbackVaryings", &program))
+        return;
+
+    m_context->transformFeedbackVaryings(program.object(), varyings, bufferMode);
 }
 
-RefPtr<WebGLActiveInfo> WebGL2RenderingContext::getTransformFeedbackVarying(WebGLProgram&, GCGLuint)
+RefPtr<WebGLActiveInfo> WebGL2RenderingContext::getTransformFeedbackVarying(WebGLProgram& program, GCGLuint index)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] getTransformFeedbackVarying()");
-    return nullptr;
+    if (isContextLostOrPending() || !validateWebGLObject("getTransformFeedbackVarying", &program))
+        return nullptr;
+
+    GraphicsContextGL::ActiveInfo info;
+    m_context->getTransformFeedbackVarying(program.object(), index, info);
+
+    if (!info.name || !info.type || !info.size)
+        return nullptr;
+
+    return WebGLActiveInfo::create(info.name, info.type, info.size);
 }
 
 void WebGL2RenderingContext::pauseTransformFeedback()
@@ -1208,9 +1325,30 @@ void WebGL2RenderingContext::resumeTransformFeedback()
     LOG(WebGL, "[[ NOT IMPLEMENTED ]] resumeTransformFeedback()");
 }
 
-void WebGL2RenderingContext::bindBufferBase(GCGLenum, GCGLuint, WebGLBuffer*)
+void WebGL2RenderingContext::bindBufferBase(GCGLenum target, GCGLuint index, WebGLBuffer* buffer)
 {
-    LOG(WebGL, "[[ NOT IMPLEMENTED ]] bindBufferBase()");
+    if (isContextLostOrPending())
+        return;
+
+    switch (target) {
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
+        if (index >= m_boundTransformFeedbackBuffers.size()) {
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bindBufferBase", "index out of range");
+            return;
+        }
+        break;
+    case GraphicsContextGL::UNIFORM_BUFFER:
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "bindBufferBase", "target not yet supported");
+        return;
+    default:
+        synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "bindBufferBase", "invalid target");
+        return;
+    }
+
+    if (!validateAndCacheBufferBinding("bindBufferBase", target, buffer))
+        return;
+
+    m_context->bindBufferBase(target, index, objectOrZero(buffer));
 }
 
 void WebGL2RenderingContext::bindBufferRange(GCGLenum, GCGLuint, WebGLBuffer*, GCGLint64, GCGLint64)
@@ -1218,10 +1356,18 @@ void WebGL2RenderingContext::bindBufferRange(GCGLenum, GCGLuint, WebGLBuffer*, G
     LOG(WebGL, "[[ NOT IMPLEMENTED ]] bindBufferRange()");
 }
 
-WebGLAny WebGL2RenderingContext::getIndexedParameter(GCGLenum target, GCGLuint)
+WebGLAny WebGL2RenderingContext::getIndexedParameter(GCGLenum target, GCGLuint index)
 {
+    if (isContextLostOrPending())
+        return nullptr;
+
     switch (target) {
     case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+        if (index >= m_boundTransformFeedbackBuffers.size()) {
+            synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "getIndexedParameter", "index out of range");
+            return nullptr;
+        }
+        return m_boundTransformFeedbackBuffers[index];
     case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_SIZE:
     case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_START:
     case GraphicsContextGL::UNIFORM_BUFFER_BINDING:
@@ -2074,6 +2220,10 @@ WebGLAny WebGL2RenderingContext::getParameter(GCGLenum pname)
         return m_backDrawBuffer; // emulated backbuffer
     case GraphicsContextGL::READ_FRAMEBUFFER_BINDING:
         return m_readFramebufferBinding;
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BINDING:
+        return m_boundTransformFeedback;
+    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING:
+        return m_boundTransformFeedbackBuffer;
     case GraphicsContextGL::COPY_READ_BUFFER:
     case GraphicsContextGL::COPY_WRITE_BUFFER:
     case GraphicsContextGL::PIXEL_PACK_BUFFER_BINDING:   
@@ -2082,7 +2232,6 @@ WebGLAny WebGL2RenderingContext::getParameter(GCGLenum pname)
     case GraphicsContextGL::SAMPLER_BINDING:
     case GraphicsContextGL::TEXTURE_BINDING_2D_ARRAY:
     case GraphicsContextGL::TEXTURE_BINDING_3D:
-    case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_BINDING:
     case GraphicsContextGL::UNIFORM_BUFFER_BINDING:
         synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getParameter", "parameter name not yet supported");
         return nullptr;
@@ -2381,6 +2530,17 @@ void WebGL2RenderingContext::readPixels(GLint x, GLint y, GLsizei width, GLsizei
     LOG(WebGL, "[[ NOT IMPLEMENTED ]] readPixels()");
 }
 
+void WebGL2RenderingContext::uncacheDeletedBuffer(WebGLBuffer* buffer)
+{
+    ASSERT(buffer);
+
+    WebGLRenderingContextBase::uncacheDeletedBuffer(buffer);
+
+    size_t index = m_boundTransformFeedbackBuffers.find(buffer);
+    if (index < m_boundTransformFeedbackBuffers.size())
+        m_boundTransformFeedbackBuffers[index] = nullptr;
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(WEBGL)
index 239172d..770f325 100644 (file)
@@ -44,6 +44,8 @@ public:
     static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, GraphicsContextGLAttributes);
     static std::unique_ptr<WebGL2RenderingContext> create(CanvasBase&, Ref<GraphicsContextGLOpenGL>&&, GraphicsContextGLAttributes);
 
+    ~WebGL2RenderingContext();
+
     // Buffer objects
     using WebGLRenderingContextBase::bufferData;
     using WebGLRenderingContextBase::bufferSubData;
@@ -258,8 +260,17 @@ private:
     GCGLenum baseInternalFormatFromInternalFormat(GCGLenum internalformat);
     bool isIntegerFormat(GCGLenum internalformat);
     void initializeShaderExtensions();
+    void initializeTransformFeedbackBufferCache();
 
     bool validateTexStorageFuncParameters(GCGLenum target, GCGLsizei levels, GCGLenum internalFormat, GCGLsizei width, GCGLsizei height, const char* functionName);
+
+    void uncacheDeletedBuffer(WebGLBuffer*) final;
+
+    RefPtr<WebGLTransformFeedback> m_boundTransformFeedback;
+    Vector<RefPtr<WebGLBuffer>> m_boundTransformFeedbackBuffers;
+
+    // Queries
+    HashMap<GCGLenum, RefPtr<WebGLQuery>> m_activeQueries;
 };
 
 } // namespace WebCore
index cf53e1e..3957b84 100644 (file)
@@ -45,6 +45,7 @@ class WebGLFramebuffer;
 class WebGLProgram;
 class WebGLRenderbuffer;
 class WebGLTexture;
+class WebGLTransformFeedback;
 class WebGLVertexArrayObject;
 class WebGLVertexArrayObjectOES;
 
@@ -70,6 +71,7 @@ using WebGLAny = Variant<
     RefPtr<WebGLVertexArrayObjectOES>
 #if ENABLE(WEBGL2)
     , RefPtr<WebGLVertexArrayObject>
+    , RefPtr<WebGLTransformFeedback>
 #endif
 >;
 
index 5e91526..70c06f9 100644 (file)
@@ -253,25 +253,13 @@ void WebGLBuffer::setCachedMaxIndex(GCGLenum type, unsigned value)
     m_nextAvailableCacheEntry = (m_nextAvailableCacheEntry + 1) % WTF_ARRAY_LENGTH(m_maxIndexCache);
 }
 
-void WebGLBuffer::setTarget(GCGLenum target, bool forWebGL2)
+void WebGLBuffer::setTarget(GCGLenum target)
 {
-    // In WebGL, a buffer is bound to one target in its lifetime
-    if (m_target)
-        return;
-    if (target == GraphicsContextGL::ARRAY_BUFFER || target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER)
-        m_target = target;
-    else if (forWebGL2) {
-#if ENABLE(WEBGL2)
-        switch (target) {
-        case GraphicsContextGL::COPY_READ_BUFFER:
-        case GraphicsContextGL::COPY_WRITE_BUFFER:
-        case GraphicsContextGL::PIXEL_PACK_BUFFER:
-        case GraphicsContextGL::PIXEL_UNPACK_BUFFER:
-        case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER:
-        case GraphicsContextGL::UNIFORM_BUFFER:
-            m_target = target;
-        }
-#endif
+    m_target = target;
+
+    if (target == GraphicsContextGL::ARRAY_BUFFER || target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER) {
+        ASSERT(!m_arrayBufferOrElementArrayBuffer || target == m_arrayBufferOrElementArrayBuffer);
+        m_arrayBufferOrElementArrayBuffer = target;
     }
 }
 
index 9afd857..767e4bc 100644 (file)
@@ -60,7 +60,9 @@ public:
     void setCachedMaxIndex(GCGLenum type, unsigned value);
 
     GCGLenum getTarget() const { return m_target; }
-    void setTarget(GCGLenum, bool forWebGL2);
+    void setTarget(GCGLenum);
+
+    GCGLenum arrayBufferOrElementArrayBuffer() const { return m_arrayBufferOrElementArrayBuffer; }
 
     bool hasEverBeenBound() const { return object() && m_target; }
 
@@ -75,6 +77,8 @@ private:
     RefPtr<JSC::ArrayBuffer> m_elementArrayBuffer;
     GCGLsizeiptr m_byteLength { 0 };
 
+    GCGLenum m_arrayBufferOrElementArrayBuffer { 0 };
+
     // Optimization for index validation. For each type of index
     // (i.e., UNSIGNED_SHORT), cache the maximum index in the
     // entire buffer.
index 01dde7f..4f24152 100644 (file)
@@ -46,7 +46,7 @@ WebGLQuery::~WebGLQuery()
 WebGLQuery::WebGLQuery(WebGLRenderingContextBase& ctx)
     : WebGLSharedObject(ctx)
 {
-    // FIXME: Call createQuery from GraphicsContextGLOpenGL.
+    setObject(ctx.graphicsContextGL()->createQuery());
 }
 
 void WebGLQuery::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, PlatformGLObject object)
index 556d399..76189e1 100644 (file)
@@ -36,9 +36,16 @@ public:
     static Ref<WebGLQuery> create(WebGLRenderingContextBase&);
     virtual ~WebGLQuery();
 
+    bool isResultAvailable() const { return m_isResultAvailable; }
+
+    void makeResultAvailable() { m_isResultAvailable = true; }
+
 protected:
     explicit WebGLQuery(WebGLRenderingContextBase&);
     void deleteObjectImpl(GraphicsContextGLOpenGL*, PlatformGLObject) override;
+
+private:
+    bool m_isResultAvailable { false };
 };
 
 } // namespace WebCore
index 17eaa5d..67ca53c 100644 (file)
@@ -1188,17 +1188,26 @@ bool WebGLRenderingContextBase::checkObjectToBeBound(const char* functionName, W
     return true;
 }
 
-void WebGLRenderingContextBase::bindBuffer(GCGLenum target, WebGLBuffer* buffer)
+bool WebGLRenderingContextBase::validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer* buffer)
 {
     bool deleted;
-    if (!checkObjectToBeBound("bindBuffer", buffer, deleted))
-        return;
+    if (!checkObjectToBeBound(functionName, buffer, deleted))
+        return false;
     if (deleted)
         buffer = nullptr;
-    if (buffer && buffer->getTarget() && buffer->getTarget() != target) {
-        synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "bindBuffer", "buffers can not be used with multiple targets");
-        return;
+
+    if (buffer) {
+        // In WebGL, a buffer may only be bound to one of the ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target in its lifetime.
+        if (target == GraphicsContextGL::ARRAY_BUFFER || target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER) {
+            if (buffer->arrayBufferOrElementArrayBuffer() && target != buffer->arrayBufferOrElementArrayBuffer()) {
+                synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, functionName, "buffers can only be bound to one of ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER");
+                return false;
+            }
+        }
+
+        buffer->setTarget(target);
     }
+
     if (target == GraphicsContextGL::ARRAY_BUFFER)
         m_boundArrayBuffer = buffer;
     else if (target == GraphicsContextGL::ELEMENT_ARRAY_BUFFER)
@@ -1235,13 +1244,19 @@ void WebGLRenderingContextBase::bindBuffer(GCGLenum target, WebGLBuffer* buffer)
 #endif
         if (!success) {
             synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "bindBuffer", "invalid target");
-            return;
+            return false;
         }
     }
 
+    return true;
+}
+
+void WebGLRenderingContextBase::bindBuffer(GCGLenum target, WebGLBuffer* buffer)
+{
+    if (!validateAndCacheBufferBinding("bindBuffer", target, buffer))
+        return;
+
     m_context->bindBuffer(target, objectOrZero(buffer));
-    if (buffer)
-        buffer->setTarget(target, isWebGL2());
 }
 
 void WebGLRenderingContextBase::bindFramebuffer(GCGLenum target, WebGLFramebuffer* buffer)
@@ -1794,14 +1809,29 @@ bool WebGLRenderingContextBase::deleteObject(WebGLObject* object)
     return true;
 }
 
+#define REMOVE_BUFFER_FROM_BINDING(binding) \
+    if (binding == buffer) \
+        binding = nullptr;
+
+void WebGLRenderingContextBase::uncacheDeletedBuffer(WebGLBuffer* buffer)
+{
+    REMOVE_BUFFER_FROM_BINDING(m_boundArrayBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundCopyReadBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundCopyWriteBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundPixelPackBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundPixelUnpackBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundTransformFeedbackBuffer);
+    REMOVE_BUFFER_FROM_BINDING(m_boundUniformBuffer);
+
+    m_boundVertexArrayObject->unbindBuffer(*buffer);
+}
+
 void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer)
 {
     if (!deleteObject(buffer))
         return;
-    if (m_boundArrayBuffer == buffer)
-        m_boundArrayBuffer = nullptr;
 
-    m_boundVertexArrayObject->unbindBuffer(*buffer);
+    uncacheDeletedBuffer(buffer);
 }
 
 void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer)
@@ -2652,6 +2682,19 @@ WebGLAny WebGLRenderingContextBase::getProgramParameter(WebGLProgram* program, G
 #endif // USE(ANGLE)
         return value;
     default:
+#if ENABLE(WEBGL2)
+        if (isWebGL2()) {
+            switch (pname) {
+            case GraphicsContextGL::TRANSFORM_FEEDBACK_BUFFER_MODE:
+            case GraphicsContextGL::TRANSFORM_FEEDBACK_VARYINGS:
+            case GraphicsContextGL::ACTIVE_UNIFORM_BLOCKS:
+                m_context->getProgramiv(objectOrZero(program), pname, &value);
+                return value;
+            default:
+                break;
+            }
+        }
+#endif // ENABLE(WEBGL2)
         synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getProgramParameter", "invalid parameter name");
         return nullptr;
     }
index 6acc112..30b43ca 100644 (file)
@@ -457,6 +457,8 @@ protected:
 
     bool enableSupportedExtension(ASCIILiteral extensionNameLiteral);
 
+    virtual void uncacheDeletedBuffer(WebGLBuffer*);
+
     RefPtr<GraphicsContextGLOpenGL> m_context;
     RefPtr<WebGLContextGroup> m_contextGroup;
 
@@ -816,6 +818,8 @@ protected:
     // Return false if caller should return without further processing.
     bool checkObjectToBeBound(const char* functionName, WebGLObject*, bool& deleted);
 
+    bool validateAndCacheBufferBinding(const char* functionName, GCGLenum target, WebGLBuffer*);
+
     // Helpers for simulating vertexAttrib0.
     void initVertexAttrib0();
     Optional<bool> simulateVertexAttrib0(GCGLuint numVertex);
index 2d28c59..5a2f033 100644 (file)
@@ -46,14 +46,12 @@ WebGLTransformFeedback::~WebGLTransformFeedback()
 WebGLTransformFeedback::WebGLTransformFeedback(WebGLRenderingContextBase& ctx)
     : WebGLSharedObject(ctx)
 {
-    // FIXME: Call createTransformFeedback from GraphicsContextGLOpenGL.
+    setObject(ctx.graphicsContextGL()->createTransformFeedback());
 }
 
 void WebGLTransformFeedback::deleteObjectImpl(GraphicsContextGLOpenGL* context3d, PlatformGLObject object)
 {
-    UNUSED_PARAM(context3d);
-    UNUSED_PARAM(object);
-    // FIXME: Call deleteTransformFeedback from GraphicsContextGLOpenGL.
+    context3d->deleteTransformFeedback(object);
 }
 
 }
index 5788abe..3881d89 100644 (file)
@@ -464,6 +464,7 @@ public:
         UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B,
         RGB9_E5 = 0x8C3D,
         UNSIGNED_INT_5_9_9_9_REV = 0x8C3E,
+        TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76,
         TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F,
         MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80,
         TRANSFORM_FEEDBACK_VARYINGS = 0x8C83,
@@ -1133,7 +1134,7 @@ public:
     virtual void endQuery(GCGLenum target) = 0;
     virtual PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) = 0;
     // getQueryParameter
-    virtual void glGetQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) = 0;
+    virtual void getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) = 0;
 
     virtual PlatformGLObject createSampler() = 0;
     virtual void deleteSampler(PlatformGLObject sampler) = 0;
@@ -1160,7 +1161,7 @@ public:
     virtual void beginTransformFeedback(GCGLenum primitiveMode) = 0;
     virtual void endTransformFeedback() = 0;
     virtual void transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode) = 0;
-    virtual PlatformGLObject getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index) = 0;
+    virtual void getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo&) = 0;
     virtual void pauseTransformFeedback() = 0;
     virtual void resumeTransformFeedback() = 0;
 
index 1465d7f..165e8b8 100644 (file)
@@ -1442,6 +1442,12 @@ void GraphicsContextGLOpenGL::vertexAttribPointer(GCGLuint index, GCGLint size,
     gl::VertexAttribPointer(index, size, type, normalized, stride, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
 }
 
+void GraphicsContextGLOpenGL::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset)
+{
+    makeContextCurrent();
+    gl::VertexAttribIPointer(index, size, type, stride, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)));
+}
+
 void GraphicsContextGLOpenGL::viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
 {
     makeContextCurrent();
@@ -1832,87 +1838,918 @@ void GraphicsContextGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divis
     getExtensions().vertexAttribDivisor(index, divisor);
 }
 
-void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
+GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockName);
+
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::getActiveUniformBlockiv(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLint* params)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(params);
+}
+
+String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+
+    return emptyString();
+}
+
+void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
+{
+    UNUSED_PARAM(program);
+    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(uniformBlockBinding);
+
+}
+
+// Query Functions
+
+PlatformGLObject GraphicsContextGLOpenGL::createQuery()
 {
     makeContextCurrent();
-    gl::CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
+    GLuint name = 0;
+    gl::GenQueries(1, &name);
+    return name;
 }
 
-void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access)
+void GraphicsContextGLOpenGL::beginQuery(GCGLenum target, PlatformGLObject query)
 {
     makeContextCurrent();
-    return gl::MapBufferRange(target, offset, length, access);
+    gl::BeginQuery(target, query);
 }
 
-GCGLboolean GraphicsContextGLOpenGL::unmapBuffer(GCGLenum target)
+void GraphicsContextGLOpenGL::endQuery(GCGLenum target)
 {
     makeContextCurrent();
-    return gl::UnmapBuffer(target);
+    gl::EndQuery(target);
 }
 
-void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params)
+void GraphicsContextGLOpenGL::getQueryObjectuiv(GCGLuint id, GCGLenum pname, GCGLuint* params)
 {
     makeContextCurrent();
-    gl::GetInternalformativ(target, internalformat, pname, bufSize, params);
+    gl::GetQueryObjectuiv(id, pname, params);
 }
 
-void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+// Transform Feedback Functions
+
+PlatformGLObject GraphicsContextGLOpenGL::createTransformFeedback()
 {
     makeContextCurrent();
-    gl::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
+    GLuint name = 0;
+    gl::GenTransformFeedbacks(1, &name);
+    return name;
 }
 
-void GraphicsContextGLOpenGL::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
+void GraphicsContextGLOpenGL::deleteTransformFeedback(PlatformGLObject transformFeedback)
 {
     makeContextCurrent();
-    gl::TexStorage2D(target, levels, internalformat, width, height);
-    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+    gl::DeleteTransformFeedbacks(1, &transformFeedback);
 }
 
-void GraphicsContextGLOpenGL::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
+GCGLboolean GraphicsContextGLOpenGL::isTransformFeedback(PlatformGLObject transformFeedback)
 {
     makeContextCurrent();
-    gl::TexStorage3D(target, levels, internalformat, width, height, depth);
-    m_state.textureSeedCount.add(m_state.currentBoundTexture());
+    return gl::IsTransformFeedback(transformFeedback);
 }
 
-void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params)
+void GraphicsContextGLOpenGL::bindTransformFeedback(GCGLenum target, PlatformGLObject transformFeedback)
 {
-    ASSERT(program);
     makeContextCurrent();
+    gl::BindTransformFeedback(target, transformFeedback);
+}
 
-    gl::GetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, params.data());
+void GraphicsContextGLOpenGL::beginTransformFeedback(GCGLenum primitiveMode)
+{
+    makeContextCurrent();
+    gl::BeginTransformFeedback(primitiveMode);
 }
 
-GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
+void GraphicsContextGLOpenGL::endTransformFeedback()
+{
+    makeContextCurrent();
+    gl::EndTransformFeedback();
+}
+
+void GraphicsContextGLOpenGL::transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode)
+{
+    auto convertedVaryings = varyings.map([](const String& varying) -> const char* {
+        return varying.utf8().data();
+    });
+    makeContextCurrent();
+    gl::TransformFeedbackVaryings(program, varyings.size(), convertedVaryings.data(), bufferMode);
+}
+
+void GraphicsContextGLOpenGL::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo& info)
+{
+    makeContextCurrent();
+    GCGLsizei bufSize = 0;
+    gl::GetProgramiv(program, GraphicsContextGLOpenGL::TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH, &bufSize);
+    if (!bufSize)
+        return;
+
+    GCGLsizei length = 0;
+    GCGLsizei size = 0;
+    GCGLenum type = 0;
+    Vector<GCGLchar> name(bufSize);
+
+    gl::GetTransformFeedbackVarying(program, index, bufSize, &length, &size, &type, name.data());
+
+    info.name = String(name.data(), length);
+    info.size = size;
+    info.type = type;
+}
+
+void GraphicsContextGLOpenGL::bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer)
+{
+    makeContextCurrent();
+    gl::BindBufferBase(target, index, buffer);
+}
+
+void GraphicsContextGLOpenGL::bufferData(GCGLenum target, const void* data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(usage);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(length);
+}
+
+void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr dstByteOffset, const void* srcData, GCGLuint srcOffset, GCGLuint length)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(dstByteOffset);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(length);
+}
+
+
+void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum target, GCGLintptr srcByteOffset, const void* dstData, GCGLuint dstOffset, GCGLuint length)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(srcByteOffset);
+    UNUSED_PARAM(dstData);
+    UNUSED_PARAM(dstOffset);
+    UNUSED_PARAM(length);
+}
+
+void GraphicsContextGLOpenGL::blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter)
+{
+    UNUSED_PARAM(srcX0);
+    UNUSED_PARAM(srcY0);
+    UNUSED_PARAM(srcX1);
+    UNUSED_PARAM(srcY1);
+    UNUSED_PARAM(dstX0);
+    UNUSED_PARAM(dstY0);
+    UNUSED_PARAM(dstX1);
+    UNUSED_PARAM(dstY1);
+    UNUSED_PARAM(mask);
+    UNUSED_PARAM(filter);
+}
+
+void GraphicsContextGLOpenGL::framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachment);
+    UNUSED_PARAM(texture);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(layer);
+}
+
+void GraphicsContextGLOpenGL::invalidateFramebuffer(GCGLenum target, const Vector<GCGLenum>& attachments)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachments);
+}
+
+void GraphicsContextGLOpenGL::invalidateSubFramebuffer(GCGLenum target, const Vector<GCGLenum>& attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(attachments);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+}
+
+void GraphicsContextGLOpenGL::readBuffer(GCGLenum src)
+{
+    UNUSED_PARAM(src);
+}
+
+void GraphicsContextGLOpenGL::texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(pboOffset);
+}
+
+void GraphicsContextGLOpenGL::texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, const void* pixels)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(pixels);
+}
+
+void GraphicsContextGLOpenGL::texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(pboOffset);
+}
+
+void GraphicsContextGLOpenGL::texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLintptr offset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(imageSize);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, const void* srcData, GCGLuint srcOffset, GCGLuint srcLengthOverride)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLengthOverride);
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(imageSize);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, const void* srcData, GCGLuint srcOffset, GCGLuint srcLengthOverride)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(zoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLengthOverride);
+}
+
+GCGLint GraphicsContextGLOpenGL::getFragDataLocation(PlatformGLObject program, const String& name)
 {
     UNUSED_PARAM(program);
-    UNUSED_PARAM(uniformBlockName);
+    UNUSED_PARAM(name);
 
     return 0;
 }
 
-void GraphicsContextGLOpenGL::getActiveUniformBlockiv(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLint* params)
+void GraphicsContextGLOpenGL::uniform1ui(GCGLint location, GCGLuint v0)
 {
-    UNUSED_PARAM(program);
-    UNUSED_PARAM(uniformBlockIndex);
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+}
+
+void GraphicsContextGLOpenGL::uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+}
+
+void GraphicsContextGLOpenGL::uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+    UNUSED_PARAM(v2);
+}
+
+void GraphicsContextGLOpenGL::uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(v0);
+    UNUSED_PARAM(v1);
+    UNUSED_PARAM(v2);
+    UNUSED_PARAM(v3);
+}
+
+void GraphicsContextGLOpenGL::uniform1uiv(GCGLint location, const GCGLuint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform2uiv(GCGLint location, const GCGLuint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform3uiv(GCGLint location, const GCGLuint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform4uiv(GCGLint location, const GCGLuint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(z);
+    UNUSED_PARAM(w);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4iv(GCGLuint index, const GCGLint* values)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(z);
+    UNUSED_PARAM(w);
+}
+
+void GraphicsContextGLOpenGL::vertexAttribI4uiv(GCGLuint index, const GCGLuint* values)
+{
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(values);
+}
+
+void GraphicsContextGLOpenGL::drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset)
+{
+    UNUSED_PARAM(mode);
+    UNUSED_PARAM(start);
+    UNUSED_PARAM(end);
+    UNUSED_PARAM(count);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::drawBuffers(const Vector<GCGLenum>& buffers)
+{
+    UNUSED_PARAM(buffers);
+}
+
+void GraphicsContextGLOpenGL::clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, const GCGLint* values, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, const GCGLuint* values, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, const GCGLfloat* values, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(values);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil)
+{
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(drawbuffer);
+    UNUSED_PARAM(depth);
+    UNUSED_PARAM(stencil);
+}
+
+void GraphicsContextGLOpenGL::deleteQuery(PlatformGLObject query)
+{
+    UNUSED_PARAM(query);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isQuery(PlatformGLObject query)
+{
+    UNUSED_PARAM(query);
+
+    return false;
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::getQuery(GCGLenum target, GCGLenum pname)
+{
+    UNUSED_PARAM(target);
     UNUSED_PARAM(pname);
-    UNUSED_PARAM(params);
+
+    return 0;
 }
 
-String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
+PlatformGLObject GraphicsContextGLOpenGL::createSampler()
 {
-    UNUSED_PARAM(program);
-    UNUSED_PARAM(uniformBlockIndex);
 
-    return emptyString();
+    return 0;
 }
 
-void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
+void GraphicsContextGLOpenGL::deleteSampler(PlatformGLObject sampler)
+{
+    UNUSED_PARAM(sampler);
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isSampler(PlatformGLObject sampler)
+{
+    UNUSED_PARAM(sampler);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::bindSampler(GCGLuint unit, PlatformGLObject sampler)
+{
+    UNUSED_PARAM(unit);
+    UNUSED_PARAM(sampler);
+}
+
+void GraphicsContextGLOpenGL::samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(param);
+}
+
+void GraphicsContextGLOpenGL::samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(param);
+}
+
+void GraphicsContextGLOpenGL::getSamplerParameterfv(PlatformGLObject sampler, GCGLenum pname, GCGLfloat* value)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(value);
+}
+
+void GraphicsContextGLOpenGL::getSamplerParameteriv(PlatformGLObject sampler, GCGLenum pname, GCGLint* value)
+{
+    UNUSED_PARAM(sampler);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(value);
+}
+
+PlatformGLObject GraphicsContextGLOpenGL::fenceSync(GCGLenum condition, GCGLbitfield flags)
+{
+    UNUSED_PARAM(condition);
+    UNUSED_PARAM(flags);
+
+    return 0;
+}
+
+GCGLboolean GraphicsContextGLOpenGL::isSync(PlatformGLObject sync)
+{
+    UNUSED_PARAM(sync);
+
+    return false;
+}
+
+void GraphicsContextGLOpenGL::deleteSync(PlatformGLObject sync)
+{
+    UNUSED_PARAM(sync);
+}
+
+GCGLenum GraphicsContextGLOpenGL::clientWaitSync(PlatformGLObject sync, GCGLbitfield flags, GCGLuint64 timeout)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(flags);
+    UNUSED_PARAM(timeout);
+
+    return 0;
+}
+
+void GraphicsContextGLOpenGL::waitSync(PlatformGLObject sync, GCGLbitfield flags, GCGLint64 timeout)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(flags);
+    UNUSED_PARAM(timeout);
+}
+
+void GraphicsContextGLOpenGL::getSynciv(PlatformGLObject sync, GCGLenum pname, GCGLsizei bufSize, GCGLint *value)
+{
+    UNUSED_PARAM(sync);
+    UNUSED_PARAM(pname);
+    UNUSED_PARAM(bufSize);
+    UNUSED_PARAM(value);
+}
+
+void GraphicsContextGLOpenGL::pauseTransformFeedback()
+{
+}
+
+void GraphicsContextGLOpenGL::resumeTransformFeedback()
+{
+}
+
+void GraphicsContextGLOpenGL::bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(index);
+    UNUSED_PARAM(buffer);
+    UNUSED_PARAM(offset);
+    UNUSED_PARAM(size);
+}
+
+Vector<GCGLuint> GraphicsContextGLOpenGL::getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames)
 {
     UNUSED_PARAM(program);
-    UNUSED_PARAM(uniformBlockIndex);
-    UNUSED_PARAM(uniformBlockBinding);
+    UNUSED_PARAM(uniformNames);
+
+    return { };
+}
+
+void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(pboOffset);
+}
+
+void GraphicsContextGLOpenGL::texImage2D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr pboOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(pboOffset);
+}
+
+void GraphicsContextGLOpenGL::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, const void* srcData, GCGLuint srcOffset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(imageSize);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, const void* srcData, GCGLuint srcOffset, GCGLuint srcLengthOverride)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(internalformat);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(border);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLengthOverride);
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(imageSize);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, const void* srcData, GCGLuint srcOffset, GCGLuint srcLengthOverride)
+{
+    UNUSED_PARAM(target);
+    UNUSED_PARAM(level);
+    UNUSED_PARAM(xoffset);
+    UNUSED_PARAM(yoffset);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(srcData);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLengthOverride);
+}
+
+void GraphicsContextGLOpenGL::uniform1fv(GCGLint location, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform2fv(GCGLint location, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform3fv(GCGLint location, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform4fv(GCGLint location, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform1iv(GCGLint location, const GCGLint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform2iv(GCGLint location, const GCGLint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform3iv(GCGLint location, const GCGLint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniform4iv(GCGLint location, const GCGLint* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix2fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix3fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::uniformMatrix4fv(GCGLint location, GCGLboolean transpose, const GCGLfloat* data, GCGLuint srcOffset, GCGLuint srcLength)
+{
+    UNUSED_PARAM(location);
+    UNUSED_PARAM(transpose);
+    UNUSED_PARAM(data);
+    UNUSED_PARAM(srcOffset);
+    UNUSED_PARAM(srcLength);
+}
+
+void GraphicsContextGLOpenGL::readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset)
+{
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(offset);
+}
+
+void GraphicsContextGLOpenGL::readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, const void* dstData, GCGLuint dstOffset)
+{
+    UNUSED_PARAM(x);
+    UNUSED_PARAM(y);
+    UNUSED_PARAM(width);
+    UNUSED_PARAM(height);
+    UNUSED_PARAM(format);
+    UNUSED_PARAM(type);
+    UNUSED_PARAM(dstData);
+    UNUSED_PARAM(dstOffset);
 }
 
 }
index 23b104a..e445b32 100644 (file)
@@ -436,7 +436,7 @@ public:
     void endQuery(GCGLenum target) final;
     PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) final;
     // getQueryParameter
-    void glGetQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) final;
+    void getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) final;
 
     PlatformGLObject createSampler() final;
     void deleteSampler(PlatformGLObject sampler) final;
@@ -464,7 +464,7 @@ public:
     void beginTransformFeedback(GCGLenum primitiveMode) final;
     void endTransformFeedback() final;
     void transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode) final;
-    PlatformGLObject getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index) final;
+    void getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo&) final;
     void pauseTransformFeedback() final;
     void resumeTransformFeedback() final;
 
index a709813..9d1e178 100644 (file)
@@ -2567,7 +2567,7 @@ PlatformGLObject GraphicsContextGLOpenGL::getQuery(GCGLenum target, GCGLenum pna
     return 0;
 }
 
-void GraphicsContextGLOpenGL::glGetQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value)
+void GraphicsContextGLOpenGL::getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value)
 {
     UNUSED_PARAM(query);
     UNUSED_PARAM(pname);
@@ -2708,12 +2708,10 @@ void GraphicsContextGLOpenGL::transformFeedbackVaryings(PlatformGLObject program
     UNUSED_PARAM(bufferMode);
 }
 
-PlatformGLObject GraphicsContextGLOpenGL::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index)
+void GraphicsContextGLOpenGL::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo&)
 {
     UNUSED_PARAM(program);
     UNUSED_PARAM(index);
-
-    return 0;
 }
 
 void GraphicsContextGLOpenGL::pauseTransformFeedback()