[WINED3D 2/3] Print out sampler state names

Ivan Gyurdiev ivg2 at cornell.edu
Fri Jun 9 16:47:16 CDT 2006


...to improve debugging a little bit.

-------------- next part --------------
---

 dlls/wined3d/device.c          |    9 +++++----
 dlls/wined3d/wined3d_private.h |    1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

3d332f6c17cf22a6d7c50a6da816ae78633131b5
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 067a871..cbf2578 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4397,13 +4397,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetSam
     * Ok GForce say it's ok to use glTexParameter/glGetTexParameter(...).
      ******************/
     /** NOTE: States are appled in IWineD3DBaseTextre ApplyStateChanges and IWineD3DDevice SetupTextureStates**/
-    TRACE("(%p) Sampler(%ld), Type(%d) Value(%ld)\n",This, Sampler ,Type, Value);
-
     if(Sampler >  GL_LIMITS(samplers) || Sampler < 0 || Type > WINED3D_HIGHEST_SAMPLER_STATE || Type < 0) {
-         FIXME("out of range %d %d sampler %ld type %u\n", GL_LIMITS(samplers), WINED3D_HIGHEST_SAMPLER_STATE, Sampler, Type);
+         FIXME("sampler %ld type %s(%u) is out of range [max_samplers=%d, highest_state=%d]\n",
+            Sampler, debug_d3dsamplerstate(Type), Type, GL_LIMITS(samplers), WINED3D_HIGHEST_SAMPLER_STATE);
         return WINED3DERR_INVALIDCALL;
     }
-    TRACE("Setting sampler %ld %d to %ld\n", Sampler, Type, Value);
+
+    TRACE("(%p) : Sampler=%ld, Type=%s(%d), Value=%ld\n", This, Sampler,
+        debug_d3dsamplerstate(Type), Type, Value);
     This->updateStateBlock->samplerState[Sampler][Type]         = Value;
     This->updateStateBlock->set.samplerState[Sampler][Type]     = Value;
     This->updateStateBlock->changed.samplerState[Sampler][Type] = Value;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index f1ec8bc..1e4573d 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1160,6 +1160,7 @@ const char* debug_d3dresourcetype(WINED3
 const char* debug_d3dusage(DWORD usage);
 const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType);
 const char* debug_d3drenderstate(DWORD state);
+const char* debug_d3dsamplerstate(DWORD state);
 const char* debug_d3dtexturestate(DWORD state);
 const char* debug_d3dpool(WINED3DPOOL pool);
 
-- 
1.3.3



More information about the wine-patches mailing list