Mesa (master): nir: Make the printer include nir_variable::location too.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Mar 9 08:35:42 UTC 2015


Module: Mesa
Branch: master
Commit: b9c2fa15e31c4904d4a2526b79ef3f70596c1074
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9c2fa15e31c4904d4a2526b79ef3f70596c1074

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Feb 19 01:19:13 2015 -0800

nir: Make the printer include nir_variable::location too.

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>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

---

 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 21d5dde..f8b14a1 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");




More information about the mesa-commit mailing list