Commit 0e49e6b5 by Jamie Madill Committed by Commit Bot

D3D: Fix static promotion of dynamic index data.

The static promotion somehow slipped into the direct usage check, meaning we would never promote dynamic index data to static, even if unchanged for many frames. Fix this by putting the update back in the correct place. BUG=angleproject:1334 Change-Id: I90897fcd2f6a2b231ccef9f1fa044d276b238b56 Reviewed-on: https://chromium-review.googlesource.com/331388Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 3f01e6c2
......@@ -210,7 +210,6 @@ gl::Error IndexDataManager::prepareIndexData(GLenum srcType,
translated->serial = buffer->getSerial();
translated->startIndex = (offset >> srcTypeInfo.bytesShift);
translated->startOffset = offset;
buffer->promoteStaticUsage(count << srcTypeInfo.bytesShift);
return gl::Error(GL_NO_ERROR);
}
else
......@@ -247,6 +246,7 @@ gl::Error IndexDataManager::prepareIndexData(GLenum srcType,
{
return error;
}
buffer->promoteStaticUsage(count << srcTypeInfo.bytesShift);
}
else
{
......
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