[Mesa-dev] [PATCH] nir: Make the printer include nir_variable::location too.

Kenneth Graunke kenneth at whitecape.org
Thu Mar 5 20:26:27 PST 2015


Being able to see both location and driver_location can be useful when
debugging IO mistakes.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/glsl/nir/nir_print.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c
index 6a3c6a0..30d4821 100644
--- a/src/glsl/nir/nir_print.c
+++ b/src/glsl/nir/nir_print.c
@@ -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");
-- 
2.2.2



More information about the mesa-dev mailing list