Revert "Use sse only if GALLIUM_SSE is defined"
authorZack Rusin <zack@tungstengraphics.com>
Fri, 28 Sep 2007 16:28:06 +0000 (12:28 -0400)
committerZack Rusin <zack@tungstengraphics.com>
Fri, 28 Sep 2007 16:28:06 +0000 (12:28 -0400)
This reverts commit 57b5d3605745c96ddc2b6de7d50c93db65ba1257.

src/mesa/pipe/draw/draw_context.c
src/mesa/pipe/draw/draw_context.h
src/mesa/pipe/draw/draw_private.h
src/mesa/pipe/draw/draw_vertex_shader.c
src/mesa/state_tracker/st_program.c

index 3fb667ab1a9d21d87add30574e8143b35230c306..5efb173228f879826250239c8eca266800c13143 100644 (file)
@@ -41,12 +41,6 @@ struct draw_context *draw_create( void )
 {
    struct draw_context *draw = CALLOC_STRUCT( draw_context );
 
-#if defined(__i386__) || defined(__386__)
-   draw->use_sse = getenv("GALLIUM_SSE") != NULL;
-#else
-   draw->use_sse = false;
-#endif
-
    /* create pipeline stages */
    draw->pipeline.unfilled  = draw_unfilled_stage( draw );
    draw->pipeline.twoside   = draw_twoside_stage( draw );
@@ -250,9 +244,4 @@ void draw_free_tmps( struct draw_stage *stage )
    }
 }
 
-boolean draw_use_sse(struct draw_context *draw)
-{
-   return draw->use_sse;
-}
-
 
index 8e2232244cc6308e459711a571378a41b3f06461..398e96d94d21bd136206df6d6ef03dffb07035d5 100644 (file)
@@ -99,7 +99,6 @@ void draw_bind_vertex_shader(struct draw_context *draw,
 void draw_delete_vertex_shader(struct draw_context *draw,
                                void *vcso);
 
-boolean draw_use_sse(struct draw_context *draw);
 
 void
 draw_set_vertex_buffer(struct draw_context *draw,
index 12a970a6711f34f4172f8b075e81d736012a04ee..2f52299f74a1e890d3703f425fa8f2ee4093b1bf 100644 (file)
@@ -220,8 +220,6 @@ struct draw_context
       struct prim_header queue[PRIM_QUEUE_LENGTH];
       unsigned queue_nr;
    } pq;
-
-   int use_sse : 1;
 };
 
 
index 3518bd52a3f01e74fcf07bbe619531a1b18314c8..f7ddbd19093b2e18c8a53faf3b90367bcb3dbac9 100644 (file)
@@ -220,11 +220,10 @@ draw_create_vertex_shader(struct draw_context *draw,
 #if defined(__i386__) || defined(__386__)
    x86_init_func(&vs->sse2_program);
 
-   if (draw->use_sse) {
-      tgsi_emit_sse2(shader->tokens, &vs->sse2_program);
-      ((struct pipe_shader_state*)(vs->state))->executable =
-         x86_get_func(&vs->sse2_program);
-   }
+   tgsi_emit_sse2(shader->tokens, &vs->sse2_program);
+
+   ((struct pipe_shader_state*)(vs->state))->executable =
+      x86_get_func(&vs->sse2_program);
 #endif
 
    return vs;
index a41b953a21d5d2b35d6c9351401e27204d5ceaab..116b59a067a1620acdd4673c119bf51b56a7f6a4 100644 (file)
@@ -36,7 +36,6 @@
 
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
-#include "pipe/draw/draw_context.h"
 #include "pipe/tgsi/mesa/mesa_to_tgsi.h"
 #include "pipe/tgsi/exec/tgsi_core.h"
 
@@ -392,13 +391,11 @@ st_translate_fragment_program(struct st_context *st,
       tgsi_dump( tokensOut, 0/*TGSI_DUMP_VERBOSE*/ );
 
 #if defined(__i386__) || defined(__386__)
-   if (draw_use_sse(st->draw)) {
-      if (stfp->sse2_program.csr == stfp->sse2_program.store)
-         tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program );
+   if (stfp->sse2_program.csr == stfp->sse2_program.store)
+      tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program );
 
-      if (!cso->state.executable)
-         ((struct cso_fragment_shader*)cso)->state.executable = (void *) x86_get_func( &stfp->sse2_program );
-   }
+   if (!cso->state.executable)
+      ((struct cso_fragment_shader*)cso)->state.executable = (void *) x86_get_func( &stfp->sse2_program );
 #endif
 
    return cso;