Zebediah Figura : d3d9: Retrieve texture states from the primary stateblock.
Alexandre Julliard
julliard at winehq.org
Thu Feb 13 15:36:31 CST 2020
Module: wine
Branch: master
Commit: 6aa0e182c22c7a9a1bc50ae515ba368d77367d6f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6aa0e182c22c7a9a1bc50ae515ba368d77367d6f
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed Feb 12 09:21:53 2020 -0600
d3d9: Retrieve texture states from the primary stateblock.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3d9/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index e2044b98ff..55b891426c 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -2625,14 +2625,14 @@ static HRESULT WINAPI d3d9_device_GetTextureStageState(IDirect3DDevice9Ex *iface
TRACE("iface %p, stage %u, state %#x, value %p.\n", iface, stage, state, value);
- if (state >= ARRAY_SIZE(tss_lookup))
+ if (state >= ARRAY_SIZE(tss_lookup) || tss_lookup[state] == WINED3D_TSS_INVALID)
{
WARN("Invalid state %#x passed.\n", state);
return D3D_OK;
}
wined3d_mutex_lock();
- *value = wined3d_device_get_texture_stage_state(device->wined3d_device, stage, tss_lookup[state]);
+ *value = wined3d_stateblock_get_state(device->state)->texture_states[stage][tss_lookup[state]];
wined3d_mutex_unlock();
return D3D_OK;
More information about the wine-cvs
mailing list