[Mesa-dev] [PATCH 15/21] glsl: Use short names for conditional temporaries
Ian Romanick
idr at freedesktop.org
Tue May 27 19:49:10 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
Reduces the peak ir_variable memory usage in a trimmed apitrace of dota2
by 18KiB on 64-bit.
Before: IR MEM: variable usage / name / total: 5746368 1140817 6887185
After: IR MEM: variable usage / name / total: 5746368 1121441 6867809
Reduces the peak ir_variable memory usage in a trimmed apitrace of dota2
by 12KiB on 32-bit.
Before: IR MEM: variable usage / name / total: 4327584 800183 5127767
After: IR MEM: variable usage / name / total: 4327584 787727 5115311
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
src/glsl/ast_to_hir.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 3fcec19..bff2e0a 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -1596,7 +1596,7 @@ ast_expression::do_hir(exec_list *instructions,
result = (cond_val->value.b[0]) ? then_val : else_val;
} else {
ir_variable *const tmp =
- new(ctx) ir_variable(type, "conditional_tmp", ir_var_temporary);
+ new(ctx) ir_variable(type, "$c", ir_var_temporary);
instructions->push_tail(tmp);
ir_if *const stmt = new(ctx) ir_if(op[0]);
--
1.8.1.4
More information about the mesa-dev
mailing list