radeonsi: remove barriers around clears using aux_context.compute_resource_init

Nothing else uses that context, so all barriers are unnecessary.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31291>
This commit is contained in:
Marek Olšák 2024-09-15 10:32:14 -04:00 committed by Marge Bot
parent 58b512ddd6
commit 653bcd85e0
3 changed files with 6 additions and 4 deletions

View file

@ -196,7 +196,6 @@ bool si_alloc_resource(struct si_screen *sscreen, struct si_resource *res)
si_clear_buffer(ctx, &res->b.b, 0, res->bo_size, &value, 4, SI_AUTO_SELECT_CLEAR_METHOD,
false);
si_barrier_after_simple_buffer_op(ctx, 0, &res->b.b, NULL);
si_put_aux_context_flush(&sscreen->aux_context.compute_resource_init);
}

View file

@ -559,7 +559,12 @@ struct si_screen {
struct {
struct si_aux_context general;
/* Used by resource_create to clear/initialize memory. */
/* Used by resource_create to clear/initialize memory.
*
* Note that there are no barriers around the clears, which enables parallelism between
* individual clears. If anything else uses this context, it should wait for idle before
* using any buffer/texture.
*/
struct si_aux_context compute_resource_init;
/* Second auxiliary context for uploading shaders. When the first auxiliary context is

View file

@ -1282,9 +1282,7 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen,
if (num_clears) {
struct si_context *sctx = si_get_aux_context(&sscreen->aux_context.compute_resource_init);
si_barrier_before_image_fast_clear(sctx, 0);
si_execute_clears(sctx, clears, num_clears, false);
si_barrier_after_image_fast_clear(sctx);
si_put_aux_context_flush(&sscreen->aux_context.compute_resource_init);
}