summaryrefslogtreecommitdiff
path: root/src/gallium/include/state_tracker
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@vmware.com>2009-08-27 18:57:29 +0100
committerJakob Bornecrantz <jakob@vmware.com>2009-08-28 13:38:23 +0100
commit1e5014f7dfabcaf1f4b5608eb08e97179446eb09 (patch)
tree75ab693e5e07467c36fd3593c440143d62ce907e /src/gallium/include/state_tracker
parent7d9af52bc59bfeb19d9bdb55258f4a830a1b0d04 (diff)
drm_api: Operate on textures instead of buffers
Most use cases just got the buffer from the texture and then called into one of the get_handle functions. Also with this patch it would be easier to move to a generic function for getting handles from textures and textures from handles, that is exposed via the screen.
Diffstat (limited to 'src/gallium/include/state_tracker')
-rw-r--r--src/gallium/include/state_tracker/drm_api.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
index 7a38b508fb..4d1259e1ee 100644
--- a/src/gallium/include/state_tracker/drm_api.h
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -42,21 +42,22 @@ struct drm_api
* Special buffer functions
*/
/*@{*/
- boolean (*buffer_from_texture)(struct drm_api *api,
- struct pipe_texture *texture,
- struct pipe_buffer **buffer,
- unsigned *stride);
- struct pipe_buffer* (*buffer_from_handle)(struct drm_api *api,
- struct pipe_screen *screen,
- const char *name,
- unsigned handle);
- boolean (*handle_from_buffer)(struct drm_api *api,
- struct pipe_screen *screen,
- struct pipe_buffer *buffer,
- unsigned *handle);
- boolean (*global_handle_from_buffer)(struct drm_api *api,
+ struct pipe_texture*
+ (*texture_from_shared_handle)(struct drm_api *api,
+ struct pipe_screen *screen,
+ struct pipe_texture *templ,
+ const char *name,
+ unsigned stride,
+ unsigned handle);
+ boolean (*shared_handle_from_texture)(struct drm_api *api,
+ struct pipe_screen *screen,
+ struct pipe_texture *texture,
+ unsigned *stride,
+ unsigned *handle);
+ boolean (*local_handle_from_texture)(struct drm_api *api,
struct pipe_screen *screen,
- struct pipe_buffer *buffer,
+ struct pipe_texture *texture,
+ unsigned *stride,
unsigned *handle);
/*@}*/