H. Verbeet : wined3d:
Ignore SetTextureStageState on unsupported texture stages.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Apr 17 08:12:11 CDT 2007
Module: wine
Branch: master
Commit: 863a0bfe33444a52e672151487686aaf39b96891
URL: http://source.winehq.org/git/wine.git/?a=commit;h=863a0bfe33444a52e672151487686aaf39b96891
Author: H. Verbeet <hverbeet at gmail.com>
Date: Mon Apr 16 21:44:27 2007 +0200
wined3d: Ignore SetTextureStageState on unsupported texture stages.
---
dlls/wined3d/device.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index d4f8ddd..d19d773 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3774,6 +3774,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
TRACE("(%p) : Stage=%d, Type=%s(%d), Value=%d\n", This, Stage, debug_d3dtexturestate(Type), Type, Value);
+ if (Stage >= MAX_TEXTURES) {
+ WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring\n", Stage, MAX_TEXTURES - 1);
+ return WINED3D_OK;
+ }
+
This->updateStateBlock->changed.textureState[Stage][Type] = TRUE;
This->updateStateBlock->set.textureState[Stage][Type] = TRUE;
This->updateStateBlock->textureState[Stage][Type] = Value;
More information about the wine-cvs
mailing list