diff options
author | michal <michal@michal-laptop.(none)> | 2007-08-24 17:51:12 +0100 |
---|---|---|
committer | michal <michal@michal-laptop.(none)> | 2007-08-24 17:51:12 +0100 |
commit | 4fd7bc00f06a98e1db2ad886a13566f19895e3c0 (patch) | |
tree | 1bc1703dd3d8cc5ea14aa6e5605619e266d8361f /src/mesa/pipe/draw/draw_prim.c | |
parent | 2c7b74725bfbd0a022ebfada4736d6cb8ac28047 (diff) |
Hook-up SSE2 to VS.
Diffstat (limited to 'src/mesa/pipe/draw/draw_prim.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_prim.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c index 2d613754e8e..09616cf315c 100644 --- a/src/mesa/pipe/draw/draw_prim.c +++ b/src/mesa/pipe/draw/draw_prim.c @@ -113,6 +113,21 @@ fetch_attrib4(const void *ptr, unsigned format, float attrib[4]) } } +#if !defined(XSTDCALL) +#if defined(WIN32) +#define XSTDCALL __stdcall +#else +#define XSTDCALL +#endif +#endif + +#if defined(USE_X86_ASM) || defined(SLANG_X86) +typedef void (XSTDCALL *sse2_function)( + const struct tgsi_exec_vector *input, + struct tgsi_exec_vector *output, + float (*constant)[4], + struct tgsi_exec_vector *temporary ); +#endif /** * Transform vertices with the current vertex program/shader @@ -224,7 +239,21 @@ run_vertex_program(struct draw_context *draw, #endif /* run shader */ - tgsi_exec_machine_run( &machine ); + if( draw->vertex_shader.executable != NULL ) { +#if defined(USE_X86_ASM) || defined(SLANG_X86) + sse2_function func = (sse2_function) draw->vertex_shader.executable; + func( + machine.Inputs, + machine.Outputs, + machine.Consts, + machine.Temps ); +#else + assert( 0 ); +#endif + } + else { + tgsi_exec_machine_run( &machine ); + } #if 0 for (i = 0; i < 4; i++) { |