From: Michel Dänzer Date: Wed, 19 Sep 2007 15:39:04 +0000 (+0100) Subject: Only generate vertex shader code when necessary. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bcc13fd3f8cc1c235ef5114472b0f919a38c096b;p=mesa.git Only generate vertex shader code when necessary. --- 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;