From e85504e96722a99cc9d138bedad82f77d9717a3f Mon Sep 17 00:00:00 2001 From: walbourn_cp Date: Wed, 2 May 2012 16:49:10 -0700 Subject: [PATCH] 10level9 drivers can return something other than E_INVALIDARG for this case, so we retry for any failure --- DDSTextureLoader/DDSTextureLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDSTextureLoader/DDSTextureLoader.cpp b/DDSTextureLoader/DDSTextureLoader.cpp index d59fbc0..a0be35f 100644 --- a/DDSTextureLoader/DDSTextureLoader.cpp +++ b/DDSTextureLoader/DDSTextureLoader.cpp @@ -1205,7 +1205,7 @@ static HRESULT CreateTextureFromDDS( _In_ ID3D11Device* d3dDevice, { hr = CreateD3DResources( d3dDevice, resDim, twidth, theight, tdepth, mipCount - skipMip, arraySize, format, isCubeMap, initData.get(), texture, textureView ); - if ( (hr == E_INVALIDARG) && !maxsize && (mipCount > 1) ) + if ( FAILED(hr) && !maxsize && (mipCount > 1) ) { // Retry with a maxsize determined by feature level switch( d3dDevice->GetFeatureLevel() )