summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_fs.c
diff options
context:
space:
mode:
authormichal <michal@michal-laptop.(none)>2007-09-24 12:32:26 +0100
committermichal <michal@michal-laptop.(none)>2007-09-24 12:32:26 +0100
commitc0dd02219d47f45ce469abbef8044431f6d85d0a (patch)
tree8b5131b9b12a14bf1a47f3669d2678dbfbcabada /src/mesa/state_tracker/st_atom_fs.c
parentc0afc92f00e5153a168fb6df518b7a2e6b3b9406 (diff)
Enable SSE2 for FS.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_fs.c')
-rw-r--r--src/mesa/state_tracker/st_atom_fs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_fs.c b/src/mesa/state_tracker/st_atom_fs.c
index f8a1dc83cf..ef5b941c17 100644
--- a/src/mesa/state_tracker/st_atom_fs.c
+++ b/src/mesa/state_tracker/st_atom_fs.c
@@ -36,6 +36,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_winsys.h"
#include "pipe/tgsi/mesa/mesa_to_tgsi.h"
+#include "pipe/tgsi/exec/tgsi_core.h"
#include "pipe/tgsi/exec/tgsi_dump.h"
#include "st_context.h"
@@ -163,6 +164,14 @@ st_translate_fragment_shader(struct st_context *st,
if (TGSI_DEBUG)
tgsi_dump( stfp->tokens, 0/*TGSI_DUMP_VERBOSE*/ );
+#if defined(USE_X86_ASM) || defined(SLANG_X86)
+ if (stfp->sse2_program.csr == stfp->sse2_program.store)
+ tgsi_emit_sse2_fs( stfp->tokens, &stfp->sse2_program );
+
+ if (!cso->state.executable)
+ ((struct cso_fragment_shader*)cso)->state.executable = (void *) x86_get_func( &stfp->sse2_program );
+#endif
+
stfp->dirty = 0;
return cso;