10level9 drivers can return something other than E_INVALIDARG for this case, so we retry for any failure

This commit is contained in:
walbourn_cp 2012-05-02 16:49:10 -07:00
Родитель a6c5c5939a
Коммит e85504e967
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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 ); 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 // Retry with a maxsize determined by feature level
switch( d3dDevice->GetFeatureLevel() ) switch( d3dDevice->GetFeatureLevel() )