diff options
author | Brian <brian.paul@tungstengraphics.com> | 2008-01-16 17:21:05 -0700 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-01-17 12:24:22 +0900 |
commit | 310e7ca44b33558a9aa22f43024d1bfb63642128 (patch) | |
tree | d9b1c6639affd011221dbddf9e1b3ccebb075daf /src | |
parent | bf3bdb3b42632e7621e1cbae0d24e60b05ce16e0 (diff) |
temporarily don't emit TGSI immediates, use the constant buffer
This allows a few more programs to run and not crash.
Need to get constant buffer uploads working...
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 325aa20173..936ba9ed85 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -41,6 +41,7 @@ #define TGSI_DEBUG 0 +#define EMIT_IMMEDIATES 0 /* * Map mesa register file to TGSI register file. @@ -68,12 +69,17 @@ map_register_file( case PROGRAM_STATE_VAR: case PROGRAM_NAMED_PARAM: case PROGRAM_UNIFORM: - if (immediateMapping[index] != ~0) + if (immediateMapping[index] != ~0) { return TGSI_FILE_IMMEDIATE; + } else 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: @@ -828,7 +834,7 @@ tgsi_translate_mesa_program( /* immediates/literals */ memset(immediates, ~0, sizeof(immediates)); - +#if EMIT_IMMEDIATES for (i = 0; program->Parameters && i < program->Parameters->NumParameters; i++) { if (program->Parameters->Parameters[i].Type == PROGRAM_CONSTANT) { @@ -843,6 +849,7 @@ tgsi_translate_mesa_program( numImmediates++; } } +#endif /* constant buffer refs */ { |