Henri Verbeet : wined3d: Update the pixelshader when the texture type changes.

Alexandre Julliard julliard at winehq.org
Mon Jan 12 10:40:56 CST 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Jan 12 10:17:50 2009 +0100

wined3d: Update the pixelshader when the texture type changes.

---

 dlls/wined3d/device.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index ed343dd..ba9ab1e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4578,8 +4578,15 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTexture(IWineD3DDevice *iface, DWORD
     if (NULL != This->updateStateBlock->textures[Stage]) {
         IWineD3DBaseTextureImpl *new = (IWineD3DBaseTextureImpl *) This->updateStateBlock->textures[Stage];
         ULONG bindCount = InterlockedIncrement(&new->baseTexture.bindCount);
+        UINT dimensions = IWineD3DBaseTexture_GetTextureDimensions(pTexture);
 
         IWineD3DBaseTexture_AddRef(This->updateStateBlock->textures[Stage]);
+
+        if (!oldTexture || dimensions != IWineD3DBaseTexture_GetTextureDimensions(oldTexture))
+        {
+            IWineD3DDeviceImpl_MarkStateDirty(This, STATE_PIXELSHADER);
+        }
+
         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.




More information about the wine-cvs mailing list