freedreno/a6xx: Fix occlusion queries
WFI is not a strong enough barrier, which shows up in piglit qbo tests
which do a single draw.
Fixes: 13fc03f4c0
("freedreno/a6xx: Avoid stalling for occlusion queries")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19400>
This commit is contained in:
@@ -99,7 +99,14 @@ occlusion_pause(struct fd_acc_query *aq, struct fd_batch *batch) assert_dt
|
||||
* counter delta in the epilogue ring.
|
||||
*/
|
||||
struct fd_ringbuffer *epilogue = fd_batch_get_epilogue(batch);
|
||||
fd_wfi(batch, epilogue);
|
||||
|
||||
OUT_PKT7(epilogue, CP_WAIT_REG_MEM, 6);
|
||||
OUT_RING(epilogue, CP_WAIT_REG_MEM_0_FUNCTION(WRITE_NE) |
|
||||
CP_WAIT_REG_MEM_0_POLL_MEMORY);
|
||||
OUT_RELOC(epilogue, query_sample(aq, stop));
|
||||
OUT_RING(epilogue, CP_WAIT_REG_MEM_3_REF(0xffffffff));
|
||||
OUT_RING(epilogue, CP_WAIT_REG_MEM_4_MASK(0xffffffff));
|
||||
OUT_RING(epilogue, CP_WAIT_REG_MEM_5_DELAY_LOOP_CYCLES(16));
|
||||
|
||||
/* result += stop - start: */
|
||||
OUT_PKT7(epilogue, CP_MEM_TO_MEM, 9);
|
||||
|
Reference in New Issue
Block a user