Mesa (master): softpipe: make it possible to dump geometry shader from the softpipe
Zack Rusin
zack at kemper.freedesktop.org
Fri Dec 25 10:55:46 UTC 2009
Module: Mesa
Branch: master
Commit: ac96ee1c16419583aa43c9f4100aaca774b9439a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac96ee1c16419583aa43c9f4100aaca774b9439a
Author: Zack Rusin <zackr at vmware.com>
Date: Wed Dec 23 13:30:12 2009 -0500
softpipe: make it possible to dump geometry shader from the softpipe
---
src/gallium/drivers/softpipe/sp_context.c | 1 +
src/gallium/drivers/softpipe/sp_context.h | 1 +
src/gallium/drivers/softpipe/sp_state_fs.c | 4 ++++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 0c890cb..82173a3 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -191,6 +191,7 @@ softpipe_create( struct pipe_screen *screen )
#endif
softpipe->dump_fs = debug_get_bool_option( "GALLIUM_DUMP_FS", FALSE );
+ softpipe->dump_gs = debug_get_bool_option( "SOFTPIPE_DUMP_GS", FALSE );
softpipe->pipe.winsys = screen->winsys;
softpipe->pipe.screen = screen;
diff --git a/src/gallium/drivers/softpipe/sp_context.h b/src/gallium/drivers/softpipe/sp_context.h
index 159547e..6a89bd4 100644
--- a/src/gallium/drivers/softpipe/sp_context.h
+++ b/src/gallium/drivers/softpipe/sp_context.h
@@ -148,6 +148,7 @@ struct softpipe_context {
unsigned use_sse : 1;
unsigned dump_fs : 1;
+ unsigned dump_gs : 1;
unsigned no_rast : 1;
};
diff --git a/src/gallium/drivers/softpipe/sp_state_fs.c b/src/gallium/drivers/softpipe/sp_state_fs.c
index b904bde..acec62d 100644
--- a/src/gallium/drivers/softpipe/sp_state_fs.c
+++ b/src/gallium/drivers/softpipe/sp_state_fs.c
@@ -177,6 +177,10 @@ softpipe_create_gs_state(struct pipe_context *pipe,
if (state == NULL )
goto fail;
+ /* debug */
+ if (softpipe->dump_gs)
+ tgsi_dump(templ->tokens, 0);
+
/* copy shader tokens, the ones passed in will go away.
*/
state->shader.tokens = tgsi_dup_tokens(templ->tokens);
More information about the mesa-commit
mailing list