From 9daaa6f5a66ab6cc99c6f0af37fc1007ab3d09af Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 21 Aug 2016 12:24:59 +0200 Subject: gallium: add a pipe_context parameter to resource_get_handle radeonsi needs to do some operations (DCC decompression) for OpenGL-OpenCL interop and this is the only way to make it coherent with the current context. It can optionally be set to NULL. Reviewed-by: Brian Paul --- src/gallium/state_trackers/vdpau/output.c | 3 ++- src/gallium/state_trackers/vdpau/surface.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gallium/state_trackers/vdpau') diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c index 0b4f081be3e..85751ea5701 100644 --- a/src/gallium/state_trackers/vdpau/output.c +++ b/src/gallium/state_trackers/vdpau/output.c @@ -796,7 +796,8 @@ VdpStatus vlVdpOutputSurfaceDMABuf(VdpVideoSurface surface, whandle.type = DRM_API_HANDLE_TYPE_FD; pscreen = vlsurface->surface->texture->screen; - if (!pscreen->resource_get_handle(pscreen, vlsurface->surface->texture, &whandle, + if (!pscreen->resource_get_handle(pscreen, vlsurface->device->context, + vlsurface->surface->texture, &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) return VDP_STATUS_NO_IMPLEMENTATION; diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 177483e0f6f..69afce00499 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -470,7 +470,8 @@ VdpStatus vlVdpVideoSurfaceDMABuf(VdpVideoSurface surface, whandle.layer = surf->u.tex.first_layer; pscreen = surf->texture->screen; - if (!pscreen->resource_get_handle(pscreen, surf->texture, &whandle, + if (!pscreen->resource_get_handle(pscreen, p_surf->device->context, + surf->texture, &whandle, PIPE_HANDLE_USAGE_READ_WRITE)) return VDP_STATUS_NO_IMPLEMENTATION; -- cgit v1.2.3