aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-07-04 17:13:27 -0400
committerMarek Olšák <[email protected]>2020-07-07 22:02:06 -0400
commit3e47cb185e364b40bd34cf53ac454908048c0b6d (patch)
treefab135983e42f597bc03eddd7957708118516ff4 /src/compiler/glsl
parent42be975aa290359a1aaefa8d02658510a8d7172a (diff)
glsl: print constant initializers
Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/ir_print_visitor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp
index 8914c6e2d02..034ee163cf9 100644
--- a/src/compiler/glsl/ir_print_visitor.cpp
+++ b/src/compiler/glsl/ir_print_visitor.cpp
@@ -226,6 +226,16 @@ void ir_print_visitor::visit(ir_variable *ir)
ir_print_type(f, ir->type);
fprintf(f, " %s)", unique_name(ir));
+
+ if (ir->constant_initializer) {
+ fprintf(f, " ");
+ visit(ir->constant_initializer);
+ }
+
+ if (ir->constant_value) {
+ fprintf(f, " ");
+ visit(ir->constant_value);
+ }
}