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/drivers/rbug/rbug_screen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/rbug/rbug_screen.c') diff --git a/src/gallium/drivers/rbug/rbug_screen.c b/src/gallium/drivers/rbug/rbug_screen.c index 8d216691fdb..3742c103306 100644 --- a/src/gallium/drivers/rbug/rbug_screen.c +++ b/src/gallium/drivers/rbug/rbug_screen.c @@ -176,16 +176,19 @@ rbug_screen_resource_from_handle(struct pipe_screen *_screen, static boolean rbug_screen_resource_get_handle(struct pipe_screen *_screen, + struct pipe_context *_pipe, struct pipe_resource *_resource, struct winsys_handle *handle, unsigned usage) { struct rbug_screen *rb_screen = rbug_screen(_screen); + struct rbug_context *rb_pipe = rbug_context(_pipe); struct rbug_resource *rb_resource = rbug_resource(_resource); struct pipe_screen *screen = rb_screen->screen; struct pipe_resource *resource = rb_resource->resource; - return screen->resource_get_handle(screen, resource, handle, usage); + return screen->resource_get_handle(screen, rb_pipe ? rb_pipe->pipe : NULL, + resource, handle, usage); } -- cgit v1.2.3