H. Verbeet : wined3d: Only call activate_dimensions() if the texture is used.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 2 09:52:07 CDT 2007


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

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Sun Jul  1 23:41:04 2007 +0200

wined3d: Only call activate_dimensions() if the texture is used.

---

 dlls/wined3d/state.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index cbe30fe..bdb4d5b 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1658,6 +1658,7 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock,
 static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / WINED3D_HIGHEST_TEXTURE_STATE;
     DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[stage];
+    BOOL tex_used = stateblock->wineD3DDevice->fixed_function_usage_map[stage];
 
     TRACE("Setting color op for stage %d\n", stage);
 
@@ -1718,7 +1719,7 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
      * if the sampler for this stage is dirty
      */
     if(!isStateDirty(context, STATE_SAMPLER(stage))) {
-        if (mapped_stage != -1) activate_dimensions(stage, stateblock, context);
+        if (tex_used) activate_dimensions(stage, stateblock, context);
     }
 
     /* Set the texture combiners */




More information about the wine-cvs mailing list