From 4e58029dc014bd77db239e3c6436cd465e84241d Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 16 Jan 2025 17:34:23 +0100 Subject: [PATCH] pan/va: fix base-level for nir_texop_lod The documentation says that if we don't use force_delta, the LOD will be -infinity for non-active lanes before bias and clamp are applied. This is not what we want, so let's instead assume all threads are active, and let helper-invocations do their job to compute correct values. While this is only needed for the second iteration, let's just leave it on for both for simplicity. Fixes: e3171365367 ("pan/va: Add support for nir_texop_lod") Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/ci/panfrost-g610-fails.txt | 2 -- src/panfrost/compiler/bifrost_compile.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/panfrost/ci/panfrost-g610-fails.txt b/src/panfrost/ci/panfrost-g610-fails.txt index 47ecb716962..9f9605f693b 100644 --- a/src/panfrost/ci/panfrost-g610-fails.txt +++ b/src/panfrost/ci/panfrost-g610-fails.txt @@ -295,8 +295,6 @@ dEQP-VK.glsl.loops.special.do_while_dynamic_iterations.dowhile_trap_vertex,Crash dEQP-VK.rasterization.rasterization_order_attachment_access.depth.samples_1.multi_draw_barriers,Crash dEQP-VK.rasterization.rasterization_order_attachment_access.stencil.samples_1.multi_draw_barriers,Crash -dEQP-VK.ycbcr.query.lod.fragment.r8g8b8a8_unorm,Fail - dEQP-VK.wsi.wayland.swapchain.simulate_oom.composite_alpha,Crash dEQP-VK.wsi.wayland.swapchain.simulate_oom.exclusive_nonzero_queues,Crash dEQP-VK.wsi.wayland.swapchain.simulate_oom.image_array_layers,Crash diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index dcad3f77a0d..6d55771b7c0 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -4016,7 +4016,7 @@ bi_emit_tex_valhall(bi_builder *b, nir_tex_instr *instr) bi_instr *I = bi_tex_gradient_to(b, grdesc, idx, src0, src1, dim, !narrow_indices, 1, sr_count); I->derivative_enable = false; - I->force_delta_enable = false; + I->force_delta_enable = true; I->lod_clamp_disable = i != 0; I->register_format = BI_REGISTER_FORMAT_U32; bi_index lod = bi_s16_to_f32(b, bi_half(grdesc, 0));