radeonsi/gfx9: fix interprocess resource sharing on Raven
authorMarek Olšák <marek.olsak@amd.com>
Wed, 6 Sep 2017 00:53:20 +0000 (02:53 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 11 Sep 2017 14:29:52 +0000 (16:29 +0200)
This kinda fragiile, but it at least unbreaks the driver.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_buffer_common.c

index 4f5e17d5c895f740b278490455e813f7a6e05e10..f35bc2c813b30bd4d37f25b8809b381026b9ee14 100644 (file)
@@ -171,7 +171,9 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen,
         * processes. */
        if (res->b.b.target == PIPE_BUFFER ||
            res->b.b.nr_samples >= 2 ||
-           rtex->surface.micro_tile_mode != RADEON_MICRO_MODE_DISPLAY)
+           (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)))
                res->flags |= RADEON_FLAG_NO_INTERPROCESS_SHARING;
 
        /* If VRAM is just stolen system memory, allow both VRAM and