From: Corbin Simpson Date: Sun, 1 Jun 2008 03:48:15 +0000 (-0700) Subject: r5xx: Dump shader constants when dumping program assembly. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9679ce1d22e706bfe1cdc6a5cf8553ffedb2842;p=mesa.git r5xx: Dump shader constants when dumping program assembly. --- 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);