From 860896897cef5ab3e1170d4973843053e83eb4bb Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 6 Feb 2020 23:18:46 +0000 Subject: [PATCH] [d3d9] Return D3D_OK in CreateTexture even if AUTOGENMIPMAP flag is stripped D3DOK_NOAUTOGEN is only returned when querying format support, the flag is stripped away silently in CreateTexture if it has to be. Fixes #1409 --- src/d3d9/d3d9_device.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index e7a9b814a8f..b1589b2c340 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -414,8 +414,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture(), initialData); *ppTexture = texture.ref(); - bool mipSuccess = (Usage & D3DUSAGE_AUTOGENMIPMAP) == (texture->GetCommonTexture()->Desc()->Usage & D3DUSAGE_AUTOGENMIPMAP); - return mipSuccess ? D3D_OK : D3DOK_NOAUTOGEN; + return D3D_OK; } catch (const DxvkError& e) { Logger::err(e.message()); @@ -461,8 +460,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture()); *ppVolumeTexture = texture.ref(); - bool mipSuccess = (Usage & D3DUSAGE_AUTOGENMIPMAP) == (texture->GetCommonTexture()->Desc()->Usage & D3DUSAGE_AUTOGENMIPMAP); - return mipSuccess ? D3D_OK : D3DOK_NOAUTOGEN; + return D3D_OK; } catch (const DxvkError& e) { Logger::err(e.message()); @@ -506,8 +504,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture()); *ppCubeTexture = texture.ref(); - bool mipSuccess = (Usage & D3DUSAGE_AUTOGENMIPMAP) == (texture->GetCommonTexture()->Desc()->Usage & D3DUSAGE_AUTOGENMIPMAP); - return mipSuccess ? D3D_OK : D3DOK_NOAUTOGEN; + return D3D_OK; } catch (const DxvkError& e) { Logger::err(e.message());