Re-land "Validate that attrib offsets don't overflow buffers."
During draw calls, we wouldn't add the current attrib offset to the
required draw call size when checking attributes. This could lead to
us producing warnings in the D3D11 runtime, and miss returning some
errors.
Re-land with a test data initialization fix, and with some extra
tests merged from another CL.
BUG=angleproject:1339
Change-Id: Ifd549c3b1f6871417dc1693cb3ec534414e92cfd
Reviewed-on: https://chromium-review.googlesource.com/333723
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/tests/test_utils/ANGLETest.h b/src/tests/test_utils/ANGLETest.h
index 3e73712..b58ee30 100644
--- a/src/tests/test_utils/ANGLETest.h
+++ b/src/tests/test_utils/ANGLETest.h
@@ -114,6 +114,14 @@
const std::string &positionAttribName,
GLfloat positionAttribZ,
GLfloat positionAttribXYScale);
+ void drawIndexedQuad(GLuint program,
+ const std::string &positionAttribName,
+ GLfloat positionAttribZ);
+ void drawIndexedQuad(GLuint program,
+ const std::string &positionAttribName,
+ GLfloat positionAttribZ,
+ GLfloat positionAttribXYScale);
+
static GLuint compileShader(GLenum type, const std::string &source);
static bool extensionEnabled(const std::string &extName);
static bool eglClientExtensionEnabled(const std::string &extName);
@@ -154,6 +162,9 @@
bool mIgnoreD3D11SDKLayersWarnings;
+ // Used for indexed quad rendering
+ GLuint mQuadVertexBuffer;
+
static OSWindow *mOSWindow;
};