diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c index 28eb18bac0e..28aca6f6a78 100644 --- a/src/compiler/nir/nir_lower_tex.c +++ b/src/compiler/nir/nir_lower_tex.c @@ -1484,6 +1484,7 @@ nir_lower_lod_zero_width(nir_builder *b, nir_tex_instr *tex) static void lower_sampler_lod_bias(nir_builder *b, nir_tex_instr *tex) { + b->cursor = nir_before_instr(&tex->instr); nir_def *bias = nir_build_texture_query(b, tex, nir_texop_lod_bias, 1, nir_type_float16, false, false);