aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-09-19 16:39:04 +0100
committerMichel Dänzer <[email protected]>2007-09-19 16:39:04 +0100
commitbcc13fd3f8cc1c235ef5114472b0f919a38c096b (patch)
tree8bdd739b955e7af7f32dd4850f532ff4ece0bb7a
parentf22e920f478d8732695913ec0d1f7244b451a8f5 (diff)
Only generate vertex shader code when necessary.
-rw-r--r--src/mesa/state_tracker/st_atom_vs.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_atom_vs.c b/src/mesa/state_tracker/st_atom_vs.c
index 166dc70b083..322fabc4567 100644
--- a/src/mesa/state_tracker/st_atom_vs.c
+++ b/src/mesa/state_tracker/st_atom_vs.c
@@ -112,10 +112,11 @@ static void compile_vs( struct st_context *st )
tgsi_dump( vp->tokens, 0 );
#if defined(USE_X86_ASM) || defined(SLANG_X86)
- tgsi_emit_sse2(
- vp->tokens,
- &vp->sse2_program );
- cached->executable = (void *) x86_get_func( &vp->sse2_program );
+ if (vp->sse2_program.csr == vp->sse2_program.store)
+ tgsi_emit_sse2( vp->tokens, &vp->sse2_program );
+
+ if (!cached->executable)
+ cached->executable = (void *) x86_get_func( &vp->sse2_program );
#endif
vp->dirty = 0;