summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2014-07-14 11:42:42 -0700
committerIan Romanick <ian.d.romanick@intel.com>2014-07-14 15:33:34 -0700
commit561b5a0f89b1b3668fef150401943cacca5216ef (patch)
tree71a8cf2051d05b0b0d8812062c0fb8ed19af3d5a
parent4244254daa864323a58515d1424f966b3f89af20 (diff)
glsl: Log information about variable names that exist after linkingglsl-diet-v3-extra-logging
DO NOT PUSH. DO NOT SHIP TO CUSTOMERS. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r--src/glsl/linker.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index 842678f46d3..473e1edc15c 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -2451,6 +2451,19 @@ check_explicit_uniform_locations(struct gl_context *ctx,
delete uniform_map;
}
+class name_size_counter : public ir_hierarchical_visitor {
+public:
+ virtual ir_visitor_status visit(ir_variable *v)
+ {
+ if (strcmp(v->name, "compiler_temp") != 0)
+ fprintf(stderr, "MESANAME:%u:%s:%s\n",
+ strlen(v->name),
+ v->name,
+ v->is_name_ralloced() ? "dynamic" : "static");
+ return visit_continue;
+ }
+};
+
void
link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
{
@@ -2865,6 +2878,9 @@ done:
/* Retain any live IR, but trash the rest. */
reparent_ir(prog->_LinkedShaders[i]->ir, prog->_LinkedShaders[i]->ir);
+ name_size_counter nsc;
+ nsc.run(prog->_LinkedShaders[i]->ir);
+
/* The symbol table in the linked shaders may contain references to
* variables that were removed (e.g., unused uniforms). Since it may
* contain junk, there is no possible valid use. Delete it and set the