asahi: Dirty track blend state
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Thu, 24 Nov 2022 15:57:24 +0000 (10:57 -0500)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Sun, 11 Dec 2022 02:50:45 +0000 (21:50 -0500)
We'll want this to reduce variant lookups eventually.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20123>

src/gallium/drivers/asahi/agx_state.c
src/gallium/drivers/asahi/agx_state.h

index e16fb71..c793373 100644 (file)
@@ -173,6 +173,7 @@ agx_bind_blend_state(struct pipe_context *pctx, void *cso)
 {
    struct agx_context *ctx = agx_context(pctx);
    ctx->blend = cso;
+   ctx->dirty |= AGX_DIRTY_BLEND;
 }
 
 static const enum agx_stencil_op agx_stencil_ops[PIPE_STENCIL_OP_INVERT + 1] = {
index cdd7026..888ab3f 100644 (file)
@@ -172,6 +172,8 @@ enum agx_dirty {
    /* Just the progs themselves */
    AGX_DIRTY_VS_PROG    = BITFIELD_BIT(10),
    AGX_DIRTY_FS_PROG    = BITFIELD_BIT(11),
+
+   AGX_DIRTY_BLEND      = BITFIELD_BIT(12),
 };
 
 #define AGX_MAX_BATCHES (2)