Mesa (glsl2): ir_print_visitor: Add "temporary" to mode string printing.

Kenneth Graunke kwg at kemper.freedesktop.org
Thu Jul 22 23:47:48 UTC 2010


Module: Mesa
Branch: glsl2
Commit: 40c4298a6ea9e83b49858916d5423fd2135ef39c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=40c4298a6ea9e83b49858916d5423fd2135ef39c

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Jul 22 16:18:57 2010 -0700

ir_print_visitor: Add "temporary" to mode string printing.

Variables with mode ir_var_temporary were causing an out of bounds array
access and filling my screen with rubbish.  I'm not sure if "temporary"
is the right thing to print.

---

 src/glsl/ir_print_visitor.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir_print_visitor.cpp b/src/glsl/ir_print_visitor.cpp
index 1eb073f..ee489cd 100644
--- a/src/glsl/ir_print_visitor.cpp
+++ b/src/glsl/ir_print_visitor.cpp
@@ -85,7 +85,8 @@ 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 " };
+   const char *const mode[] = { "", "uniform ", "in ", "out ", "inout ",
+			        "temporary " };
    const char *const interp[] = { "", "flat", "noperspective" };
 
    printf("(%s%s%s%s) ",




More information about the mesa-commit mailing list