draw: Add GALLIUM_DUMP_VS environment variable.

Add GALLIUM_DUMP_VS to dump the vertex shader to the console like
GALLIUM_DUMP_FS in softpipe.
This commit is contained in:
Luca Barbieri
2010-01-15 07:28:18 +01:00
committed by Michal Krol
parent 877cadb655
commit f7748d72b4
2 changed files with 8 additions and 0 deletions
@@ -172,6 +172,8 @@ struct draw_context
boolean force_passthrough; /**< never clip or shade */
boolean dump_vs;
double mrd; /**< minimum resolvable depth value, for polygon offset */
/* pipe state that we need: */
+6
View File
@@ -83,6 +83,10 @@ draw_create_vertex_shader(struct draw_context *draw,
{
struct draw_vertex_shader *vs;
if (draw->dump_vs) {
tgsi_dump(shader->tokens, 0);
}
vs = draw_create_vs_llvm( draw, shader );
if (!vs) {
vs = draw_create_vs_sse( draw, shader );
@@ -152,6 +156,8 @@ draw_delete_vertex_shader(struct draw_context *draw,
boolean
draw_vs_init( struct draw_context *draw )
{
draw->dump_vs = debug_get_bool_option("GALLIUM_DUMP_VS", FALSE);
draw->vs.machine = tgsi_exec_machine_create();
if (!draw->vs.machine)
return FALSE;