v3d: Use stvpmd for non-uniform offsets in GS
authorNeil Roberts <nroberts@igalia.com>
Tue, 23 Jun 2020 22:16:43 +0000 (00:16 +0200)
committerNeil Roberts <nroberts@igalia.com>
Fri, 26 Jun 2020 07:36:15 +0000 (09:36 +0200)
commit3b1c511b099e88d1b153de784e3bf7e951a6288f
tree73a3bd459aa9eaf405ac4c2bfe635bf9fab916fb
parentdab8a9169c197a98df23f2bd0eb5e18cdeb71c99
v3d: Use stvpmd for non-uniform offsets in GS

The offset for the VPM write for storing outputs from the geometry
shader isn’t necessarily uniform across all the lanes. This can happen
if some of the lanes don’t emit some of the vertices. In that case the
offset for the subsequent vertices will be different in each lane. In
that case we need to use the stvpmd instruction instead of stvpmv
because it will scatter the values out.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3150
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5621>
src/broadcom/compiler/nir_to_vir.c