radeonsi: PIPE_BIND_SHARED should allow inter-process sharing
authorMarek Olšák <marek.olsak@amd.com>
Thu, 14 Sep 2017 13:40:45 +0000 (15:40 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 18 Sep 2017 15:47:49 +0000 (17:47 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c

index f35bc2c813b30bd4d37f25b8809b381026b9ee14..7515f7d615b0ad74df39761dd3ed9d1c77308339 100644 (file)
@@ -169,11 +169,10 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen,
 
        /* 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