diff --git a/src/panfrost/compiler/bifrost/bi_helper_invocations.c b/src/panfrost/compiler/bifrost/bi_helper_invocations.c index 5e59521a47e..e7b32aecffe 100644 --- a/src/panfrost/compiler/bifrost/bi_helper_invocations.c +++ b/src/panfrost/compiler/bifrost/bi_helper_invocations.c @@ -79,6 +79,10 @@ bi_instr_uses_helpers(bi_instr *I) case BI_OPCODE_TEX_SINGLE: return (I->va_lod_mode == BI_VA_LOD_MODE_COMPUTED_LOD) || (I->va_lod_mode == BI_VA_LOD_MODE_COMPUTED_BIAS); + case BI_OPCODE_TEX_GRADIENT: + /* If we don't use derivatives to compute the lod we need disabled lanes + * to have valid texture coordinates. */ + return !I->derivative_enable; case BI_OPCODE_WMASK: /* Helpers are needed to implement voting in fragment shaders. */ return true; diff --git a/src/panfrost/compiler/pan_nir_lower_tex.c b/src/panfrost/compiler/pan_nir_lower_tex.c index 09f0a8ac59f..58b3e6fd91e 100644 --- a/src/panfrost/compiler/pan_nir_lower_tex.c +++ b/src/panfrost/compiler/pan_nir_lower_tex.c @@ -983,7 +983,7 @@ va_lower_lod(nir_builder *b, nir_tex_instr *tex, uint64_t gpu_id) struct pan_va_tex_flags flags = { .wide_indices = tex_h->num_components > 1, .derivative_enable = false, - .force_delta_enable = true, + .force_delta_enable = false, }; tex_h = nir_pad_vector_imm_int(b, tex_h, 0, 2);