[Mesa-dev] [PATCH v3 005/104] nir: Add deref sources to texture instructions

Jason Ekstrand jason at jlekstrand.net
Tue Apr 3 18:32:32 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 fb75c96..c4f0dcc 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1246,6 +1246,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 64fdfb2..161cbe4 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -821,6 +821,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