diff options
author | michal <michal@michal-laptop.(none)> | 2007-10-27 14:05:13 +0100 |
---|---|---|
committer | michal <michal@michal-laptop.(none)> | 2007-10-27 19:01:12 +0100 |
commit | 1ab8f6e69615c4f39110cf9202ae4b52238c0bf2 (patch) | |
tree | 4ce628e31954573ce50e2b23d30995d80419b2b3 /src/mesa/pipe/softpipe/sp_quad_fs.c | |
parent | 31b4b261083e546998eba37178ac196049e4e501 (diff) |
Enable SSE2 for fragment shaders.
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_quad_fs.c')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_quad_fs.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index dc8d6e0e23..f079ab9583 100644 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -37,7 +37,10 @@ #include "pipe/llvm/llvmtgsi.h" +#include "x86/rtasm/x86sse.h" + #include "sp_context.h" +#include "sp_state.h" #include "sp_headers.h" #include "sp_quad.h" #include "sp_tex_sample.h" @@ -100,8 +103,8 @@ shade_quad( /* run shader */ /* XXX: Generated code effectively unusable until it handles quad->mask */ - if( !quad->mask && softpipe->fs->executable != NULL ) { - codegen_function func = (codegen_function) softpipe->fs->executable; + if( !quad->mask ) { + codegen_function func = (codegen_function) x86_get_func( &softpipe->fs->sse2_program ); func( machine->Inputs, machine->Outputs, @@ -119,7 +122,7 @@ shade_quad( /* store result color */ if (qss->colorOutSlot >= 0) { /* XXX need to handle multiple color outputs someday */ - assert(qss->stage.softpipe->fs->output_semantic_name[qss->colorOutSlot] + assert(qss->stage.softpipe->fs->shader.output_semantic_name[qss->colorOutSlot] == TGSI_SEMANTIC_COLOR); memcpy( quad->outputs.color, @@ -167,15 +170,15 @@ static void shade_begin(struct quad_stage *qs) /* XXX only do this if the fragment shader changes... */ tgsi_exec_machine_init(&qss->machine, - softpipe->fs->tokens, + softpipe->fs->shader.tokens, PIPE_MAX_SAMPLERS, qss->samplers ); /* find output slots for depth, color */ qss->colorOutSlot = -1; qss->depthOutSlot = -1; - for (i = 0; i < qss->stage.softpipe->fs->num_outputs; i++) { - switch (qss->stage.softpipe->fs->output_semantic_name[i]) { + for (i = 0; i < qss->stage.softpipe->fs->shader.num_outputs; i++) { + switch (qss->stage.softpipe->fs->shader.output_semantic_name[i]) { case TGSI_SEMANTIC_POSITION: qss->depthOutSlot = i; break; @@ -190,9 +193,9 @@ static void shade_begin(struct quad_stage *qs) } -static void shade_destroy(struct quad_stage *qs)
-{
- free( qs );
+static void shade_destroy(struct quad_stage *qs) +{ + free( qs ); } |