[Mesa-dev] [PATCH 1/7] radeonsi/gfx9: fix interprocess resource sharing on Raven
Marek Olšák
maraeo at gmail.com
Wed Sep 6 09:34:24 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
This kinda fragiile, but it at least unbreaks the driver.
---
src/gallium/drivers/radeon/r600_buffer_common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 4f5e17d..f35bc2c 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -164,21 +164,23 @@ void r600_init_resource_fields(struct r600_common_screen *rscreen,
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)
+ (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
* 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
More information about the mesa-dev
mailing list