From 1e5014f7dfabcaf1f4b5608eb08e97179446eb09 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 27 Aug 2009 18:57:29 +0100 Subject: 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. --- src/gallium/include/state_tracker/drm_api.h | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src/gallium/include/state_tracker') 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); /*@}*/ -- cgit v1.2.3