Respect use_sse flag.
authormichal <michal@michal-laptop.(none)>
Sat, 27 Oct 2007 14:08:00 +0000 (15:08 +0100)
committermichal <michal@michal-laptop.(none)>
Sat, 27 Oct 2007 18:04:19 +0000 (19:04 +0100)
src/mesa/pipe/softpipe/sp_quad_fs.c
src/mesa/pipe/softpipe/sp_state_fs.c

index 1ff4406..701a68e 100644 (file)
@@ -104,7 +104,7 @@ shade_quad(
    /* run shader */
 #if defined(__i386__) || defined(__386__)
    /* XXX: Generated code effectively unusable until it handles quad->mask */
-   if( !quad->mask ) {
+   if( !quad->mask && softpipe->use_sse ) {
       codegen_function func = (codegen_function) x86_get_func( &softpipe->fs->sse2_program );
       func(
          machine->Inputs,
index 86aa80c..a94ec1e 100644 (file)
@@ -49,7 +49,6 @@ void * softpipe_create_fs_state(struct pipe_context *pipe,
 #if defined(__i386__) || defined(__386__)
    if (softpipe->use_sse) {
       x86_init_func( &state->sse2_program );
-
       tgsi_emit_sse2_fs( state->shader.tokens, &state->sse2_program );
    }
 #endif
@@ -69,13 +68,13 @@ void softpipe_bind_fs_state(struct pipe_context *pipe, void *fs)
 void softpipe_delete_fs_state(struct pipe_context *pipe,
                               void *shader)
 {
-#if defined(__i386__) || defined(__386__)
    struct sp_fragment_shader_state *state = shader;
 
+#if defined(__i386__) || defined(__386__)
    x86_release_func( &state->sse2_program );
 #endif
 
-   free(shader);
+   free( state );
 }