From: Marek Olšák <[email protected]>

---
 src/gallium/drivers/radeon/r600_buffer_common.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c 
b/src/gallium/drivers/radeon/r600_buffer_common.c
index f35bc2c..7515f7d 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -162,25 +162,24 @@ void r600_init_resource_fields(struct r600_common_screen 
*rscreen,
        /* Tiled textures are unmappable. Always put them in VRAM. */
        if ((res->b.b.target != PIPE_BUFFER && !rtex->surface.is_linear) ||
            res->flags & R600_RESOURCE_FLAG_UNMAPPABLE) {
                res->domains = RADEON_DOMAIN_VRAM;
                res->flags |= RADEON_FLAG_NO_CPU_ACCESS |
                         RADEON_FLAG_GTT_WC;
        }
 
        /* Only displayable single-sample textures can be shared between
         * processes. */
-       if (res->b.b.target == PIPE_BUFFER ||
-           res->b.b.nr_samples >= 2 ||
-           (rtex->surface.micro_tile_mode != RADEON_MICRO_MODE_DISPLAY &&
-            /* Raven doesn't use display micro mode for 32bpp, so check this: 
*/
-            !(res->b.b.bind & PIPE_BIND_SCANOUT)))
+       if (!(res->b.b.bind & (PIPE_BIND_SHARED | PIPE_BIND_SCANOUT)) &&
+           (res->b.b.target == PIPE_BUFFER ||
+            res->b.b.nr_samples >= 2 ||
+            rtex->surface.micro_tile_mode != RADEON_MICRO_MODE_DISPLAY))
                res->flags |= RADEON_FLAG_NO_INTERPROCESS_SHARING;
 
        /* If VRAM is just stolen system memory, allow both VRAM and
         * GTT, whichever has free space. If a buffer is evicted from
         * VRAM to GTT, it will stay there.
         *
         * DRM 3.6.0 has good BO move throttling, so we can allow VRAM-only
         * placements even with a low amount of stolen VRAM.
         */
        if (!rscreen->info.has_dedicated_vram &&
-- 
2.7.4

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to