Mesa (master): nir: Print the alignment information on casts.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Sep 30 20:10:27 UTC 2020


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

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Sep  8 12:50:34 2020 -0700

nir: Print the alignment information on casts.

I wanted it for debugging GL alignment.

Reviewed-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6612>

---

 src/compiler/nir/nir_print.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index c84c70ac9b7..8d86bf87bca 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -736,7 +736,9 @@ print_deref_instr(nir_deref_instr *instr, print_state *state)
    }
 
    if (instr->deref_type == nir_deref_type_cast) {
-      fprintf(fp, " /* ptr_stride=%u */", instr->cast.ptr_stride);
+      fprintf(fp, " /* ptr_stride=%u, align_mul=%u, align_offset=%u */",
+              instr->cast.ptr_stride,
+              instr->cast.align_mul, instr->cast.align_offset);
    }
 }
 



More information about the mesa-commit mailing list