mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
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:
parent
738babc67a
commit
17de5dd1c4
3 changed files with 8 additions and 13 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue