Vulkan: give the irradiance pass cube fallbacks for its cube binding (#7941)

irrmap-f.sdr declares the Material set's texture binding as a samplerCube,
but vulkan_calculate_irrmap filled the array with the 2D fallback and only
replaced element 0 with the environment map, which the validation layer
reports as VUID-vkCmdDraw-viewType-07752 on every irradiance pass. Fill it
with the cube fallback instead.

Co-authored-by: Dustinspace217 <[email protected]>
This commit is contained in:
dustinspace217andDustinspace217 authored and GitHub committed 2026-11-04 18:21:15 +01:00
1 parent 81b9edc2e3
commit e5b591141c
1 file changed
+2 -1
+2 -1
View File
@@ -763,7 +763,8 @@ void vulkan_calculate_irrmap()
writer.writeSet(materialSet, VulkanDescriptorManager::getSetTemplate(DescriptorSetIndex::Material));
{
std::array<vk::DescriptorImageInfo, VulkanDescriptorManager::MAX_TEXTURE_BINDINGS> texImages;
texImages.fill(descManager->getFallbacks().texture2D);
// irrmap-f.sdr declares this binding as samplerCube, so every element needs a cube view
texImages.fill(descManager->getFallbacks().textureCube);
texImages[0].imageView = envmapView;
writer.setImageArray(MaterialBinding::TextureArray, texImages);
}