From dd42bf84a3c419b26e34ef5bfc256590ef1aef27 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 7 Jan 2024 12:19:04 -0400 Subject: [PATCH] asahi: fix passthrough GS with poly modes affects wireframe xfb piglits. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index ef692f223eb..0f8d178e417 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -4014,7 +4014,15 @@ agx_get_passthrough_gs(struct agx_context *ctx, enum mesa_prim mode) { bool edgeflags = has_edgeflags(ctx, mode); - unsigned poly_mode = ctx->rast->base.fill_front; + + /* Only handle the polygon mode when edge flags are in use, because + * nir_passthrough_gs doesn't handle transform feedback + polygon mode + * properly. Technically this can break edge flags + transform feedback but + * that's firmly in "doctor, it hurts when I do this" territory, and I'm not + * sure that's even possible to hit. TODO: Reevaluate. + */ + unsigned poly_mode = + edgeflags ? ctx->rast->base.fill_front : PIPE_POLYGON_MODE_FILL; if (prev_cso->passthrough_progs[mode][poly_mode][edgeflags]) return prev_cso->passthrough_progs[mode][poly_mode][edgeflags];