asahi: Submit batches that don't touch RTs
If there is any draw, we should submit in case there are active queries, fragment shader side effects, etc. Together with previous commit fixes no_attachment framebuffers. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21267>
This commit is contained in:
committed by
Marge Bot
parent
2c2f189fe7
commit
3da4838591
@@ -60,6 +60,7 @@ agx_batch_init(struct agx_context *ctx,
|
||||
batch->clear_depth = 0;
|
||||
batch->clear_stencil = 0;
|
||||
batch->varyings = 0;
|
||||
batch->any_draws = false;
|
||||
|
||||
/* We need to emit prim state at the start. Max collides with all. */
|
||||
batch->reduced_prim = PIPE_PRIM_MAX;
|
||||
|
||||
@@ -964,8 +964,8 @@ agx_flush_batch(struct agx_context *ctx, struct agx_batch *batch)
|
||||
|
||||
assert(agx_batch_is_active(batch));
|
||||
|
||||
/* Nothing to do */
|
||||
if (!(batch->draw | batch->clear)) {
|
||||
/* Make sure there's something to submit. */
|
||||
if (!batch->clear && !batch->any_draws) {
|
||||
agx_batch_cleanup(ctx, batch);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2424,6 +2424,8 @@ agx_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
|
||||
batch->resolve |= ctx->zs->store;
|
||||
}
|
||||
|
||||
batch->any_draws = true;
|
||||
|
||||
if (agx_update_vs(ctx))
|
||||
ctx->dirty |= AGX_DIRTY_VS | AGX_DIRTY_VS_PROG;
|
||||
else if (ctx->stage[PIPE_SHADER_VERTEX].dirty)
|
||||
|
||||
@@ -162,6 +162,7 @@ struct agx_batch {
|
||||
|
||||
/* PIPE_CLEAR_* bitmask */
|
||||
uint32_t clear, draw, load, resolve;
|
||||
bool any_draws;
|
||||
|
||||
uint64_t uploaded_clear_color[PIPE_MAX_COLOR_BUFS];
|
||||
double clear_depth;
|
||||
|
||||
Reference in New Issue
Block a user