Commit 2b835a6f by Geoff Lang

Call the correct vertex attrib function for stream integer attribs.

Fixes tests related to integer attributes in dEQP-GLES3.functional.shaders.builtin_functions.* BUG=angleproject:880 Change-Id: I107c5c9fd1adc29f58617fab095374daa74a0da1 Reviewed-on: https://chromium-review.googlesource.com/298970Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 362c0a79
......@@ -330,9 +330,20 @@ gl::Error VertexArrayGL::streamAttributes(const gl::AttributesMask &activeAttrib
// Compute where the 0-index vertex would be.
const size_t vertexStartOffset = curBufferOffset - (indexRange.start * destStride);
mFunctions->vertexAttribPointer(idx, attrib.size, attrib.type, attrib.normalized,
static_cast<GLsizei>(destStride),
reinterpret_cast<const GLvoid *>(vertexStartOffset));
if (attrib.pureInteger)
{
ASSERT(!attrib.normalized);
mFunctions->vertexAttribIPointer(
idx, attrib.size, attrib.type, static_cast<GLsizei>(destStride),
reinterpret_cast<const GLvoid *>(vertexStartOffset));
}
else
{
mFunctions->vertexAttribPointer(
idx, attrib.size, attrib.type, attrib.normalized,
static_cast<GLsizei>(destStride),
reinterpret_cast<const GLvoid *>(vertexStartOffset));
}
curBufferOffset += destStride * streamedVertexCount;
......
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