freedreno/a6xx: Workaround for no pos/psize

The hw seems unhappy if there are zero outputs from the last geometry
stage.  So add a dummy varying as a workaround.  Turnip got a similar
workaround in commit d6d75fcd91 ("tu: Fix hangs for DS with no output")

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20575>
This commit is contained in:
Rob Clark 2023-01-06 07:37:37 -08:00 committed by Marge Bot
parent e41d19a711
commit aa9b62cad3

View file

@ -664,6 +664,14 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_context *ctx,
clip_cull_mask >> 4, l.max_loc);
}
/* The hw seems to be unhappy if the last geom shader has no outputs.
* Normally you'd at least see gl_Position writes, but if the last
* geom stage simply writes to an SSBO (for ex) and no other outputs,
* insert a dummy varying
*/
if (!l.cnt)
ir3_link_add(&l, 0, regid(0, 0), 0x1, l.max_loc);
/* If we have stream-out, we use the full shader for binning
* pass, rather than the optimized binning pass one, so that we
* have all the varying outputs available for xfb. So streamout