10level9 drivers can return something other than E_INVALIDARG for this case, so we retry for any failure
This commit is contained in:
Родитель
a6c5c5939a
Коммит
e85504e967
|
@ -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() )
|
||||||
|
|
Загрузка…
Ссылка в новой задаче