1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[d3d9] Fix GetTextureStageState using unmapped types

Closes #1378
This commit is contained in:
Joshua Ashton 2020-01-27 01:06:48 +00:00
parent 65f4437417
commit a43223256e

View File

@ -2067,6 +2067,8 @@ namespace dxvk {
DWORD Stage,
D3DTEXTURESTAGESTATETYPE Type,
DWORD* pValue) {
auto dxvkType = RemapTextureStageStateType(Type);
if (unlikely(pValue == nullptr))
return D3DERR_INVALIDCALL;
@ -2075,10 +2077,10 @@ namespace dxvk {
if (unlikely(Stage >= caps::TextureStageCount))
return D3DERR_INVALIDCALL;
if (unlikely(Type >= TextureStageStateCount))
if (unlikely(dxvkType >= TextureStageStateCount))
return D3DERR_INVALIDCALL;
*pValue = m_state.textureStages[Stage][Type];
*pValue = m_state.textureStages[Stage][dxvkType];
return D3D_OK;
}