Browse Source

vulkan: potential fix for compressed textures with mipmaps

Sasha Szpakowski 1 year ago
parent
commit
cf26e39d1b
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

@@ -150,7 +150,7 @@ bool Texture::loadVolatile()
 	createTextureImageView();
 	textureSampler = vgfx->getCachedSampler(samplerState);
 
-	if (!isPixelFormatDepthStencil(format) && mipmapCount > 1 && getMipmapsMode() != MIPMAPS_NONE)
+	if (!isPixelFormatDepthStencil(format) && slices.getMipmapCount() <= 1 && getMipmapsMode() != MIPMAPS_NONE)
 		generateMipmaps();
 
 	if (renderTarget)