Commit 89bf4bff by Geoff Lang

Fixed a bug where the vertex data manager was not caching the current value attributes properly.

ANGLEBUG=489 Review URL: https://codereview.appspot.com/18670043
parent efc551f0
......@@ -139,6 +139,16 @@ struct VertexAttribCurrentValueData
}
Type = GL_UNSIGNED_INT;
}
bool operator==(const VertexAttribCurrentValueData &other)
{
return (Type == other.Type && memcmp(FloatValues, other.FloatValues, sizeof(float) * 4) == 0);
}
bool operator!=(const VertexAttribCurrentValueData &other)
{
return !(*this == other);
}
};
}
......
......@@ -256,7 +256,7 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[],
StreamingVertexBufferInterface *buffer = mCurrentValueBuffer[i];
if (memcmp(&mCurrentValue[i], &currentValues[i], sizeof(gl::VertexAttribCurrentValueData)) != 0)
if (mCurrentValue[i] != currentValues[i])
{
if (!buffer->reserveVertexSpace(attribs[i], 1, 0))
{
......@@ -269,6 +269,7 @@ GLenum VertexDataManager::prepareVertexData(const gl::VertexAttribute attribs[],
return GL_OUT_OF_MEMORY;
}
mCurrentValue[i] = currentValues[i];
mCurrentValueOffsets[i] = streamOffset;
}
......
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