radeonsi: move barriers out of si_compute_shorten_ubyte_buffer

It turns out the barrier "before" didn't do anything.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31193>
This commit is contained in:
Marek Olšák 2024-08-22 16:46:12 -04:00 committed by Marge Bot
parent e805c35986
commit 67593f0c51
2 changed files with 4 additions and 5 deletions

View file

@ -486,9 +486,7 @@ void si_compute_shorten_ubyte_buffer(struct si_context *sctx, struct pipe_resour
sb[1].buffer_offset = src_offset;
sb[1].buffer_size = count;
si_barrier_before_simple_buffer_op(sctx, flags, dst, src);
si_launch_grid_internal_ssbos(sctx, &info, sctx->cs_ubyte_to_ushort, flags, 2, sb, 0x1);
si_barrier_after_simple_buffer_op(sctx, flags, dst, src);
}
static void si_compute_save_and_bind_images(struct si_context *sctx, unsigned num_images,

View file

@ -2113,9 +2113,10 @@ static void si_draw(struct pipe_context *ctx,
if (unlikely(!indexbuf))
return;
si_compute_shorten_ubyte_buffer(sctx, indexbuf, info->index.resource,
start_offset, index_offset + start, count,
SI_OP_SKIP_CACHE_INV_BEFORE | SI_OP_SYNC_AFTER);
unsigned flags = SI_OP_SYNC_AFTER;
si_compute_shorten_ubyte_buffer(sctx, indexbuf, info->index.resource, start_offset,
index_offset + start, count, flags);
si_barrier_after_simple_buffer_op(sctx, flags, indexbuf, info->index.resource);
index_offset = 0;
index_size = 2;