diff --git a/src/intel/compiler/intel_nir_lower_non_uniform_resource_intel.c b/src/intel/compiler/intel_nir_lower_non_uniform_resource_intel.c index b174706b85a..302c0cfc821 100644 --- a/src/intel/compiler/intel_nir_lower_non_uniform_resource_intel.c +++ b/src/intel/compiler/intel_nir_lower_non_uniform_resource_intel.c @@ -128,8 +128,13 @@ intel_nir_lower_non_uniform_tex(nir_builder *b, bool progress = false; for (unsigned s = 0; s < tex->num_srcs; s++) { - if (tex->src[s].src_type != nir_tex_src_texture_handle && - tex->src[s].src_type != nir_tex_src_sampler_handle) + const bool needs_lowering = + tex->src[s].src_type == nir_tex_src_texture_handle || + tex->src[s].src_type == nir_tex_src_sampler_handle || + tex->src[s].src_type == nir_tex_src_texture_heap_offset || + tex->src[s].src_type == nir_tex_src_sampler_heap_offset; + + if (!needs_lowering) continue; util_dynarray_clear(inst_array);