From 5167e94f2343d1dc7db489e7041d89a598eaa68d Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Sun, 18 Aug 2019 20:53:24 -0500 Subject: nir: Add more source types to nir_tex_instr_src_type Reviewed-by: Dave Airlie Reviewed-by: Alyssa Rosenzweig --- src/compiler/nir/nir.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 09a3be5527e..f00cc3fdc50 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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 -- cgit v1.2.3