radeonsi: inline si_screen_clear_buffer

it has only one use

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26055>
This commit is contained in:
Marek Olšák 2023-10-20 22:11:14 -04:00
parent 738babc67a
commit 17de5dd1c4
3 changed files with 8 additions and 13 deletions

View file

@ -184,8 +184,14 @@ bool si_alloc_resource(struct si_screen *sscreen, struct si_resource *res)
fprintf(stderr, "\n");
}
if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR)
si_screen_clear_buffer(sscreen, &res->b.b, 0, res->bo_size, 0, SI_OP_SYNC_AFTER);
if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR) {
struct si_context *ctx = si_get_aux_context(&sscreen->aux_context.general);
uint32_t value = 0;
si_clear_buffer(ctx, &res->b.b, 0, res->bo_size, &value, 4, SI_OP_SYNC_AFTER,
SI_COHERENCY_SHADER, SI_AUTO_SELECT_CLEAR_METHOD);
si_put_aux_context_flush(&sscreen->aux_context.general);
}
return true;
}

View file

@ -492,15 +492,6 @@ void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,
}
}
void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst, uint64_t offset,
uint64_t size, unsigned value, unsigned flags)
{
struct si_context *ctx = si_get_aux_context(&sscreen->aux_context.general);
si_clear_buffer(ctx, dst, offset, size, &value, 4, flags,
SI_COHERENCY_SHADER, SI_AUTO_SELECT_CLEAR_METHOD);
si_put_aux_context_flush(&sscreen->aux_context.general);
}
static void si_pipe_clear_buffer(struct pipe_context *ctx, struct pipe_resource *dst,
unsigned offset, unsigned size, const void *clear_value,
int clear_value_size)

View file

@ -1486,8 +1486,6 @@ void si_compute_clear_buffer_rmw(struct si_context *sctx, struct pipe_resource *
unsigned dst_offset, unsigned size,
uint32_t clear_value, uint32_t writebitmask,
unsigned flags, enum si_coherency coher);
void si_screen_clear_buffer(struct si_screen *sscreen, struct pipe_resource *dst, uint64_t offset,
uint64_t size, unsigned value, unsigned flags);
void si_copy_buffer(struct si_context *sctx, struct pipe_resource *dst, struct pipe_resource *src,
uint64_t dst_offset, uint64_t src_offset, unsigned size, unsigned flags);
bool si_compute_copy_image(struct si_context *sctx, struct pipe_resource *dst, unsigned dst_level,