diff options
author | Marek Olšák <[email protected]> | 2016-08-21 12:24:59 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-25 14:09:48 +0200 |
commit | 9daaa6f5a66ab6cc99c6f0af37fc1007ab3d09af (patch) | |
tree | 47e62319d0ddea75f93bccf52305133e2e0be5f3 /src/gallium/include/pipe/p_screen.h | |
parent | b662c70aeab6a92751514f30719c13a6de253b40 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe/p_screen.h')
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index dd40e07b7ee..255647ed273 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -206,6 +206,12 @@ struct pipe_screen { * that the texture is created with a special usage flag like * DISPLAYTARGET or PRIMARY. * + * The context parameter can optionally be used to flush the resource and + * the context to make sure the resource is coherent with whatever user + * will use it. Some drivers may also use the context to convert + * the resource into a format compatible for sharing. The use case is + * OpenGL-OpenCL interop. The context parameter is allowed to be NULL. + * * NOTE: in the case of DRM_API_HANDLE_TYPE_FD handles, the caller * takes ownership of the FD. (This is consistent with * EGL_MESA_image_dma_buf_export) @@ -213,6 +219,7 @@ struct pipe_screen { * \param usage A combination of PIPE_HANDLE_USAGE_* flags. */ boolean (*resource_get_handle)(struct pipe_screen *, + struct pipe_context *context, struct pipe_resource *tex, struct winsys_handle *handle, unsigned usage); |