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: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Shahbaz Youssefi 2021-01-06 11:36:40 -05:00 коммит произвёл Commit Bot
Родитель 5e28054567
Коммит 07d619cb10
2 изменённых файлов: 11 добавлений и 3 удалений

Просмотреть файл

@ -416,6 +416,13 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
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_TEXTURES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_VERTEX_BUFFERS);
@ -423,6 +430,10 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_SHADER_RESOURCES);
mNewGraphicsCommandBufferDirtyBits.set(DIRTY_BIT_DESCRIPTOR_SETS);
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_TEXTURES);

Просмотреть файл

@ -289,9 +289,6 @@ TEST_P(TransformFeedbackTest, SpanMultipleRenderPasses)
// Fails on Mac GL drivers. http://anglebug.com/4992
ANGLE_SKIP_TEST_IF(IsOpenGL() && IsOSX());
// anglebug.com/5428
ANGLE_SKIP_TEST_IF(IsLinux() && IsIntel() && IsVulkan());
// anglebug.com/5429
ANGLE_SKIP_TEST_IF(IsAndroid() && IsOpenGLES());