summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/a5xx/fd5_program.c
diff options
context:
space:
mode:
authorEmma Anholt <emma@anholt.net>2023-02-13 13:20:22 -0800
committerMarge Bot <emma+marge@anholt.net>2023-02-14 00:16:50 +0000
commit5c246e21b71a1676705440bce767535dc502d748 (patch)
treeda5f04cc7abfa6c0450d3280c5daf6c5acaa56b4 /src/gallium/drivers/freedreno/a5xx/fd5_program.c
parent509c1f9feac07aca039fdc82e3f216622b2085e1 (diff)
Revert "freedreno/a5xx: Fix clip_mask"
This reverts commit 2dfebf34874b5365156d254c2c1ba2ecc5262deb. It causes GPU hangs in piglit tests like spec@glsl-1.20@execution@clipping@vs-clip-vertex-enables, for reasons I'm totally unclear on. The commit was not necessary, because the frontend lowering already handles disabled clip planes by storing 0.0 to the corresponding clipdist array element in that shader variant. Add a note to that effect. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21298>
Diffstat (limited to 'src/gallium/drivers/freedreno/a5xx/fd5_program.c')
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_program.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_program.c b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
index fda5eb25bf4..245e3e538dc 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_program.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_program.c
@@ -254,7 +254,13 @@ fd5_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring,
cull_mask = s[VS].v->cull_mask;
uint8_t clip_cull_mask = clip_mask | cull_mask;
- clip_mask &= ctx->rasterizer->clip_plane_enable;
+ /* Unlike a6xx, we don't factor the rasterizer's clip enables in here. It's
+ * already handled by the frontend by storing 0.0 to the clipdist in the
+ * shader variant (using either nir_lower_clip_disable for clip distances
+ * from the source shader, or nir_lower_clip_vs for user clip planes).
+ * Masking the disabled clipdists off causes GPU hangs in tests like
+ * spec@glsl-1.20@execution@clipping@vs-clip-vertex-enables.
+ */
fssz = (s[FS].i->double_threadsize) ? FOUR_QUADS : TWO_QUADS;