Commit ca6573eb by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix dirty bit bug when closing RP in setupDraw()

Bug: angleproject:5644 Change-Id: I2e1fa8c4db8eba1beb74c83dcb24cbe2e70ddca6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2694076Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
parent 14ec0d2c
...@@ -823,6 +823,14 @@ angle::Result ContextVk::setupDraw(const gl::Context *context, ...@@ -823,6 +823,14 @@ angle::Result ContextVk::setupDraw(const gl::Context *context,
invalidateGraphicsDriverUniforms(); invalidateGraphicsDriverUniforms();
} }
// If the render pass needs to be recreated, close it before processing dirty bits. This
// operation may add many dirty bits.
ASSERT((mRenderPassCommandBuffer == nullptr) == mGraphicsDirtyBits.test(DIRTY_BIT_RENDER_PASS));
if (mRenderPassCommandBuffer == nullptr)
{
ANGLE_TRY(flushCommandsAndEndRenderPass());
}
DirtyBits dirtyBits = mGraphicsDirtyBits & dirtyBitMask; DirtyBits dirtyBits = mGraphicsDirtyBits & dirtyBitMask;
if (dirtyBits.none()) if (dirtyBits.none())
...@@ -831,13 +839,6 @@ angle::Result ContextVk::setupDraw(const gl::Context *context, ...@@ -831,13 +839,6 @@ angle::Result ContextVk::setupDraw(const gl::Context *context,
return angle::Result::Continue; return angle::Result::Continue;
} }
// If the render pass needs to be recreated, close it before processing dirty bits. This
// operation may add many dirty bits.
if (mRenderPassCommandBuffer == nullptr)
{
ANGLE_TRY(flushCommandsAndEndRenderPass());
}
// Flush any relevant dirty bits. // Flush any relevant dirty bits.
for (DirtyBits::Iterator dirtyBitIter = dirtyBits.begin(); dirtyBitIter != dirtyBits.end(); for (DirtyBits::Iterator dirtyBitIter = dirtyBits.begin(); dirtyBitIter != dirtyBits.end();
++dirtyBitIter) ++dirtyBitIter)
......
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