From 3ac574b6b543b1ee770a3dc3123d533d8d01c925 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 20 Jan 2017 14:58:08 -0800 Subject: [PATCH] Add check of mips support for IsSupportedTexture --- DirectXTex/DirectXTexD3D11.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DirectXTex/DirectXTexD3D11.cpp b/DirectXTex/DirectXTexD3D11.cpp index 45974dc..7b56403 100644 --- a/DirectXTex/DirectXTexD3D11.cpp +++ b/DirectXTex/DirectXTexD3D11.cpp @@ -260,6 +260,11 @@ bool DirectX::IsSupportedTexture( formatSupport = 0; } + if (metadata.mipLevels > 1 && !(formatSupport & D3D11_FORMAT_SUPPORT_MIP)) + { + return false; + } + switch (metadata.dimension) { case TEX_DIMENSION_TEXTURE1D: