Mesa (master): i965: Add disabled debug code for dumping out the WM constant payload.

Eric Anholt anholt at kemper.freedesktop.org
Tue Dec 7 23:14:25 UTC 2010


Module: Mesa
Branch: master
Commit: 2d7dfb8446df87f11494a2a079cf4e0e8d1da030
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d7dfb8446df87f11494a2a079cf4e0e8d1da030

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Dec  7 14:46:27 2010 -0800

i965: Add disabled debug code for dumping out the WM constant payload.

This can significantly ease thinking about the asm.

---

 src/mesa/drivers/dri/i965/gen6_wm_state.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_wm_state.c b/src/mesa/drivers/dri/i965/gen6_wm_state.c
index 333c2a7..d80df4e 100644
--- a/src/mesa/drivers/dri/i965/gen6_wm_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_wm_state.c
@@ -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);
    }
 }




More information about the mesa-commit mailing list