Browse Source

vulkan: fix validation error when creating a non-square array texture.

Sasha Szpakowski 1 year ago
parent
commit
9473c8d710
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/graphics/vulkan/Texture.cpp

+ 1 - 1
src/modules/graphics/vulkan/Texture.cpp

@@ -112,7 +112,7 @@ bool Texture::loadVolatile()
 			}
 		}
 
-		if (texType == TEXTURE_CUBE || (texType == TEXTURE_2D_ARRAY && layerCount >= 6))
+		if (texType == TEXTURE_CUBE || (texType == TEXTURE_2D_ARRAY && layerCount >= 6 && pixelWidth == pixelHeight))
 			createFlags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
 
 		msaaSamples = vgfx->getMsaaCount(requestedMSAA);