From 44ab6ea5fce3361f6c4152545c8627f93e4e430f Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 3 Feb 2026 15:48:00 -0800 Subject: [PATCH] Support loading yet another DX10 DDS variant with permissive (#668) --- DirectXTex/DirectXTexDDS.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/DirectXTex/DirectXTexDDS.cpp b/DirectXTex/DirectXTexDDS.cpp index b8681ef..48a2a6d 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) {