From 3e47cb185e364b40bd34cf53ac454908048c0b6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 4 Jul 2020 17:13:27 -0400 Subject: [PATCH] glsl: print constant initializers Reviewed-by: Alyssa Rosenzweig Part-of: --- src/compiler/glsl/ir_print_visitor.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); + } } -- 2.30.2