Mesa (master): radeonsi: ignore PIPE_BIND_SCANOUT for imported textures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 3 20:08:43 UTC 2020


Module: Mesa
Branch: master
Commit: bfddfd12b691a727a1a7b31155d8900668d5c8be
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfddfd12b691a727a1a7b31155d8900668d5c8be

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Fri Dec 27 17:11:51 2019 -0500

radeonsi: ignore PIPE_BIND_SCANOUT for imported textures

It's obtained from the BO metadata.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>

---

 src/gallium/drivers/radeonsi/si_texture.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c
index 8a2178b6d6a..6fe63218760 100644
--- a/src/gallium/drivers/radeonsi/si_texture.c
+++ b/src/gallium/drivers/radeonsi/si_texture.c
@@ -310,7 +310,7 @@ static int si_init_surface(struct si_screen *sscreen,
 	if (!is_imported && (sscreen->debug_flags & DBG(NO_DCC)))
 		flags |= RADEON_SURF_DISABLE_DCC;
 
-	if (ptex->bind & PIPE_BIND_SCANOUT || is_scanout) {
+	if (is_scanout) {
 		/* This should catch bugs in gallium users setting incorrect flags. */
 		assert(ptex->nr_samples <= 1 &&
 		       ptex->array_size == 1 &&
@@ -1695,7 +1695,8 @@ struct pipe_resource *si_texture_create(struct pipe_screen *screen,
 			plane_templ[i].bind |= PIPE_BIND_SHARED;
 
 		if (si_init_surface(sscreen, &surface[i], &plane_templ[i],
-				    tile_mode, 0, false, false,
+				    tile_mode, 0, false,
+				    plane_templ[i].bind & PIPE_BIND_SCANOUT,
 				    is_flushed_depth, tc_compatible_htile))
 			return NULL;
 




More information about the mesa-commit mailing list