summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_mesa_to_tgsi.c
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-11-17 10:52:28 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2016-11-17 12:53:12 +1100
commitc3df65c123c6392b0b116900395a89fd3dbb9b85 (patch)
tree2b7c4a89aff0ccbbfb7f9fec4e0b0459858b58bb /src/mesa/state_tracker/st_mesa_to_tgsi.c
parentd6bdb3a86293da2164e9355f0262ef83afeece7f (diff)
st/mesa/r200/i915/i965: move ARB program fields into a union
It's common for games to compile 2000 programs or more so at 32bits x 2000 programs x 22 fields x 2 (at least) stages This should give us something like 352 kilobytes in savings once we add some more glsl only fields. Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'src/mesa/state_tracker/st_mesa_to_tgsi.c')
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 9dc8f224ba3..0a225ae0809 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -906,8 +906,8 @@ st_translate_mesa_program(
/* Declare address register.
*/
- if (program->NumAddressRegs > 0) {
- debug_assert( program->NumAddressRegs == 1 );
+ if (program->arb.NumAddressRegs > 0) {
+ debug_assert( program->arb.NumAddressRegs == 1 );
t->address[0] = ureg_DECL_address( ureg );
}
@@ -952,11 +952,11 @@ st_translate_mesa_program(
}
}
- if (program->IndirectRegisterFiles & (1 << PROGRAM_TEMPORARY)) {
+ if (program->arb.IndirectRegisterFiles & (1 << PROGRAM_TEMPORARY)) {
/* If temps are accessed with indirect addressing, declare temporaries
* in sequential order. Else, we declare them on demand elsewhere.
*/
- for (i = 0; i < program->NumTemporaries; i++) {
+ for (i = 0; i < program->arb.NumTemporaries; i++) {
/* XXX use TGSI_FILE_TEMPORARY_ARRAY when it's supported by ureg */
t->temps[i] = ureg_DECL_temporary( t->ureg );
}
@@ -987,7 +987,7 @@ st_translate_mesa_program(
* array.
*/
case PROGRAM_CONSTANT:
- if (program->IndirectRegisterFiles & PROGRAM_ANY_CONST)
+ if (program->arb.IndirectRegisterFiles & PROGRAM_ANY_CONST)
t->constants[i] = ureg_DECL_constant( ureg, i );
else
t->constants[i] =
@@ -1019,8 +1019,8 @@ st_translate_mesa_program(
/* Emit each instruction in turn:
*/
- for (i = 0; i < program->NumInstructions; i++)
- compile_instruction(ctx, t, &program->Instructions[i]);
+ for (i = 0; i < program->arb.NumInstructions; i++)
+ compile_instruction(ctx, t, &program->arb.Instructions[i]);
out:
free(t->constants);