From aec07847303921f369ac087558ad24c336db64d0 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 16 Dec 2024 10:53:49 -0800 Subject: [PATCH] --ignore-mips does not apply to array textures (#567) --- DirectXTex/DirectXTexDDS.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/DirectXTex/DirectXTexDDS.cpp b/DirectXTex/DirectXTexDDS.cpp index e2f99269..39b3f212 100644 --- a/DirectXTex/DirectXTexDDS.cpp +++ b/DirectXTex/DirectXTexDDS.cpp @@ -378,7 +378,7 @@ namespace } metadata.mipLevels = pHeader->mipMapCount; - if ((metadata.mipLevels == 0) || (flags & DDS_FLAGS_IGNORE_MIPS)) + if (metadata.mipLevels == 0) { metadata.mipLevels = 1; } @@ -650,6 +650,12 @@ namespace } } + // Special-handling flag for ignoring mipchains on simple DDS files + if ((flags & DDS_FLAGS_IGNORE_MIPS) && (metadata.arraySize == 1)) + { + metadata.mipLevels = 1; + } + // Handle DDS-specific metadata if (ddPixelFormat) {