aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2008-05-31 20:48:15 -0700
committerCorbin Simpson <[email protected]>2008-05-31 20:48:15 -0700
commitc9679ce1d22e706bfe1cdc6a5cf8553ffedb2842 (patch)
tree2f53d05647a0df78f2391180374c35911e4c4e03 /src
parent7013eecf282d2b1151cdb5cd3ba356295e1e1b79 (diff)
r5xx: Dump shader constants when dumping program assembly.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c13
1 files changed, 13 insertions, 0 deletions
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);