WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
authorjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Sep 2018 00:24:52 +0000 (00:24 +0000)
committerjustin_fan@apple.com <justin_fan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Sep 2018 00:24:52 +0000 (00:24 +0000)
commitbb7d9b852bd487eba440041c037dc8651998340e
tree7d71f32f3588519db1643366beebb1bd79093cba
parent75f826a21bdf5485fdc25c60aeb81778e46ab0fa
WebGL 2 Conformance: primitive restart and draw_primitive_restart WebGL2 sample
https://bugs.webkit.org/show_bug.cgi?id=189625
<rdar://problem/42882620>

Reviewed by Dean Jackson.

Source/WebCore:

Ref test: webgl/webgl2-primitive-restart.html.

Implement support for Primitive Restart Fixed Index as expected
by the WebGL 2 specifications.

* html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::validateIndexArrayConservative):
* html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::getLastIndex): Template that must be defined in header.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise):
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::primitiveRestartIndex):

LayoutTests:

Implement support for Primitive Restart Fixed Index as expected
by the WebGL 2 specifications.

* TestExpectations: Skip some flaky tests between different Mac machines under 2.0.0.
* webgl/webgl2-primitive-restart.html: Canary ref test to be run as part of LayoutTests suite.
* webgl/webgl2-primitive-restart-expected.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@236490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/webgl/webgl2-primitive-restart-expected.html [new file with mode: 0644]
LayoutTests/webgl/webgl2-primitive-restart.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.h
Source/WebCore/platform/graphics/GraphicsContext3D.h
Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm
Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp