asahi: Fix shader stage dirtying

Now this is actually doing what I expect. drawoverhead #1 score more than
doubles (6091->13375).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847>
This commit is contained in:
Alyssa Rosenzweig
2023-08-11 16:52:42 -04:00
committed by Marge Bot
parent bb663b8595
commit 4b84e76951
2 changed files with 12 additions and 1 deletions

View File

@@ -3231,7 +3231,7 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
assert((batch->encoder_current + AGX_VDM_STREAM_LINK_LENGTH) <=
batch->encoder_end &&
"Failed to reserve sufficient space in encoder");
ctx->dirty = 0;
agx_dirty_reset_graphics(ctx);
assert(batch == agx_get_batch(ctx) && "batch should not change under us");

View File

@@ -537,6 +537,17 @@ agx_dirty_all(struct agx_context *ctx)
ctx->stage[i].dirty = ~0;
}
static inline void
agx_dirty_reset_graphics(struct agx_context *ctx)
{
ctx->dirty = 0;
for (unsigned i = 0; i < ARRAY_SIZE(ctx->stage); ++i) {
if (i != PIPE_SHADER_COMPUTE)
ctx->stage[i].dirty = 0;
}
}
struct agx_rasterizer {
struct pipe_rasterizer_state base;
uint8_t cull[AGX_CULL_LENGTH];