[Mesa-dev] [PATCH 6/6] radeonsi: make const and stream uploaders allocate read-only memory
Nicolai Hähnle
nhaehnle at gmail.com
Wed Dec 6 11:36:53 UTC 2017
Except for the comment on patch 1, this series is:
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
On 05.12.2017 20:05, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> and anything that clones these uploaders, like u_threaded_context.
> ---
> src/gallium/drivers/radeon/r600_pipe_common.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
> index 9090e65..9e45a9f 100644
> --- a/src/gallium/drivers/radeon/r600_pipe_common.c
> +++ b/src/gallium/drivers/radeon/r600_pipe_common.c
> @@ -438,26 +438,29 @@ bool si_common_context_init(struct r600_common_context *rctx,
> return false;
> }
>
> rctx->allocator_zeroed_memory =
> u_suballocator_create(&rctx->b, sscreen->info.gart_page_size,
> 0, PIPE_USAGE_DEFAULT, 0, true);
> if (!rctx->allocator_zeroed_memory)
> return false;
>
> rctx->b.stream_uploader = u_upload_create(&rctx->b, 1024 * 1024,
> - 0, PIPE_USAGE_STREAM, 0);
> + 0, PIPE_USAGE_STREAM,
> + R600_RESOURCE_FLAG_READ_ONLY);
> if (!rctx->b.stream_uploader)
> return false;
>
> rctx->b.const_uploader = u_upload_create(&rctx->b, 128 * 1024,
> - 0, PIPE_USAGE_DEFAULT, 0);
> + 0, PIPE_USAGE_DEFAULT,
> + sscreen->cpdma_prefetch_writes_memory ?
> + 0 : R600_RESOURCE_FLAG_READ_ONLY);
> if (!rctx->b.const_uploader)
> return false;
>
> rctx->cached_gtt_allocator = u_upload_create(&rctx->b, 16 * 1024,
> 0, PIPE_USAGE_STAGING, 0);
> if (!rctx->cached_gtt_allocator)
> return false;
>
> rctx->ctx = rctx->ws->ctx_create(rctx->ws);
> if (!rctx->ctx)
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list