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/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index c06eb7a..12c7612 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -68,16 +68,13 @@
GLint64 attribSize =
static_cast<GLint64>(ComputeVertexAttributeTypeSize(attrib));
GLint64 attribDataSize = (maxVertexElement - 1) * attribStride + attribSize;
- GLint64 attribOffset = static_cast<GLint64>(attrib.offset);
// [OpenGL ES 3.0.2] section 2.9.4 page 40:
// We can return INVALID_OPERATION if our vertex attribute does not have
// enough backing data.
- if (attribDataSize + attribOffset > buffer->getSize())
+ if (attribDataSize > buffer->getSize())
{
- context->recordError(
- Error(GL_INVALID_OPERATION,
- "Vertex buffer is not big enough for the draw call"));
+ context->recordError(Error(GL_INVALID_OPERATION));
return false;
}
}
@@ -2020,7 +2017,7 @@
return false;
}
- if (!ValidateDrawAttribs(context, primcount, static_cast<GLint>(indexRangeOut->vertexCount())))
+ if (!ValidateDrawAttribs(context, primcount, static_cast<GLsizei>(indexRangeOut->end)))
{
return false;
}