projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42be975
)
glsl: print constant initializers
author
Marek Olšák
<marek.olsak@amd.com>
Sat, 4 Jul 2020 21:13:27 +0000
(17:13 -0400)
committer
Marek Olšák
<marek.olsak@amd.com>
Wed, 8 Jul 2020 02:02:06 +0000
(22:02 -0400)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5746>
src/compiler/glsl/ir_print_visitor.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/ir_print_visitor.cpp
b/src/compiler/glsl/ir_print_visitor.cpp
index 8914c6e2d0251d39f3f88c46f9380c9e8bc34b86..034ee163cf9f3c2f2cfa7695f8da0174ec8c8659 100644
(file)
--- 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);
+ }
}