From bcc13fd3f8cc1c235ef5114472b0f919a38c096b Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Wed, 19 Sep 2007 16:39:04 +0100 Subject: Only generate vertex shader code when necessary. --- src/mesa/state_tracker/st_atom_vs.c | 9 +++++---- 1 file 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; -- cgit v1.2.3