Commit 4964513a by Gert Wollny Committed by Angle LUCI CQ

ANGLETest: When on WebGL compatibility then use index buffers

WebGL actually requires the use of index buffers, otherwise the call is invalid, therefore explicitely request index buffers in the according VertexAttributeOORTest tests. In addition, assert on the indices when the glDrawElements call is captured. With that we can enable VertexAttributeOORTest.* Bug: angleproject:6125 Change-Id: Id3855c78d4c5fcab5599f19dd74ce745d059fb1c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2999523 Commit-Queue: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 2c8391b1
...@@ -4103,6 +4103,7 @@ void FrameCapture::maybeCaptureDrawElementsClientData(const gl::Context *context ...@@ -4103,6 +4103,7 @@ void FrameCapture::maybeCaptureDrawElementsClientData(const gl::Context *context
} }
else else
{ {
ASSERT(indices);
indexRange = gl::ComputeIndexRange(drawElementsType, indices, count, restart); indexRange = gl::ComputeIndexRange(drawElementsType, indices, count, restart);
} }
......
...@@ -47,7 +47,6 @@ GPUTestConfigTest.GPUTestConfigConditions_D3D11/* ...@@ -47,7 +47,6 @@ GPUTestConfigTest.GPUTestConfigConditions_D3D11/*
ImageTest.SourceCubeTargetExternal/* ImageTest.SourceCubeTargetExternal/*
PBOExtensionTest.* PBOExtensionTest.*
SRGBFramebufferTest.Validation/* SRGBFramebufferTest.Validation/*
VertexAttributeOORTest.*
VertexAttributeTest.* VertexAttributeTest.*
VulkanExternalImageTest.* VulkanExternalImageTest.*
......
...@@ -1244,7 +1244,7 @@ TEST_P(VertexAttributeOORTest, ANGLEDrawElementsBufferTooSmall) ...@@ -1244,7 +1244,7 @@ TEST_P(VertexAttributeOORTest, ANGLEDrawElementsBufferTooSmall)
data.bufferOffset = (kVertexCount - 3) * TypeStride(GL_FLOAT); data.bufferOffset = (kVertexCount - 3) * TypeStride(GL_FLOAT);
setupTest(data, 1); setupTest(data, 1);
drawIndexedQuad(mProgram, "position", 0.5f); drawIndexedQuad(mProgram, "position", 0.5f, 1.0f, true);
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
} }
...@@ -1266,7 +1266,7 @@ TEST_P(VertexAttributeOORTest, ANGLEDrawArraysOutOfBoundsCases) ...@@ -1266,7 +1266,7 @@ TEST_P(VertexAttributeOORTest, ANGLEDrawArraysOutOfBoundsCases)
glEnableVertexAttribArray(mTestAttrib); glEnableVertexAttribArray(mTestAttrib);
glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0);
drawIndexedQuad(mProgram, "position", 0.5f); drawIndexedQuad(mProgram, "position", 0.5f, 1.0f, true);
EXPECT_GL_ERROR(GL_INVALID_OPERATION); EXPECT_GL_ERROR(GL_INVALID_OPERATION);
} }
......
...@@ -991,6 +991,8 @@ void ANGLETestBase::drawIndexedQuad(GLuint program, ...@@ -991,6 +991,8 @@ void ANGLETestBase::drawIndexedQuad(GLuint program,
GLfloat positionAttribZ, GLfloat positionAttribZ,
GLfloat positionAttribXYScale) GLfloat positionAttribXYScale)
{ {
ASSERT(!mFixture->configParams.webGLCompatibility.valid() ||
!mFixture->configParams.webGLCompatibility.value());
drawIndexedQuad(program, positionAttribName, positionAttribZ, positionAttribXYScale, false); drawIndexedQuad(program, positionAttribName, positionAttribZ, positionAttribXYScale, false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment