summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_screen.h
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2010-02-15 17:17:30 +0000
committerJakob Bornecrantz <jakob@vmware.com>2010-03-01 16:05:24 +0000
commitb2e94d05c9602e2814a513a51eed67d014b338f3 (patch)
treeed1b442663384771a7060847dfdba85d439b7bb4 /src/gallium/include/pipe/p_screen.h
parentf54aecc4f2e83babd1883c2bbd0bba6906cdab07 (diff)
gallium: Expose a opaque winsys handle and functions on pipe_screen
Instead of having these functions on a side interface like on drm_api create a opaque winsys_handle that is to be passed down into the winsys. Currently the only thing ported to this new interface is drm_api, and of that only the components that builds by default is ported. All the drivers and any extra state trackers needs to be ported before this can go into master.
Diffstat (limited to 'src/gallium/include/pipe/p_screen.h')
-rw-r--r--src/gallium/include/pipe/p_screen.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h
index e4a9222809..617c47e4dc 100644
--- a/src/gallium/include/pipe/p_screen.h
+++ b/src/gallium/include/pipe/p_screen.h
@@ -50,6 +50,8 @@ extern "C" {
/** Opaque type */
+struct winsys_handle;
+/** Opaque type */
struct pipe_fence_handle;
struct pipe_winsys;
struct pipe_buffer;
@@ -108,6 +110,24 @@ struct pipe_screen {
const struct pipe_texture *templat);
/**
+ * Create a texture from a winsys_handle. The handle is often created in
+ * another process by first creating a pipe texture and then calling
+ * texture_get_handle.
+ */
+ struct pipe_texture * (*texture_from_handle)(struct pipe_screen *,
+ const struct pipe_texture *templat,
+ struct winsys_handle *handle);
+
+ /**
+ * Get a winsys_handle from a texture. Some platforms/winsys requires
+ * that the texture is created with a special usage flag like
+ * DISPLAYTARGET or PRIMARY.
+ */
+ boolean (*texture_get_handle)(struct pipe_screen *,
+ struct pipe_texture *tex,
+ struct winsys_handle *handle);
+
+ /**
* Create a new texture object, using the given template info, but on top of
* existing memory.
*