From 60c8e91c795dc604c08977d5773f96a4de8e402b Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 31 Jan 2011 11:01:27 -0800 Subject: [PATCH] glsl: Re-synchronize ir_variable_mode and the printer's string array. Since the introduction of ir_var_system_value, system variables would be printed as "temporary" and temporaries would result in out-of-bounds array access, showing up as garbage in printed IR. --- src/glsl/ir_print_visitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp index c56bafd00c5..d0373cb6310 100644 --- a/src/glsl/ir_print_visitor.cpp +++ b/src/glsl/ir_print_visitor.cpp @@ -97,7 +97,7 @@ void ir_print_visitor::visit(ir_variable *ir) const char *const cent = (ir->centroid) ? "centroid " : ""; const char *const inv = (ir->invariant) ? "invariant " : ""; const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ", - "temporary " }; + "sys ", "temporary " }; const char *const interp[] = { "", "flat", "noperspective" }; printf("(%s%s%s%s) ", -- 2.30.2