Browse Source

[Vulkan] Descriptor Pool bug fix

a bank could be (incorrectly) considered a superset if it had enough image buffer descriptors but not enough storage image descriptors, causing the allocator to pick a bank that can’t actually satisfy VK_DESCRIPTOR_TYPE_STORAGE_IMAGE demand resulting in sham allocations and creation of new pools.
Note to testers,
please look for any regressions in terms of visuals and most importantly please test the performance and ram usage.
pull/2564/head
wildcard 6 months ago
committed by crueter
parent
commit
f5b3c7c6b6
  1. 2
      src/video_core/renderer_vulkan/vk_descriptor_pool.cpp

2
src/video_core/renderer_vulkan/vk_descriptor_pool.cpp

@ -31,7 +31,7 @@ struct DescriptorBank {
bool DescriptorBankInfo::IsSuperset(const DescriptorBankInfo& subset) const noexcept { bool DescriptorBankInfo::IsSuperset(const DescriptorBankInfo& subset) const noexcept {
return uniform_buffers >= subset.uniform_buffers && storage_buffers >= subset.storage_buffers && return uniform_buffers >= subset.uniform_buffers && storage_buffers >= subset.storage_buffers &&
texture_buffers >= subset.texture_buffers && image_buffers >= subset.image_buffers && texture_buffers >= subset.texture_buffers && image_buffers >= subset.image_buffers &&
textures >= subset.textures && images >= subset.image_buffers;
textures >= subset.textures && images >= subset.images;
} }
template <typename Descriptors> template <typename Descriptors>

Loading…
Cancel
Save