Commit 07d619cb by Shahbaz Youssefi Committed by Commit Bot

Vulkan: Fix missing xfb buffer rebind on new command buffer

When a command buffer is ended, bindings are lost. This adds a dirty bit to `mNewGraphicsCommandBufferDirtyBits` to make sure transform feedback buffers are bound again on the new command buffer. Bug: angleproject:5428 Change-Id: I7733c93b1eb5d33a77cbee231a83199be950e19f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2611552 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 5e280545
...@@ -416,6 +416,13 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -416,6 +416,13 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mIndexedDirtyBitsMask.set(); mIndexedDirtyBitsMask.set();
// Once a command buffer is ended, all bindings (through |vkCmdBind*| calls) are lost per Vulkan
// spec. Once a new command buffer is allocated, we must make sure every previously bound
// resource is bound again.
//
// Note that currently these dirty bits are set every time a new render pass command buffer is
// begun. However, using ANGLE's SecondaryCommandBuffer, the Vulkan command buffer (which is
// the primary command buffer) is not ended, so technically we don't need to rebind these.
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_VERTEX_BUFFERS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_VERTEX_BUFFERS);
...@@ -423,6 +430,10 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -423,6 +430,10 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DRIVER_UNIFORMS_BINDING); mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DRIVER_UNIFORMS_BINDING);
if (getFeatures().supportsTransformFeedbackExtension.enabled)
{
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_TRANSFORM_FEEDBACK_BUFFERS);
}
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_PIPELINE);
mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES); mNewComputeCommandBufferDirtyBits.set(DIRTY_BIT_TEXTURES);
......
...@@ -289,9 +289,6 @@ TEST_P(TransformFeedbackTest, SpanMultipleRenderPasses) ...@@ -289,9 +289,6 @@ TEST_P(TransformFeedbackTest, SpanMultipleRenderPasses)
// Fails on Mac GL drivers. http://anglebug.com/4992 // Fails on Mac GL drivers. http://anglebug.com/4992
ANGLE_SKIP_TEST_IF(IsOpenGL() && IsOSX()); ANGLE_SKIP_TEST_IF(IsOpenGL() && IsOSX());
// anglebug.com/5428
ANGLE_SKIP_TEST_IF(IsLinux() && IsIntel() && IsVulkan());
// anglebug.com/5429 // anglebug.com/5429
ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGLES()); ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGLES());
......
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