From d4e847ea33039f1d31843e69ab238f2225982393 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 24 Feb 2016 20:17:50 +0100 Subject: [PATCH] gallium/radeon: disallow handle export for MSAA & depth textures MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Michel Dänzer Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_texture.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 8fc236e713c..21bb3f9bed1 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -259,6 +259,13 @@ static boolean r600_texture_get_handle(struct pipe_screen* screen, struct r600_texture *rtex = (struct r600_texture*)resource; struct radeon_bo_metadata metadata; + /* This is not supported now, but it might be required for OpenCL + * interop in the future. + */ + if (resource->target != PIPE_BUFFER && + (resource->nr_samples > 1 || rtex->is_depth)) + return NULL; + if (!res->is_shared) { res->is_shared = true; res->external_usage = usage; -- 2.30.2