summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_print.c
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/prog_print.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 <[email protected]>
Diffstat (limited to 'src/mesa/program/prog_print.c')
-rw-r--r--src/mesa/program/prog_print.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index d34187f7adf..bdeb8fd6752 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -803,10 +803,10 @@ _mesa_fprint_program_opt(FILE *f,
fprintf(f, "# Geometry Shader\n");
}
- for (i = 0; i < prog->NumInstructions; i++) {
+ for (i = 0; i < prog->arb.NumInstructions; i++) {
if (lineNumbers)
fprintf(f, "%3d: ", i);
- indent = _mesa_fprint_instruction_opt(f, prog->Instructions + i,
+ indent = _mesa_fprint_instruction_opt(f, prog->arb.Instructions + i,
indent, mode, prog);
}
}
@@ -862,13 +862,14 @@ _mesa_fprint_program_parameters(FILE *f,
fprintf(f, "OutputsWritten: %" PRIx64 " (0b%s)\n",
(uint64_t) prog->info.outputs_written,
binary(prog->info.outputs_written));
- fprintf(f, "NumInstructions=%d\n", prog->NumInstructions);
- fprintf(f, "NumTemporaries=%d\n", prog->NumTemporaries);
- fprintf(f, "NumParameters=%d\n", prog->NumParameters);
- fprintf(f, "NumAttributes=%d\n", prog->NumAttributes);
- fprintf(f, "NumAddressRegs=%d\n", prog->NumAddressRegs);
+ fprintf(f, "NumInstructions=%d\n", prog->arb.NumInstructions);
+ fprintf(f, "NumTemporaries=%d\n", prog->arb.NumTemporaries);
+ fprintf(f, "NumParameters=%d\n", prog->arb.NumParameters);
+ fprintf(f, "NumAttributes=%d\n", prog->arb.NumAttributes);
+ fprintf(f, "NumAddressRegs=%d\n", prog->arb.NumAddressRegs);
fprintf(f, "IndirectRegisterFiles: 0x%x (0b%s)\n",
- prog->IndirectRegisterFiles, binary(prog->IndirectRegisterFiles));
+ prog->arb.IndirectRegisterFiles,
+ binary(prog->arb.IndirectRegisterFiles));
fprintf(f, "SamplersUsed: 0x%x (0b%s)\n",
prog->SamplersUsed, binary(prog->SamplersUsed));
fprintf(f, "Samplers=[ ");