summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/r600_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/radeon/r600_texture.c')
-rw-r--r--src/gallium/drivers/radeon/r600_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c
index 558dc73d9d4..5f49dd7df5d 100644
--- a/src/gallium/drivers/radeon/r600_texture.c
+++ b/src/gallium/drivers/radeon/r600_texture.c
@@ -261,11 +261,14 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen,
if (!res->is_shared) {
res->is_shared = true;
+ res->external_usage = usage;
if (resource->target != PIPE_BUFFER) {
r600_texture_init_metadata(rtex, &metadata);
rscreen->ws->buffer_set_metadata(res->buf, &metadata);
}
+ } else {
+ assert(res->external_usage == usage);
}
return rscreen->ws->buffer_get_handle(res->buf,