aco: Send MSG_ORDERED_PS_DONE where necessary
authorVitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Mon, 3 Apr 2023 18:18:21 +0000 (21:18 +0300)
committerMarge Bot <emma+marge@anholt.net>
Mon, 26 Jun 2023 15:58:04 +0000 (15:58 +0000)
commita87628cd08860ae8e1e368c50e36f4bf04942531
tree75f4a0077a03fe568c31d952ba5edabcedbe1739
parent2194e8bd82c1bcbcc2002e7d8a03e831c31d870a
aco: Send MSG_ORDERED_PS_DONE where necessary

If the wave has set the Primitive Ordered Pixel Shading packer ID hardware
register, it must send MSG_ORDERED_PS_DONE once before the program ends.
It's also safe to send the message if the packer ID register hasn't been
set yet, therefore the message may be sent conservatively. For simplicity,
to ensure that it's sent on all execution paths after setting the packer ID
register, always sending it from a top-level block. This is required for
GFX9-10.3 POPS.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22250>
src/amd/compiler/aco_ir.h
src/amd/compiler/aco_lower_to_hw_instr.cpp