Only generate vertex shader code when necessary.
authorMichel Dänzer <michel@tungstengraphics.com>
Wed, 19 Sep 2007 15:39:04 +0000 (16:39 +0100)
committerMichel Dänzer <michel@tungstengraphics.com>
Wed, 19 Sep 2007 15:39:04 +0000 (16:39 +0100)
src/mesa/state_tracker/st_atom_vs.c

index 166dc70b083dc65a7e03cc66fe29c937245b2712..322fabc45678fa7d360ad104d347c9db80199927 100644 (file)
@@ -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;