mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
radeonsi: clear allocator_zeroed_memory with SDMA
so that it can be used in parallel IBs. This also removes the SO_FILLED_SIZE hack. Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
7d4c935654
commit
5068dec5de
4 changed files with 9 additions and 12 deletions
|
|
@ -242,6 +242,10 @@ bool si_alloc_resource(struct si_screen *sscreen,
|
|||
res->gpu_address, res->gpu_address + res->buf->size,
|
||||
res->buf->size);
|
||||
}
|
||||
|
||||
if (res->b.b.flags & SI_RESOURCE_FLAG_CLEAR)
|
||||
si_screen_clear_buffer(sscreen, &res->b.b, 0, res->bo_size, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -275,15 +275,8 @@ static void si_pipe_clear_buffer(struct pipe_context *ctx,
|
|||
const void *clear_value,
|
||||
int clear_value_size)
|
||||
{
|
||||
enum si_coherency coher;
|
||||
|
||||
if (dst->flags & SI_RESOURCE_FLAG_SO_FILLED_SIZE)
|
||||
coher = SI_COHERENCY_CP;
|
||||
else
|
||||
coher = SI_COHERENCY_SHADER;
|
||||
|
||||
si_clear_buffer((struct si_context*)ctx, dst, offset, size, (uint32_t*)clear_value,
|
||||
clear_value_size, coher);
|
||||
clear_value_size, SI_COHERENCY_SHADER);
|
||||
}
|
||||
|
||||
void si_copy_buffer(struct si_context *sctx,
|
||||
|
|
|
|||
|
|
@ -430,9 +430,9 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
|
|||
}
|
||||
|
||||
sctx->allocator_zeroed_memory =
|
||||
u_suballocator_create(&sctx->b, sscreen->info.gart_page_size,
|
||||
0, PIPE_USAGE_DEFAULT,
|
||||
SI_RESOURCE_FLAG_SO_FILLED_SIZE, true);
|
||||
u_suballocator_create(&sctx->b, sscreen->info.gart_page_size,
|
||||
0, PIPE_USAGE_DEFAULT,
|
||||
SI_RESOURCE_FLAG_CLEAR, false);
|
||||
if (!sctx->allocator_zeroed_memory)
|
||||
goto fail;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
#define SI_RESOURCE_FLAG_UNMAPPABLE (PIPE_RESOURCE_FLAG_DRV_PRIV << 4)
|
||||
#define SI_RESOURCE_FLAG_READ_ONLY (PIPE_RESOURCE_FLAG_DRV_PRIV << 5)
|
||||
#define SI_RESOURCE_FLAG_32BIT (PIPE_RESOURCE_FLAG_DRV_PRIV << 6)
|
||||
#define SI_RESOURCE_FLAG_SO_FILLED_SIZE (PIPE_RESOURCE_FLAG_DRV_PRIV << 7)
|
||||
#define SI_RESOURCE_FLAG_CLEAR (PIPE_RESOURCE_FLAG_DRV_PRIV << 7)
|
||||
|
||||
enum si_clear_code
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue