Stefan Dösinger : wined3d: Do not mark texture stages above MAX_TEXTURES dirty.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Dec 26 06:49:15 CST 2006


Module: wine
Branch: master
Commit: bc90458244adff31106a83b3ebeb2a96141ac299
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=bc90458244adff31106a83b3ebeb2a96141ac299

Author: Stefan Dösinger <stefandoesinger at gmx.at>
Date:   Mon Dec 25 12:43:02 2006 +0100

wined3d: Do not mark texture stages above MAX_TEXTURES dirty.

---

 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 1c1abab..f22b03d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4593,7 +4593,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         ULONG bindCount = InterlockedIncrement(&new->baseTexture.bindCount);
 
         IWineD3DBaseTexture_AddRef(This->updateStateBlock->textures[Stage]);
-        if(oldTexture == NULL) {
+        if(oldTexture == NULL && Stage < MAX_TEXTURES) {
             /* The source arguments for color and alpha ops have different meanings when a NULL texture is bound,
              * so the COLOROP and ALPHAOP have to be dirtified.
              */
@@ -4612,7 +4612,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl
         LONG bindCount = InterlockedDecrement(&old->baseTexture.bindCount);
 
         IWineD3DBaseTexture_Release(oldTexture);
-        if(pTexture == NULL) {
+        if(pTexture == NULL && Stage < MAX_TEXTURES) {
             IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_COLOROP));
             IWineD3DDeviceImpl_MarkStateDirty(This, STATE_TEXTURESTAGE(Stage, WINED3DTSS_ALPHAOP));
         }




More information about the wine-cvs mailing list