nir: Make the printer include nir_variable::location too.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 19 Feb 2015 09:19:13 +0000 (01:19 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 9 Mar 2015 08:34:03 +0000 (01:34 -0700)
Being able to see both location and driver_location can be useful when
debugging IO mistakes.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_print.c

index 21d5dde254899c48e6c1adc6673dd4a4eca0db87..f8b14a149d325651481d6362aaa633e768263436 100644 (file)
@@ -228,7 +228,7 @@ print_var_decl(nir_variable *var, print_var_state *state, FILE *fp)
    if (var->data.mode == nir_var_shader_in ||
        var->data.mode == nir_var_shader_out ||
        var->data.mode == nir_var_uniform) {
-      fprintf(fp, " (%u)", var->data.driver_location);
+      fprintf(fp, " (%u, %u)", var->data.location, var->data.driver_location);
    }
 
    fprintf(fp, "\n");