glsl: always print non-zero var->data.location_frac
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Wed, 14 Jun 2017 10:42:28 +0000 (12:42 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 3 Jul 2017 11:54:06 +0000 (13:54 +0200)
This is helpful in debugging varying assignments.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/ir_print_visitor.cpp

index ba3c1e243fbc18f0706cf1520db4df0371b4bf7e..86ddea6886105b42f736aa8063453dc80ccdfefe 100644 (file)
@@ -174,7 +174,7 @@ void ir_print_visitor::visit(ir_variable *ir)
       snprintf(loc, sizeof(loc), "location=%i ", ir->data.location);
 
    char component[32] = {0};
-   if (ir->data.explicit_component)
+   if (ir->data.explicit_component || ir->data.location_frac != 0)
       snprintf(component, sizeof(component), "component=%i ", ir->data.location_frac);
 
    char stream[32] = {0};