From e5b591141c48b5295dbb46d84e1edd02e51e1727 Mon Sep 17 00:00:00 2001 From: dustinspace217 Date: Wed, 4 Nov 2026 09:21:15 -0800 Subject: [PATCH] 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 --- code/graphics/vulkan/VulkanDrawAPI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/graphics/vulkan/VulkanDrawAPI.cpp b/code/graphics/vulkan/VulkanDrawAPI.cpp index 162b67bf2d..edb2461f9d 100644 --- a/code/graphics/vulkan/VulkanDrawAPI.cpp +++ b/code/graphics/vulkan/VulkanDrawAPI.cpp @@ -763,7 +763,8 @@ void vulkan_calculate_irrmap() writer.writeSet(materialSet, VulkanDescriptorManager::getSetTemplate(DescriptorSetIndex::Material)); { std::array 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); }