Skip to content

Commit

Permalink
Fix forgotten handles in VulkanStateWriter (#1391)
Browse files Browse the repository at this point in the history
Some handle types are not correctly handled at WriteState
time. This causes artifacts, for example when
using a frame range to capture Sascha Willem's 'pushdescriptors'.
  • Loading branch information
marius-pelegrin-arm authored Dec 12, 2023
1 parent 668850b commit 80241d6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions framework/encode/vulkan_state_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2917,6 +2917,8 @@ bool VulkanStateWriter::CheckCommandHandle(CommandHandleType handle_type,
{
case CommandHandleType::BufferHandle:
return IsBufferValid(handle_id, state_table);
case CommandHandleType::BufferViewHandle:
return IsBufferViewValid(handle_id, state_table);
case CommandHandleType::CommandBufferHandle:
return (state_table.GetCommandBufferWrapper(handle_id) != nullptr);
case CommandHandleType::DescriptorSetHandle:
Expand All @@ -2937,6 +2939,8 @@ bool VulkanStateWriter::CheckCommandHandle(CommandHandleType handle_type,
return (state_table.GetQueryPoolWrapper(handle_id) != nullptr);
case CommandHandleType::RenderPassHandle:
return (state_table.GetRenderPassWrapper(handle_id) != nullptr);
case CommandHandleType::SamplerHandle:
return (state_table.GetSamplerWrapper(handle_id) != nullptr);
case CommandHandleType::AccelerationStructureNVHandle:
return (state_table.GetAccelerationStructureNVWrapper(handle_id) != nullptr);
case CommandHandleType::AccelerationStructureKHRHandle:
Expand All @@ -2945,6 +2949,16 @@ bool VulkanStateWriter::CheckCommandHandle(CommandHandleType handle_type,
return (state_table.GetIndirectCommandsLayoutNVWrapper(handle_id) != nullptr);
case CommandHandleType::DeferredOperationKHRHandle:
return (state_table.GetDeferredOperationKHRWrapper(handle_id) != nullptr);
case CommandHandleType::MicromapEXTHandle:
return (state_table.GetMicromapEXTWrapper(handle_id) != nullptr);
case CommandHandleType::OpticalFlowSessionNVHandle:
return (state_table.GetOpticalFlowSessionNVWrapper(handle_id) != nullptr);
case CommandHandleType::VideoSessionKHRHandle:
return (state_table.GetVideoSessionKHRWrapper(handle_id) != nullptr);
case CommandHandleType::VideoSessionParametersKHRHandle:
return (state_table.GetVideoSessionParametersKHRWrapper(handle_id) != nullptr);
case CommandHandleType::ShaderEXTHandle:
return (state_table.GetShaderEXTWrapper(handle_id) != nullptr);
default:
GFXRECON_LOG_ERROR("State write is skipping unrecognized handle type when checking handles "
"referenced by command buffers");
Expand Down

0 comments on commit 80241d6

Please sign in to comment.