summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2007-09-28 07:33:54 -0400
committerZack Rusin <[email protected]>2007-09-28 12:29:30 -0400
commit8731e391f5a8bb45adb53242b0a473707c0c024c (patch)
treee1065a99cfd679a4063981524a705886da0a0b52 /src/mesa/state_tracker
parenta1a989f0be8dc34082b52bb3b3a6eacb36d9e75e (diff)
Use sse only if GALLIUM_SSE is defined
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_program.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 116b59a067a..a41b953a21d 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -36,6 +36,7 @@
#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"
@@ -391,11 +392,13 @@ st_translate_fragment_program(struct st_context *st,
tgsi_dump( tokensOut, 0/*TGSI_DUMP_VERBOSE*/ );
#if defined(__i386__) || defined(__386__)
- if (stfp->sse2_program.csr == stfp->sse2_program.store)
- tgsi_emit_sse2_fs( tokensOut, &stfp->sse2_program );
+ if (draw_use_sse(st->draw)) {
+ 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;