gallium: add external usage flags to resource_from(get)_handle (v2)

This will allow drivers to make better decisions about texture sharing
for DRI2, DRI3, Wayland, and OpenCL.

v2: add read/write flags, take advantage of __DRI_IMAGE_USE_BACKBUFFER

Reviewed-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
Marek Olšák
2016-02-24 18:51:15 +01:00
parent d943ac432d
commit 82db518f15
30 changed files with 123 additions and 54 deletions

View File

@@ -523,7 +523,8 @@ fail:
static struct pipe_resource *
vc4_resource_from_handle(struct pipe_screen *pscreen,
const struct pipe_resource *tmpl,
struct winsys_handle *handle)
struct winsys_handle *handle,
unsigned usage)
{
struct vc4_resource *rsc = vc4_resource_setup(pscreen, tmpl);
struct pipe_resource *prsc = &rsc->base.b;