v3d: Mark scheduling dependency for prim id and first output
authorNeil Roberts <nroberts@igalia.com>
Fri, 17 Jul 2020 07:49:33 +0000 (09:49 +0200)
committerNeil Roberts <nroberts@igalia.com>
Fri, 24 Jul 2020 07:21:11 +0000 (09:21 +0200)
commit08f1746fad7cdcd58a2b94ae523274670eb7e67e
tree2f8c786fe0505b139b72bcbf54415bc2075b3ea3
parentbafd2591771bae092edba95b2f4913b303b1668b
v3d: Mark scheduling dependency for prim id and first output

The input primitive ID is read from the VPM in the same memory segment
as the outputs. This means that writing the GS header to VPM location 0
needs to be done after reading the primitive ID. This patch adds a
dependency between the load_primitive_id intrinsic and the store_output
intrinsic for location 0 to stop the scheduler from reordering them.

v2: Use an enum for the dependency class number.
v3: Add "GS" to the class enum name.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5953>
src/broadcom/compiler/vir.c