i965: Add disabled debug code for dumping out the WM constant payload.
authorEric Anholt <eric@anholt.net>
Tue, 7 Dec 2010 22:46:27 +0000 (14:46 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 7 Dec 2010 23:11:27 +0000 (15:11 -0800)
This can significantly ease thinking about the asm.

src/mesa/drivers/dri/i965/gen6_wm_state.c

index 333c2a78424d1faeed60fd18662840bf19d6f0d0..d80df4e254be5e7d6343629ea946129197983952 100644 (file)
@@ -66,6 +66,21 @@ prepare_wm_constants(struct brw_context *brw)
         constants[i] = convert_param(brw->wm.prog_data->param_convert[i],
                                      *brw->wm.prog_data->param[i]);
       }
+
+      if (0) {
+        printf("WM constants:\n");
+        for (i = 0; i < brw->wm.prog_data->nr_params; i++) {
+           if ((i & 7) == 0)
+              printf("g%d: ", brw->wm.prog_data->first_curbe_grf + i / 8);
+           printf("%8f ", constants[i]);
+           if ((i & 7) == 7)
+              printf("\n");
+        }
+        if ((i & 7) != 0)
+           printf("\n");
+        printf("\n");
+      }
+
       drm_intel_gem_bo_unmap_gtt(brw->wm.push_const_bo);
    }
 }