Use correct size for storage/input attachment view descriptors

This commit is contained in:
baldurk committed 2025-09-03 09:42:09 +01:00
1 parent 2a87474e3c
commit 9b025ef659
1 file changed
+8 -2
@@ -1361,14 +1361,20 @@ void WrappedVulkan::RegisterDescriptor(const bytebuf &key, const DescriptorSetSl
{key.data() + m_DescriptorLookup.combinedSamplerOffset, samplerSize}, samplerData);
}
if((data.type == DescriptorSlotType::InputAttachment ||
data.type == DescriptorSlotType::StorageImage || data.type == DescriptorSlotType::SampledImage ||
if((data.type == DescriptorSlotType::SampledImage ||
data.type == DescriptorSlotType::CombinedImageSampler) &&
m_DescriptorLookup.sampled != ImageDescriptorFormat::Indexed2012)
{
m_CreationInfo.m_Image[m_CreationInfo.m_ImageView[data.resource].image].viewDescriptors.push_back(
{bytebuf(key.data(), sampledSize), data.resource});
}
else if((data.type == DescriptorSlotType::InputAttachment ||
data.type == DescriptorSlotType::StorageImage) &&
m_DescriptorLookup.storage != ImageDescriptorFormat::Indexed2012)
{
m_CreationInfo.m_Image[m_CreationInfo.m_ImageView[data.resource].image].viewDescriptors.push_back(
{key, data.resource});
}
}
template <>