summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h1
-rw-r--r--src/mesa/pipe/softpipe/sp_state_fs.c6
3 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 53c4b03756a..22493f47036 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -292,6 +292,8 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
softpipe->use_sse = FALSE;
#endif
+ softpipe->dump_fs = getenv( "GALLIUM_DUMP_FS" ) != NULL;
+
softpipe->pipe.winsys = pipe_winsys;
softpipe->pipe.destroy = softpipe_destroy;
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index 548151b378e..720297653fe 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -166,6 +166,7 @@ struct softpipe_context {
struct softpipe_tile_cache *tex_cache[PIPE_MAX_SAMPLERS];
int use_sse : 1;
+ int dump_fs : 1;
};
diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c
index a94ec1e92ca..ad8ab561ef6 100644
--- a/src/mesa/pipe/softpipe/sp_state_fs.c
+++ b/src/mesa/pipe/softpipe/sp_state_fs.c
@@ -46,6 +46,12 @@ void * softpipe_create_fs_state(struct pipe_context *pipe,
struct sp_fragment_shader_state *state = malloc(sizeof(struct sp_fragment_shader_state));
state->shader = *templ;
+ if( softpipe->dump_fs ) {
+ tgsi_dump(
+ state->shader.tokens,
+ 0 );
+ }
+
#if defined(__i386__) || defined(__386__)
if (softpipe->use_sse) {
x86_init_func( &state->sse2_program );