Skip to content

Commit

Permalink
[d3d9] Return D3D_OK in CreateTexture even if AUTOGENMIPMAP flag is s…
Browse files Browse the repository at this point in the history
…tripped

D3DOK_NOAUTOGEN is only returned when querying format support, the flag is stripped away silently in CreateTexture if it has to be.

Fixes #1409
  • Loading branch information
misyltoad committed Feb 6, 2020
1 parent 1f67602 commit 8608968
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/d3d9/d3d9_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 8608968

Please sign in to comment.