From 8f80806920207babfe738de0473f7869542a9186 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 3 Feb 2026 11:09:54 -0800 Subject: [PATCH] Support loading yet another DX10 DDS variant with permissive --- DirectXTex/DirectXTexDDS.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/DirectXTex/DirectXTexDDS.cpp b/DirectXTex/DirectXTexDDS.cpp index b8681ef4..48a2a6d0 100644 --- a/DirectXTex/DirectXTexDDS.cpp +++ b/DirectXTex/DirectXTexDDS.cpp @@ -433,6 +433,22 @@ namespace metadata.dimension = TEX_DIMENSION_TEXTURE1D; break; + case 0 /* D3Dxx_RESOURCE_DIMENSION_UNKNOWN */: + if (!(flags & DDS_FLAGS_PERMISSIVE)) + { + return HRESULT_E_INVALID_DATA; + } + + // Known variant which assumes it is a 2D texture + + #if (__cplusplus >= 201703L) + [[fallthrough]]; + #elif defined(__clang__) + [[clang::fallthrough]]; + #elif defined(_MSC_VER) + __fallthrough; + #endif + case DDS_DIMENSION_TEXTURE2D: if (d3d10ext->miscFlag & DDS_RESOURCE_MISC_TEXTURECUBE) {