[WINED3D 6/6] Make GetTexture and GetSamplerState read from the
correct stateblock
Ivan Gyurdiev
ivg231 at gmail.com
Sat Oct 28 18:55:55 CDT 2006
The correct stateblock is the current one, not the update one. This is
the case for every single get call that does something else, and I'll
prove it test-by-test, until they're all correct.
Discovered by the stateblock test for textures.
-------------- next part --------------
---
dlls/wined3d/device.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 33b4e87..dc360db 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4638,7 +4638,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
static HRESULT WINAPI IWineD3DDeviceImpl_GetSamplerState(IWineD3DDevice *iface, DWORD Sampler, WINED3DSAMPLERSTATETYPE Type, DWORD* Value) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
/** TODO: check that sampler is in range **/
- *Value = This->updateStateBlock->samplerState[Sampler][Type];
+ *Value = This->stateBlock->samplerState[Sampler][Type];
TRACE("(%p) : Sampler %d Type %u Returning %d\n", This, Sampler, Type, *Value);
return WINED3D_OK;
@@ -5817,7 +5817,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
TRACE("Attempt to access invalid texture rejected\n");
return WINED3DERR_INVALIDCALL;
}
- *ppTexture=This->updateStateBlock->textures[Stage];
+ *ppTexture=This->stateBlock->textures[Stage];
if (*ppTexture)
IWineD3DBaseTexture_AddRef(*ppTexture);
--
1.4.2.4
More information about the wine-patches
mailing list