nir: Add more source types to nir_tex_instr_src_type
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 19 Aug 2019 01:53:24 +0000 (20:53 -0500)
committerJason Ekstrand <jason@jlekstrand.net>
Mon, 19 Aug 2019 17:03:34 +0000 (17:03 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/compiler/nir/nir.h

index 09a3be5527e44997241a49865182ae4151ad101b..f00cc3fdc50f6642c15b8926a84c2c20ddba34df 100644 (file)
@@ -1827,19 +1827,30 @@ nir_tex_instr_src_type(const nir_tex_instr *instr, unsigned src)
    case nir_tex_src_projector:
    case nir_tex_src_comparator:
    case nir_tex_src_bias:
+   case nir_tex_src_min_lod:
    case nir_tex_src_ddx:
    case nir_tex_src_ddy:
       return nir_type_float;
 
    case nir_tex_src_offset:
    case nir_tex_src_ms_index:
+   case nir_tex_src_plane:
+      return nir_type_int;
+
+   case nir_tex_src_ms_mcs:
+   case nir_tex_src_texture_deref:
+   case nir_tex_src_sampler_deref:
    case nir_tex_src_texture_offset:
    case nir_tex_src_sampler_offset:
-      return nir_type_int;
+   case nir_tex_src_texture_handle:
+   case nir_tex_src_sampler_handle:
+      return nir_type_uint;
 
-   default:
-      unreachable("Invalid texture source type");
+   case nir_num_tex_src_types:
+      unreachable("nir_num_tex_src_types is not a valid source type");
    }
+
+   unreachable("Invalid texture source type");
 }
 
 static inline unsigned