Commit e115c3be by Cooper Partin Committed by Jamie Madill

Fixed incorrect buffer count for emulated points rendering

Emulated points rendering for FL9_3 was getting lucky because the value of maxDiff just happened to be large enuough to include the additional pointsprite vertex buffer in the total buffer count used in IASetVertexBuffers. maxDiff is calculated while buffers and offsets are being configured. The pointsprite buffer was not updating maxDiff resulting in an off-by one calculation which causes TDRs on some Qualcomm chipsets. This issue was discovered using Cocos2dx. BUG=angleproject:1176 Change-Id: I3b3af1757e1cef48bbc62e68695a3e239fef77bf Reviewed-on: https://chromium-review.googlesource.com/305752Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: 's avatarCooper Partin <coopp@microsoft.com> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent 7a3e8e24
...@@ -500,6 +500,10 @@ gl::Error InputLayoutCache::applyVertexBuffers(const std::vector<TranslatedAttri ...@@ -500,6 +500,10 @@ gl::Error InputLayoutCache::applyVertexBuffers(const std::vector<TranslatedAttri
instancedPointSpritesActive ? pointSpriteVertexStride : 0; instancedPointSpritesActive ? pointSpriteVertexStride : 0;
mCurrentVertexOffsets[nextAvailableIndex] = 0; mCurrentVertexOffsets[nextAvailableIndex] = 0;
// Update maxDiff to include the additional point sprite vertex buffer
// to ensure that IASetVertexBuffers uses the correct buffer count.
maxDiff = std::max(maxDiff, nextAvailableIndex);
if (!mPointSpriteIndexBuffer) if (!mPointSpriteIndexBuffer)
{ {
// Create an index buffer and set it for pointsprite rendering // Create an index buffer and set it for pointsprite rendering
......
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