[Mesa-dev] [PATCH 01/10] gallium/radeon: flush the context after in-place texture realloc before export
Nicolai Hähnle
nhaehnle at gmail.com
Sun Jul 16 09:13:16 UTC 2017
On 08.07.2017 02:42, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
> src/gallium/drivers/radeon/r600_texture.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
> index 2deb56a..f5f7d10 100644
> --- a/src/gallium/drivers/radeon/r600_texture.c
> +++ b/src/gallium/drivers/radeon/r600_texture.c
> @@ -563,20 +563,21 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
> * interop in the future.
> */
> if (resource->nr_samples > 1 || rtex->is_depth)
> return false;
>
> /* Move a suballocated texture into a non-suballocated allocation. */
> if (rscreen->ws->buffer_is_suballocated(res->buf)) {
> assert(!res->b.is_shared);
> r600_reallocate_texture_inplace(rctx, rtex,
> PIPE_BIND_SHARED, false);
> + rctx->b.flush(&rctx->b, NULL, 0);
Hmm. The caller anyway is responsible for flushing the context before
the texture is used externally. So this is redundant for callers that
flush after calling get_handle, but it fixes callers that flush before
calling get_handle. Seems fine, maybe you could add that to the
explanation. Either way,
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> assert(res->b.b.bind & PIPE_BIND_SHARED);
> assert(res->flags & RADEON_FLAG_NO_SUBALLOC);
> }
>
> /* Since shader image stores don't support DCC on VI,
> * disable it for external clients that want write
> * access.
> */
> if (usage & PIPE_HANDLE_USAGE_WRITE && rtex->dcc_offset) {
> if (r600_texture_disable_dcc(rctx, rtex))
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the mesa-dev
mailing list