softpipe: make it possible to dump geometry shader from the softpipe
authorZack Rusin <zackr@vmware.com>
Wed, 23 Dec 2009 18:30:12 +0000 (13:30 -0500)
committerZack Rusin <zackr@vmware.com>
Fri, 25 Dec 2009 10:52:18 +0000 (05:52 -0500)
src/gallium/drivers/softpipe/sp_context.c
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_state_fs.c

index 0c890cb940680246146e2c4df76e41276b83aa5e..82173a3c2a3ab7010d849e189f0cf97dc3ea221a 100644 (file)
@@ -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;
index 159547e2a6047a009914b78a9b86ae427eb299f5..6a89bd4b06213d80cd614f1b83aacd0606f5d698 100644 (file)
@@ -148,6 +148,7 @@ struct softpipe_context {
 
    unsigned use_sse : 1;
    unsigned dump_fs : 1;
+   unsigned dump_gs : 1;
    unsigned no_rast : 1;
 };
 
index b904bde25caa176e35aa7d7f8a3c11527eeec5e3..acec62dc2aef2a254b8ab5f7f1e695d73f844f8c 100644 (file)
@@ -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);