If the buffer is being shared with an external client, our own state
tracking may be stale and in some cases we may wish to double check with
the kernel/hw state. At the moment, this is synonymous with not being
reusable, but the semantics between reusable and external are quite
different and we will have more examples of non-reusable buffers in the
near future.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
bo->name = name;
bo->global_name = handle;
bo->reusable = false;
+ bo->external = true;
_mesa_hash_table_insert(bufmgr->handle_table, &bo->gem_handle, bo);
_mesa_hash_table_insert(bufmgr->name_table, &bo->global_name, bo);
bo->name = "prime";
bo->reusable = false;
+ bo->external = true;
memclear(get_tiling);
get_tiling.handle = bo->gem_handle;
return -errno;
bo->reusable = false;
+ bo->external = true;
return 0;
}
if (!bo->global_name) {
bo->global_name = flink.name;
bo->reusable = false;
+ bo->external = true;
_mesa_hash_table_insert(bufmgr->name_table, &bo->global_name, bo);
}
*/
bool reusable;
+ /**
+ * Boolean of whether this buffer has been shared with an external client.
+ */
+ bool external;
+
/**
* Boolean of whether this buffer is cache coherent
*/