summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-17 10:52:28 +1100
committerTimothy Arceri <[email protected]>2016-11-17 12:53:12 +1100
commitc3df65c123c6392b0b116900395a89fd3dbb9b85 (patch)
tree2b7c4a89aff0ccbbfb7f9fec4e0b0459858b58bb /src/mesa/program/ir_to_mesa.cpp
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 <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 7ea375f0362..c42c19b4110 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2810,7 +2810,7 @@ get_mesa_program(struct gl_context *ctx,
visit_exec_list(shader->ir, &v);
v.emit(NULL, OPCODE_END);
- prog->NumTemporaries = v.next_temp;
+ prog->arb.NumTemporaries = v.next_temp;
unsigned num_instructions = v.instructions.length();
@@ -2844,12 +2844,12 @@ get_mesa_program(struct gl_context *ctx,
/* Set IndirectRegisterFiles. */
if (mesa_inst->DstReg.RelAddr)
- prog->IndirectRegisterFiles |= 1 << mesa_inst->DstReg.File;
+ prog->arb.IndirectRegisterFiles |= 1 << mesa_inst->DstReg.File;
/* Update program's bitmask of indirectly accessed register files */
for (unsigned src = 0; src < 3; src++)
if (mesa_inst->SrcReg[src].RelAddr)
- prog->IndirectRegisterFiles |= 1 << mesa_inst->SrcReg[src].File;
+ prog->arb.IndirectRegisterFiles |= 1 << mesa_inst->SrcReg[src].File;
switch (mesa_inst->Opcode) {
case OPCODE_IF:
@@ -2877,7 +2877,7 @@ get_mesa_program(struct gl_context *ctx,
}
break;
case OPCODE_ARL:
- prog->NumAddressRegs = 1;
+ prog->arb.NumAddressRegs = 1;
break;
default:
break;
@@ -2910,8 +2910,8 @@ get_mesa_program(struct gl_context *ctx,
fflush(stderr);
}
- prog->Instructions = mesa_instructions;
- prog->NumInstructions = num_instructions;
+ prog->arb.Instructions = mesa_instructions;
+ prog->arb.NumInstructions = num_instructions;
/* Setting this to NULL prevents a possible double free in the fail_exit
* path (far below).