[Mesa-dev] [PATCH 01/11] nir: Add new 'plane' texture source type

Kristian Høgsberg krh at bitplanet.net
Wed May 11 19:22:34 UTC 2016


From: Kristian Høgsberg Kristensen <kristian.h.kristensen at intel.com>

This will be used to select the plane to sample from for planar
textures.

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---
 src/compiler/nir/nir.h       | 1 +
 src/compiler/nir/nir_print.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 20927a2..daf91be 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1072,6 +1072,7 @@ typedef enum {
    nir_tex_src_ddy,
    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 */
    nir_num_tex_src_types
 } nir_tex_src_type;
 
diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c
index a36561e..090070a 100644
--- a/src/compiler/nir/nir_print.c
+++ b/src/compiler/nir/nir_print.c
@@ -688,6 +688,9 @@ print_tex_instr(nir_tex_instr *instr, print_state *state)
       case nir_tex_src_sampler_offset:
          fprintf(fp, "(sampler_offset)");
          break;
+      case nir_tex_src_plane:
+         fprintf(fp, "(plane)");
+         break;
 
       default:
          unreachable("Invalid texture source type");
-- 
2.5.0



More information about the mesa-dev mailing list