summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-06-29 21:52:39 +0200
committerMaciej Cencora <[email protected]>2009-07-13 19:25:55 +0200
commit0b411a72f3cc3be7ecf9f4676d9860b2b56f084e (patch)
treeeb222f868b5faa1cb7d9fbc2239bbe37ac6ac5d6 /src
parent4a6899e080bbdb556926031345ef6a9fbe6d9ff2 (diff)
r300: print vertex program after adding artificial output insts
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 5da9bda281b..a0babeff927 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -1259,6 +1259,12 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
_mesa_memcpy(&vp->key, wanted_key, sizeof(vp->key));
vp->wpos_idx = wpos_idx;
+ if (RADEON_DEBUG & DEBUG_VERTS) {
+ fprintf(stderr, "Initial vertex program:\n");
+ _mesa_print_program(&mesa_vp->Base);
+ fflush(stdout);
+ }
+
if (mesa_vp->IsPositionInvariant) {
_mesa_insert_mvp_code(ctx, mesa_vp);
}
@@ -1267,12 +1273,6 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
pos_as_texcoord(vp, &mesa_vp->Base);
}
- if (RADEON_DEBUG & DEBUG_VERTS) {
- fprintf(stderr, "Vertex program after native rewrite:\n");
- _mesa_print_program(&mesa_vp->Base);
- fflush(stdout);
- }
-
/* Some outputs may be artificially added, to match the inputs of the fragment program.
* Issue 16 of vertex program spec says that all vertex attributes that are unwritten by
* vertex program are undefined, so just use MOV [vertex_result], CONST[0]
@@ -1310,6 +1310,12 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
}
}
+ if (RADEON_DEBUG & DEBUG_VERTS) {
+ fprintf(stderr, "Vertex program after native rewrite:\n");
+ _mesa_print_program(&mesa_vp->Base);
+ fflush(stdout);
+ }
+
assert(mesa_vp->Base.NumInstructions);
vp->num_temporaries = mesa_vp->Base.NumTemporaries;
r300TranslateVertexShader(vp, mesa_vp->Base.Instructions);
@@ -1388,12 +1394,6 @@ void r300SelectVertexShader(r300ContextPtr r300)
return;
}
- if (RADEON_DEBUG & DEBUG_VERTS) {
- fprintf(stderr, "Initial vertex program:\n");
- _mesa_print_program(&vpc->mesa_program.Base);
- fflush(stdout);
- }
-
vp = build_program(ctx, &wanted_key, &vpc->mesa_program, wpos_idx);
vp->next = vpc->progs;
vpc->progs = vp;