Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
/* Whether the resource has been exported via resource_get_handle. */
bool is_shared;
+ unsigned external_usage; /* PIPE_HANDLE_USAGE_* */
};
struct r600_transfer {
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,