summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-10-13 15:27:00 +0200
committerNicolai Hähnle <[email protected]>2016-10-17 19:09:33 +0200
commite0213f36bb9e2aebd84845d3c06fcc74cc749f0f (patch)
treeda891d734596272960da6042582fcb37e0ad34d5
parent9160b4d9810163b907eaff4142f3b67b7d633720 (diff)
glsl: print non-zero bindings of variables
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/compiler/glsl/ir_print_visitor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/glsl/ir_print_visitor.cpp b/src/compiler/glsl/ir_print_visitor.cpp
index c238c16aa38..efb728b1662 100644
--- a/src/compiler/glsl/ir_print_visitor.cpp
+++ b/src/compiler/glsl/ir_print_visitor.cpp
@@ -165,6 +165,10 @@ void ir_print_visitor::visit(ir_variable *ir)
{
fprintf(f, "(declare ");
+ char binding[32] = {0};
+ if (ir->data.binding)
+ snprintf(binding, sizeof(binding), "binding=%i ", ir->data.binding);
+
char loc[32] = {0};
if (ir->data.location != -1)
snprintf(loc, sizeof(loc), "location=%i ", ir->data.location);
@@ -187,8 +191,8 @@ void ir_print_visitor::visit(ir_variable *ir)
const char *const interp[] = { "", "smooth", "flat", "noperspective" };
STATIC_ASSERT(ARRAY_SIZE(interp) == INTERP_MODE_COUNT);
- fprintf(f, "(%s%s%s%s%s%s%s%s%s%s) ",
- loc, component, cent, samp, patc, inv, prec, mode[ir->data.mode],
+ fprintf(f, "(%s%s%s%s%s%s%s%s%s%s%s) ",
+ binding, loc, component, cent, samp, patc, inv, prec, mode[ir->data.mode],
stream[ir->data.stream],
interp[ir->data.interpolation]);