summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/xa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-02-24 18:51:15 +0100
committerMarek Olšák <[email protected]>2016-03-09 15:02:25 +0100
commit82db518f1519cec9e3842f23455a105e2006afbd (patch)
tree5baa1ddfa03e94f1edc53b10473c67b9dce26fee /src/gallium/state_trackers/xa
parentd943ac432de1f46cea47bdbf5ffe5365e2aef386 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/xa')
-rw-r--r--src/gallium/state_trackers/xa/xa_tracker.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c
index d57464b7d60..f09baed1d84 100644
--- a/src/gallium/state_trackers/xa/xa_tracker.c
+++ b/src/gallium/state_trackers/xa/xa_tracker.c
@@ -362,7 +362,8 @@ surface_create(struct xa_tracker *xa,
template->bind |= PIPE_BIND_SCANOUT;
if (whandle)
- srf->tex = xa->screen->resource_from_handle(xa->screen, template, whandle);
+ srf->tex = xa->screen->resource_from_handle(xa->screen, template, whandle,
+ PIPE_HANDLE_USAGE_READ_WRITE);
else
srf->tex = xa->screen->resource_create(xa->screen, template);
if (!srf->tex)
@@ -548,7 +549,8 @@ xa_surface_handle(struct xa_surface *srf,
memset(&whandle, 0, sizeof(whandle));
whandle.type = handle_type(type);
- res = screen->resource_get_handle(screen, srf->tex, &whandle);
+ res = screen->resource_get_handle(screen, srf->tex, &whandle,
+ PIPE_HANDLE_USAGE_READ_WRITE);
if (!res)
return -XA_ERR_INVAL;