wined3d: Add some traces to state handlers.

Henri Verbeet hverbeet at codeweavers.com
Thu Feb 19 01:53:50 CST 2009


Should make it a bit clearer what's happening in some cases.
---
 dlls/wined3d/arb_program_shader.c |    4 ++++
 dlls/wined3d/state.c              |    9 +++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c
index 6bc152a..33619b6 100644
--- a/dlls/wined3d/arb_program_shader.c
+++ b/dlls/wined3d/arb_program_shader.c
@@ -2975,6 +2975,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
     const struct arbfp_ffp_desc *desc;
     unsigned int i;
 
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if(isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE))) {
         if(!use_pshader && device->shader_backend == &arb_program_shader_backend && context->last_was_pshader) {
             /* Reload fixed function constants since they collide with the pixel shader constants */
@@ -3061,6 +3063,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
 static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     enum fogsource new_source;
 
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if(!isStateDirty(context, STATE_PIXELSHADER)) {
         fragment_prog_arbfp(state, stateblock, context);
     }
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index 3dc0b47..c3344f6 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -469,6 +469,8 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
     float ref;
     BOOL enable_ckey = FALSE;
 
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     /* Find out if the texture on the first stage has a ckey set
      * The alpha state func reads the texture settings, even though alpha and texture are not grouped
      * together. This is to avoid making a huge alpha+texture+texture stage+ckey block due to the hardly
@@ -897,6 +899,9 @@ static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock,
 }
 
 static void state_fog_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
+
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if (!stateblock->renderState[WINED3DRS_FOGENABLE]) return;
 
     /* Table fog on: Never use fog coords, and use per-fragment fog */
@@ -981,6 +986,8 @@ void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC
 void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
     enum fogsource new_source;
 
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if (!stateblock->renderState[WINED3DRS_FOGENABLE]) {
         /* No fog? Disable it, and we're done :-) */
         glDisableWINE(GL_FOG);
@@ -3285,6 +3292,8 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
     DWORD sampler = state - STATE_SAMPLER(0);
     IWineD3DBaseTexture *texture = stateblock->textures[sampler];
 
+    TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
+
     if(!texture) return;
     /* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates
      * IWineD3DBaseTexture::ApplyStateChanges multiplies the set matrix with a fixup matrix. Before the
-- 
1.6.0.6



--------------050905080102060100060107--



More information about the wine-patches mailing list