diff options
author | Rob Clark <robdclark@chromium.org> | 2023-01-06 07:37:37 -0800 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-01-17 19:32:13 +0000 |
commit | aa9b62cad3620d117b279836fca16fc0786d6a7f (patch) | |
tree | 0e4a39b2b5a40e03f1dbef6109ab1880fcdd1c2e | |
parent | e41d19a7119f2ad92d1765842e066cb84b90014b (diff) |
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 d6d75fcd915 ("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>
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index a5dd1182dd0..9ff022d5f5c 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -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 |