Skip to content

Commit

Permalink
State writer dump ycbcr conversion objects earlier
Browse files Browse the repository at this point in the history
Sampler and image view create infos can reference a
VkSamplerYcbcrConversion object. This means that the Vulkan state writer
needs to first dump all VkSamplerYcbcrConversion objects before it dumps
samplers and image views
  • Loading branch information
panos-lunarg committed Jan 29, 2025
1 parent 03695a3 commit 175c8f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions framework/encode/vulkan_state_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,13 @@ uint64_t VulkanStateWriter::WriteState(const VulkanStateTable& state_table, uint
WriteMappedMemoryState(state_table);

WriteBufferViewState(state_table);
WriteImageViewState(state_table);
StandardCreateWrite<vulkan_wrappers::SamplerWrapper>(state_table);

// Sampler and image view create infos can reference a VkSamplerYcbcrConversion object (through VkSamplerYcbcrConversionInfo
// in the pnext chain). For that reason dump VkSamplerYcbcrConversion object first.
StandardCreateWrite<vulkan_wrappers::SamplerYcbcrConversionWrapper>(state_table);
StandardCreateWrite<vulkan_wrappers::SamplerWrapper>(state_table);

WriteImageViewState(state_table);

// Retrieve buffer-device-addresses
WriteBufferDeviceAddressState(state_table);
Expand Down

0 comments on commit 175c8f0

Please sign in to comment.