broadcom: fix scheduling dependencies for SETMSF instruction

We use SETMSF to implement discard, so we need to ensure that any
TMU writes after a SETMSF don't actually execute. We emit a TMU flush
before a discard but we also need to ensure that the QPU scheduler
honors this.

Fixes some tests in dEQP-VK.spirv_assembly.instruction.terminate_invocation.*
when we expose the extension that would otherwise fail because the
QPU scheduler would incorrectly move some image writes emitted after a SETMSF
before the SETMSF instruction.

Also fixes spec@arb_shader_atomic_counters@fragment-discard

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26631>
This commit is contained in:
Iago Toral Quiroga 2023-12-11 10:07:34 +01:00 committed by Marge Bot
parent 4add1273f5
commit 6b89c71c90
2 changed files with 2 additions and 1 deletions

View file

@ -146,7 +146,6 @@ spec@arb_framebuffer_object@fbo-blit-scaled-linear,Fail
spec@arb_point_sprite@arb_point_sprite-checkerboard,Fail
spec@arb_point_sprite@arb_point_sprite-mipmap,Fail
spec@arb_separate_shader_objects@atomic counter,Fail
spec@arb_shader_atomic_counters@fragment-discard,Fail
spec@arb_shader_storage_buffer_object@compiler@atomicmin-swizzle.vert,Fail
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgrad,Fail
spec@arb_shader_texture_lod@execution@arb_shader_texture_lod-texgradcube,Fail

View file

@ -381,6 +381,8 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)
break;
case V3D_QPU_A_SETMSF:
add_write_dep(state, &state->last_tmu_write, n);
FALLTHROUGH;
case V3D_QPU_A_SETREVF:
add_write_dep(state, &state->last_tlb, n);
break;