mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 14:30:26 +01:00
glsl: Don't choke when printing an anonymous function parameter
This is based on commit 174cef7fee, but
the code is heavily changed. The original commit modifies
ir_print_visitor::unique_name, but there is no such method in 7.10.
Instead, this code just modifies ir_print_visitor::visit(ir_variable
*ir) to "do the right thing" when ir_variable::name is NULL.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
This commit is contained in:
parent
7424f9c1fe
commit
cd73c06eed
1 changed files with 5 additions and 1 deletions
|
|
@ -104,7 +104,11 @@ void ir_print_visitor::visit(ir_variable *ir)
|
|||
cent, inv, mode[ir->mode], interp[ir->interpolation]);
|
||||
|
||||
print_type(ir->type);
|
||||
printf(" %s@%p)", ir->name, (void *) ir);
|
||||
if (ir->name == NULL) {
|
||||
static unsigned arg = 1;
|
||||
printf(" parameter@%u)", arg++);
|
||||
} else
|
||||
printf(" %s@%p)", ir->name, (void *) ir);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue