Revert "Validate that attrib offsets don't overflow buffers."
Seems to fail the Windows 8 bots in FL9_3 for some reason.
https://build.chromium.org/p/chromium.gpu.fyi/builders/Win8%20Release%20%28NVIDIA%29/builds/20703
VertexAttributeTest.ShortNormalized_ES2_D3D11_9_3
VertexAttributeTest.ShortUnnormalized_ES2_D3D11_9_3
BUG=angleproject:1339
This reverts commit fb57c04c781df708a432f0e90acf2e431b7983bb.
Change-Id: I4c678ff6b337e9a3e0a1fc809f96f6b89407ea33
Reviewed-on: https://chromium-review.googlesource.com/332442
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/test_utils/ANGLETest.cpp b/src/tests/test_utils/ANGLETest.cpp
index b308e11..ee14e6c 100644
--- a/src/tests/test_utils/ANGLETest.cpp
+++ b/src/tests/test_utils/ANGLETest.cpp
@@ -65,11 +65,7 @@
} // namespace angle
ANGLETest::ANGLETest()
- : mEGLWindow(nullptr),
- mWidth(16),
- mHeight(16),
- mIgnoreD3D11SDKLayersWarnings(false),
- mQuadVertexBuffer(0)
+ : mEGLWindow(nullptr), mWidth(16), mHeight(16), mIgnoreD3D11SDKLayersWarnings(false)
{
mEGLWindow =
new EGLWindow(GetParam().majorVersion, GetParam().minorVersion, GetParam().eglParameters);
@@ -77,10 +73,6 @@
ANGLETest::~ANGLETest()
{
- if (mQuadVertexBuffer)
- {
- glDeleteBuffers(1, &mQuadVertexBuffer);
- }
SafeDelete(mEGLWindow);
}
@@ -191,58 +183,6 @@
glUseProgram(0);
}
-void ANGLETest::drawIndexedQuad(GLuint program,
- const std::string &positionAttribName,
- GLfloat positionAttribZ)
-{
- drawIndexedQuad(program, positionAttribName, positionAttribZ, 1.0f);
-}
-
-void ANGLETest::drawIndexedQuad(GLuint program,
- const std::string &positionAttribName,
- GLfloat positionAttribZ,
- GLfloat positionAttribXYScale)
-{
- GLint positionLocation = glGetAttribLocation(program, positionAttribName.c_str());
-
- glUseProgram(program);
-
- GLuint prevBinding = 0;
- glGetIntegerv(GL_ARRAY_BUFFER_BINDING, reinterpret_cast<GLint *>(&prevBinding));
-
- if (mQuadVertexBuffer == 0)
- {
- glGenBuffers(1, &mQuadVertexBuffer);
- const GLfloat vertices[] = {
- -1.0f * positionAttribXYScale, 1.0f * positionAttribXYScale, positionAttribZ,
- -1.0f * positionAttribXYScale, -1.0f * positionAttribXYScale, positionAttribZ,
- 1.0f * positionAttribXYScale, -1.0f * positionAttribXYScale, positionAttribZ,
- 1.0f * positionAttribXYScale, 1.0f * positionAttribXYScale, positionAttribZ,
- };
- glBindBuffer(GL_ARRAY_BUFFER, mQuadVertexBuffer);
- glBufferData(GL_ARRAY_BUFFER, sizeof(GLfloat) * 3 * 4, vertices, GL_STATIC_DRAW);
- }
- else
- {
- glBindBuffer(GL_ARRAY_BUFFER, mQuadVertexBuffer);
- }
-
- glVertexAttribPointer(positionLocation, 3, GL_FLOAT, GL_FALSE, 0, nullptr);
- glEnableVertexAttribArray(positionLocation);
- glBindBuffer(GL_ARRAY_BUFFER, prevBinding);
-
- const GLushort indices[] = {
- 0, 1, 2, 0, 2, 3,
- };
-
- glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, indices);
-
- glDisableVertexAttribArray(positionLocation);
- glVertexAttribPointer(positionLocation, 4, GL_FLOAT, GL_FALSE, 0, NULL);
-
- glUseProgram(0);
-}
-
GLuint ANGLETest::compileShader(GLenum type, const std::string &source)
{
GLuint shader = glCreateShader(type);