[Mesa-dev] [PATCH 10/61] nir: Add deref sources to texture instructions

Jason Ekstrand jason at jlekstrand.net
Fri Mar 23 21:42:16 UTC 2018


---
 src/compiler/nir/nir.h       | 2 ++
 src/compiler/nir/nir_print.c | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 591d53e..ce9e458 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1249,6 +1249,8 @@ typedef enum {
    nir_tex_src_ms_mcs, /* MSAA compression value */
    nir_tex_src_ddx,
    nir_tex_src_ddy,
+   nir_tex_src_texture_deref, /* < deref pointing to the texture */
+   nir_tex_src_sampler_deref, /* < deref pointing to the sampler */
    nir_tex_src_texture_offset, /* < dynamically uniform indirect offset */
    nir_tex_src_sampler_offset, /* < dynamically uniform indirect offset */
    nir_tex_src_plane,          /* < selects plane for planar textures */
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index 55e4b38..d1b5754 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -819,6 +819,12 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
       case nir_tex_src_ddy:
          fprintf(fp, "(ddy)");
          break;
+      case nir_tex_src_texture_deref:
+         fprintf(fp, "(texture_deref)");
+         break;
+      case nir_tex_src_sampler_deref:
+         fprintf(fp, "(sampler_deref)");
+         break;
       case nir_tex_src_texture_offset:
          fprintf(fp, "(texture_offset)");
          break;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list