On 08.07.2017 02:42, Marek Olšák wrote:
From: Marek Olšák <marek.ol...@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.haeh...@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.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to