From 65e3af51efc9d688ef8face0a44429a90c5dd4c9 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 26 Sep 2007 12:46:45 +0100 Subject: Enable codegen based whenever __i386__ is defined. --- src/mesa/pipe/draw/draw_vertex_shader.c | 10 ++-------- src/mesa/pipe/softpipe/sp_quad_fs.c | 10 ++-------- src/mesa/pipe/tgsi/exec/tgsi_sse2.c | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) (limited to 'src/mesa/pipe') diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index fe4f124dd2..a2e1cdc472 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -64,13 +64,11 @@ compute_clipmask(float cx, float cy, float cz, float cw) #endif #endif -#if defined(USE_X86_ASM) || defined(SLANG_X86) -typedef void (XSTDCALL *sse2_function)( +typedef void (XSTDCALL *codegen_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 @@ -117,16 +115,12 @@ run_vertex_program(struct draw_context *draw, /* run shader */ if( draw->vertex_shader.executable != NULL ) { -#if defined(USE_X86_ASM) || defined(SLANG_X86) - sse2_function func = (sse2_function) draw->vertex_shader.executable; + codegen_function func = (codegen_function) draw->vertex_shader.executable; func( machine.Inputs, machine.Outputs, machine.Consts, machine.Temps ); -#else - assert( 0 ); -#endif } else { tgsi_exec_machine_run( &machine ); diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index bff5525b0f..673d339f41 100755 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -64,14 +64,12 @@ quad_shade_stage(struct quad_stage *qs) #endif #endif -#if defined(USE_X86_ASM) || defined(SLANG_X86) -typedef void (XSTDCALL *sse2_function)( +typedef void (XSTDCALL *codegen_function)( const struct tgsi_exec_vector *input, struct tgsi_exec_vector *output, float (*constant)[4], struct tgsi_exec_vector *temporary, const struct tgsi_interp_coef *coef ); -#endif /* This should be done by the fragment shader execution unit (code * generated from the decl instructions). Do it here for now. @@ -121,17 +119,13 @@ shade_quad( /* run shader */ if( softpipe->fs->executable != NULL ) { -#if defined(USE_X86_ASM) || defined(SLANG_X86) - sse2_function func = (sse2_function) softpipe->fs->executable; + codegen_function func = (codegen_function) softpipe->fs->executable; func( machine.Inputs, machine.Outputs, machine.Consts, machine.Temps, machine.InterpCoefs ); -#else - assert( 0 ); -#endif } else { tgsi_exec_machine_run( &machine ); diff --git a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c index cf5e386ddf..e7a6112e6e 100755 --- a/src/mesa/pipe/tgsi/exec/tgsi_sse2.c +++ b/src/mesa/pipe/tgsi/exec/tgsi_sse2.c @@ -2,7 +2,7 @@ #include "tgsi_core.h" #include "x86/rtasm/x86sse.h" -#if defined(USE_X86_ASM) || defined(SLANG_X86) +#if defined(__i386__) || defined(__386__) #define FOR_EACH_CHANNEL( CHAN )\ for( CHAN = 0; CHAN < 4; CHAN++ ) -- cgit v1.2.3