From 56461bc0a2e0f8535b7219badd007d09801172d5 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 28 Jun 2023 12:38:48 -0400 Subject: [PATCH] asahi: Fix scissor_culls_everything check Account for the possibility that the scissor is outside the render area. Fixes the usual assertion fail: glcts: ../src/gallium/drivers/asahi/agx_state.c:1015: agx_upload_viewport_scissor: Assertion `maxx > minx && maxy > miny' failed. on the following dEQP tests with my conformance build: dEQP-GLES3.functional.fragment_ops.scissor.outside_render_line dEQP-GLES3.functional.fragment_ops.scissor.outside_render_point dEQP-GLES3.functional.fragment_ops.scissor.outside_render_tri Signed-off-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/asahi/agx_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 592ec625eac..ed98e84fa12 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -2636,7 +2636,7 @@ agx_scissor_culls_everything(struct agx_context *ctx) ctx->rast->base.scissor ? &ctx->scissor : NULL, &ctx->framebuffer, &minx, &miny, &maxx, &maxy); - return (minx == maxx) || (miny == maxy); + return (minx >= maxx) || (miny >= maxy); } static void