diff options
author | Zack Rusin <zack@tungstengraphics.com> | 2007-10-29 10:59:24 -0400 |
---|---|---|
committer | Zack Rusin <zack@tungstengraphics.com> | 2007-10-30 05:15:05 -0400 |
commit | b0f3b5910ebd0737600ab7b1fdc135d74f2617f4 (patch) | |
tree | 2e4ebcc7f6d13ea151aac92cd3f19741a0bf0845 /src/mesa/state_tracker | |
parent | 8b2f997af572dd3aca00c4888adf2b0a60656331 (diff) |
Enable immediates in TGSI and work with them in LLVM code.
Enables immediates by default in the TGSI translation code
and adds code handling it in llvm tgsi translation.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 75195968e5..36b41ea7e8 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -38,8 +38,6 @@ #define TGSI_DEBUG 0 -#define EMIT_IMMEDIATES 0 - /* * Map mesa register file to TGSI register file. @@ -60,11 +58,7 @@ map_register_file( case PROGRAM_UNIFORM: return TGSI_FILE_CONSTANT; case PROGRAM_CONSTANT: -#if EMIT_IMMEDIATES return TGSI_FILE_IMMEDIATE; -#else - return TGSI_FILE_CONSTANT; -#endif case PROGRAM_INPUT: return TGSI_FILE_INPUT; case PROGRAM_OUTPUT: @@ -101,10 +95,8 @@ map_register_file_index( case TGSI_FILE_OUTPUT: return outputMapping[index]; -#if EMIT_IMMEDIATES case TGSI_FILE_IMMEDIATE: return immediateMapping[index]; -#endif default: return index; @@ -166,7 +158,6 @@ convert_writemask( return writemask; } -#if EMIT_IMMEDIATES static struct tgsi_full_immediate make_immediate(const float *value, uint size) { @@ -177,7 +168,6 @@ make_immediate(const float *value, uint size) imm.u.ImmediateFloat32 = (struct tgsi_immediate_float32 *) value; return imm; } -#endif static void compile_instruction( @@ -661,9 +651,7 @@ tgsi_translate_mesa_program( struct tgsi_full_instruction fullinst; GLuint preamble_size = 0; GLuint immediates[1000]; -#if EMIT_IMMEDIATES GLuint numImmediates = 0; -#endif assert(procType == TGSI_PROCESSOR_FRAGMENT || procType == TGSI_PROCESSOR_VERTEX); @@ -804,7 +792,6 @@ tgsi_translate_mesa_program( } /* immediates/literals */ -#if EMIT_IMMEDIATES for (i = 0; i < program->Parameters->NumParameters; i++) { if (program->Parameters->Parameters[i].Type == PROGRAM_CONSTANT) { struct tgsi_full_immediate fullimm @@ -818,7 +805,6 @@ tgsi_translate_mesa_program( numImmediates++; } } -#endif for( i = 0; i < program->NumInstructions; i++ ) { compile_instruction( |