nir: Add new 'plane' texture source type
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Mon, 2 May 2016 04:12:48 +0000 (21:12 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Tue, 24 May 2016 17:14:56 +0000 (10:14 -0700)
This will be used to select the plane to sample from for planar
textures.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/nir/nir.h
src/compiler/nir/nir_print.c

index 78913d30deb283590afe4461bde00c3f446a22af..ace6fbbb48760b61c06395b23d28c7821c9376e1 100644 (file)
@@ -1074,6 +1074,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;
 
index 021f0d618d2b7620a2ad45bd311d4e9a653e07d8..36176ece5ef99e6ddb743b8f07dddf6427f78dd0 100644 (file)
@@ -717,6 +717,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");