From a104902590512f30c55e6a2e4f7b75627c056e27 Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Sun, 9 Aug 2020 22:17:01 -0500 Subject: [PATCH] broadcom/compiler: Enable PER_QUAD for UBO and SSBO loads. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Helper invocations need to be able to read from UBOs since those values can be used for flow control, but writes from helper invocations need to be dropped. Fixes CTS tests: dEQP-VK.glsl.derivate.*.uniform_loop.* Reviewed-by: Alejandro Piñeiro Reviewed-by: Eric Anholt Part-of: --- src/broadcom/compiler/nir_to_vir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index e48db957bfb..171028b627e 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -339,9 +339,12 @@ ntq_emit_tmu_general(struct v3d_compile *c, nir_intrinsic_instr *instr, num_components = tmu_writes - 1; } + uint32_t perquad = is_load + ? GENERAL_TMU_LOOKUP_PER_QUAD + : GENERAL_TMU_LOOKUP_PER_PIXEL; uint32_t config = (0xffffff00 | tmu_op << 3| - GENERAL_TMU_LOOKUP_PER_PIXEL); + perquad); if (num_components == 1) { config |= GENERAL_TMU_LOOKUP_TYPE_32BIT_UI; } else { -- 2.30.2