summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-09-14 15:41:09 +0200
committerMarek Olšák <[email protected]>2017-09-18 17:47:49 +0200
commita5b764cfeaa22172b314c9652c7f05ebfd4c74c8 (patch)
treec1bc76b42d9b1ac1a595c63d67b81d2f7ea0f1bf /src/gallium/drivers/radeon
parent7b616f7b714b31976f96845ac727504bcf4e4f65 (diff)
radeonsi: reallocate if a non-sharable textures is being shared
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 26afc980ece..e9507c3f541 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -35,6 +35,7 @@
#include "os/os_time.h"
#include <errno.h>
#include <inttypes.h>
+#include "state_tracker/drm_driver.h"
static void r600_texture_discard_cmask(struct r600_common_screen *rscreen,
struct r600_texture *rtex);
@@ -605,13 +606,16 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
/* Move a suballocated texture into a non-suballocated allocation. */
if (rscreen->ws->buffer_is_suballocated(res->buf) ||
- rtex->surface.tile_swizzle) {
+ rtex->surface.tile_swizzle ||
+ (rtex->resource.flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
+ whandle->type != DRM_API_HANDLE_TYPE_KMS)) {
assert(!res->b.is_shared);
r600_reallocate_texture_inplace(rctx, rtex,
PIPE_BIND_SHARED, false);
rctx->b.flush(&rctx->b, NULL, 0);
assert(res->b.b.bind & PIPE_BIND_SHARED);
assert(res->flags & RADEON_FLAG_NO_SUBALLOC);
+ assert(!(res->flags & RADEON_FLAG_NO_INTERPROCESS_SHARING));
assert(rtex->surface.tile_swizzle == 0);
}