gallium/radeon: disallow handle export for MSAA & depth textures

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák
2016-02-24 20:17:50 +01:00
parent d95f593758
commit d4e847ea33

View File

@@ -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;