From 16fe6a0f2d53e63884dcecaf8ba61e0105a92c99 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Fri, 2 Nov 2007 12:18:02 -0400 Subject: Cleanups. Remove some debugging output and try to make sure that Mesa compiles when configured without LLVM --- src/mesa/pipe/softpipe/sp_quad_fs.c | 11 ++++++++--- src/mesa/pipe/softpipe/sp_state_fs.c | 2 -- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c index 2cecfb268a..17fb10ea72 100644 --- a/src/mesa/pipe/softpipe/sp_quad_fs.c +++ b/src/mesa/pipe/softpipe/sp_quad_fs.c @@ -40,7 +40,9 @@ #include "x86/rtasm/x86sse.h" +#ifdef MESA_LLVM #include "pipe/llvm/gallivm.h" +#endif #include "sp_context.h" #include "sp_state.h" @@ -56,7 +58,9 @@ struct quad_shade_stage struct tgsi_exec_machine machine; struct tgsi_exec_vector *inputs, *outputs; int colorOutSlot, depthOutSlot; +#ifdef MESA_LLVM struct gallivm_prog *llvm_prog; +#endif }; @@ -120,9 +124,6 @@ shade_quad( else #endif { -#ifdef MESA_LLVM - /*ga_llvm_prog_exec(softpipe->fs->llvm_prog);*/ -#endif quad->mask &= tgsi_exec_machine_run( machine ); } @@ -159,6 +160,7 @@ shade_quad( } } +#ifdef MESA_LLVM #define DLLVM 0 static void shade_quad_llvm(struct quad_stage *qs, @@ -256,6 +258,7 @@ shade_quad_llvm(struct quad_stage *qs, qs->next->run( qs->next, quad ); } } +#endif /*MESA_LLVM*/ /** * Per-primitive (or per-begin?) setup @@ -272,7 +275,9 @@ static void shade_begin(struct quad_stage *qs) qss->samplers[i].texture = softpipe->texture[i]; } +#ifdef MESA_LLVM qss->llvm_prog = softpipe->fs->llvm_prog; +#endif /* XXX only do this if the fragment shader changes... */ tgsi_exec_machine_init(&qss->machine, softpipe->fs->shader.tokens, diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c index 08a7b58a6f..ba564b16e6 100644 --- a/src/mesa/pipe/softpipe/sp_state_fs.c +++ b/src/mesa/pipe/softpipe/sp_state_fs.c @@ -62,14 +62,12 @@ void * softpipe_create_fs_state(struct pipe_context *pipe, #endif #ifdef MESA_LLVM - fprintf(stderr, "+++++++++++++++++++++++++++++++++++++++++++++++++\n"); state->llvm_prog = gallivm_from_tgsi(state->shader.tokens, GALLIVM_FS); if (!gallivm_global_cpu_engine()) { gallivm_cpu_engine_create(state->llvm_prog); } else gallivm_cpu_jit_compile(gallivm_global_cpu_engine(), state->llvm_prog); - fprintf(stderr, "+++++++++++++++++++++++++++++++++++++++++++++++++\n"); #endif return state; -- cgit v1.2.3