diff options
author | marha <marha@users.sourceforge.net> | 2011-07-07 08:37:48 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-07-07 08:37:48 +0200 |
commit | dbe01a4f78f09723b327d1d8522bfa5026c4f6e0 (patch) | |
tree | 8b770c826cf9f64cb61ff3efd1c2f01aeb2dc8c9 /mesalib/src/glsl/ir_print_visitor.cpp | |
parent | d5eff0b8affe3bfa3d42f54f82d03ba3c0f3e826 (diff) | |
parent | 47a6ae678489d7082b5d7da35d1a92b4233fb5eb (diff) | |
download | vcxsrv-dbe01a4f78f09723b327d1d8522bfa5026c4f6e0.tar.gz vcxsrv-dbe01a4f78f09723b327d1d8522bfa5026c4f6e0.tar.bz2 vcxsrv-dbe01a4f78f09723b327d1d8522bfa5026c4f6e0.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/glsl/ir_print_visitor.cpp
mesalib/src/glsl/linker.cpp
mesalib/src/glsl/opt_constant_propagation.cpp
mesalib/src/mesa/program/ir_to_mesa.cpp
Diffstat (limited to 'mesalib/src/glsl/ir_print_visitor.cpp')
-rw-r--r-- | mesalib/src/glsl/ir_print_visitor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir_print_visitor.cpp b/mesalib/src/glsl/ir_print_visitor.cpp index cabb2f6cc..7e3649477 100644 --- a/mesalib/src/glsl/ir_print_visitor.cpp +++ b/mesalib/src/glsl/ir_print_visitor.cpp @@ -96,6 +96,16 @@ void ir_print_visitor::indent(void) const char *
ir_print_visitor::unique_name(ir_variable *var)
{
+ /* var->name can be NULL in function prototypes when a type is given for a
+ * parameter but no name is given. In that case, just return an empty
+ * string. Don't worry about tracking the generated name in the printable
+ * names hash because this is the only scope where it can ever appear.
+ */
+ if (var->name == NULL) {
+ static unsigned arg = 1;
+ return ralloc_asprintf(this->mem_ctx, "parameter@%u", arg++);
+ }
+
/* Do we already have a name for this variable? */
const char *name = (const char *) hash_table_find(this->printable_names, var);
if (name != NULL)
|