From cf26e39d1b0d7a075bfc7b060a78e67b69bdb5f0 Mon Sep 17 00:00:00 2001 From: Sasha Szpakowski Date: Mon, 9 Oct 2023 13:13:37 -0300 Subject: [PATCH] vulkan: potential fix for compressed textures with mipmaps --- src/modules/graphics/vulkan/Texture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/graphics/vulkan/Texture.cpp b/src/modules/graphics/vulkan/Texture.cpp index 60c55b9a8..6ae53c1c1 100644 --- a/src/modules/graphics/vulkan/Texture.cpp +++ b/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)