mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-07 08:15:59 -10:00
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:
1 parent
81b9edc2e3
commit
e5b591141c
1 file changed
+2
-1
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user