From c9679ce1d22e706bfe1cdc6a5cf8553ffedb2842 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Sat, 31 May 2008 20:48:15 -0700 Subject: [PATCH] r5xx: Dump shader constants when dumping program assembly. --- src/mesa/drivers/dri/r300/r500_fragprog.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c index cdbec35da59..f8321fd1236 100644 --- a/src/mesa/drivers/dri/r300/r500_fragprog.c +++ b/src/mesa/drivers/dri/r300/r500_fragprog.c @@ -1578,11 +1578,24 @@ static char *to_texop(int val) static void dump_program(struct r500_fragment_program *fp) { + + fprintf(stderr, "R500 Fragment Program:\n--------\n"); + int n; uint32_t inst; uint32_t inst0; char *str = NULL; + if (fp->const_nr) { + fprintf(stderr, "--------\nConstants:\n"); + for (n = 0; n < fp->const_nr; n++) { + fprintf(stderr, "Constant %d: %f %f\n\t %f %f\n", n, + fp->constant[n][0], fp->constant[n][1], fp->constant[n][2], + fp->constant[n][3]); + } + fprintf(stderr, "--------\n"); + } + for (n = 0; n < fp->inst_end+1; n++) { inst0 = inst = fp->inst[n].inst0; fprintf(stderr,"%d\t0:CMN_INST 0x%08x:", n, inst); -- 2.30.2