asahi: Mark scissor dirty if rast->scissor changes

Although there is a scissor enable bit in the hardware rasterizer state, we
cannot rely on it alone as we also "scissor" to the viewport.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11084>
This commit is contained in:
Alyssa Rosenzweig 2021-05-31 02:04:41 +05:30 committed by Marge Bot
parent be5ea29237
commit 861109e441
1 changed files with 12 additions and 1 deletions

View File

@ -170,7 +170,18 @@ static void
agx_bind_rasterizer_state(struct pipe_context *pctx, void *cso)
{
struct agx_context *ctx = agx_context(pctx);
ctx->rast = cso;
struct agx_rasterizer *so = cso;
/* Check if scissor state has changed, since scissor enable is part of the
* rasterizer state but everything else needed for scissors is part of
* viewport/scissor states */
bool scissor_changed = (cso == NULL) || (ctx->rast == NULL) ||
(ctx->rast->base.scissor != so->base.scissor);
ctx->rast = so;
if (scissor_changed)
ctx->dirty |= AGX_DIRTY_SCISSOR;
}
static enum agx_wrap