Record unique texel buffer formats seen during replay

This commit is contained in:
baldurk committed 2025-07-30 22:10:24 +01:00
1 parent 03f0fbe6fa
commit 04474a885a
2 files changed
+14

No files matched your search

+9
View File
@@ -5457,6 +5457,15 @@ size_t WrappedVulkan::DescriptorDataSize(VkDescriptorType type)
void WrappedVulkan::RegisterDescriptor(const bytebuf &key, const DescriptorSetSlot &data)
{
m_DescriptorLookup.fallback.insert(key, data);
// store unique texel buffer formats used, expecting this to be small and it will help descriptor lookups
if(data.type == DescriptorSlotType::UniformTexelBuffer ||
data.type == DescriptorSlotType::StorageTexelBuffer)
{
VkFormat fmt = VkFormat(data.imageLayoutOrFormat);
if(data.resource != ResourceId() && !m_DescriptorLookup.texelFormats.contains(fmt))
m_DescriptorLookup.texelFormats.push_back(fmt);
}
}
bool WrappedVulkan::IsPartialRenderPassActive()
+5
View File
@@ -472,6 +472,11 @@ private:
// overall lookup of all descriptors by bytes, fallback in case any others don't work - we
// expect this to always hit
rdcbytetrie<DescriptorTrieNode> fallback;
// unique texel formats. So that if we fast identify a buffer via address+size we can iterate
// over all of these if we know it's a texel buffer. The expectation is this is short so we
// don't have to store this per-buffer but globally and can just try different possibilities.
rdcarray<VkFormat> texelFormats;
};
DescriptorLookups m_DescriptorLookup;