diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2009-08-27 18:57:29 +0100 |
---|---|---|
committer | Jakob Bornecrantz <jakob@vmware.com> | 2009-08-28 13:38:23 +0100 |
commit | 1e5014f7dfabcaf1f4b5608eb08e97179446eb09 (patch) | |
tree | 75ab693e5e07467c36fd3593c440143d62ce907e /src/gallium/winsys/drm/intel/gem/intel_be_device.h | |
parent | 7d9af52bc59bfeb19d9bdb55258f4a830a1b0d04 (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/winsys/drm/intel/gem/intel_be_device.h')
-rw-r--r-- | src/gallium/winsys/drm/intel/gem/intel_be_device.h | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_device.h b/src/gallium/winsys/drm/intel/gem/intel_be_device.h index c397048f8c..15916b0b10 100644 --- a/src/gallium/winsys/drm/intel/gem/intel_be_device.h +++ b/src/gallium/winsys/drm/intel/gem/intel_be_device.h @@ -57,45 +57,39 @@ struct intel_be_buffer { unsigned flink; }; -/* - * Wrapper for driver get_texture_buffer functions. - */ -boolean -intel_be_get_texture_buffer(struct drm_api *api, - struct pipe_texture *texture, - struct pipe_buffer **buffer, - unsigned *stride); - /** - * Create a be buffer from a drm bo handle. - * - * Takes a reference. + * Create a texture from a shared drm handle. */ -struct pipe_buffer * -intel_be_buffer_from_handle(struct drm_api *api, - struct pipe_screen *screen, - const char* name, unsigned handle); +struct pipe_texture * +intel_be_texture_from_shared_handle(struct drm_api *api, + struct pipe_screen *screen, + struct pipe_texture *templ, + const char* name, + unsigned pitch, + unsigned handle); /** - * Gets a handle from a buffer. + * Gets a shared handle from a texture. * - * If buffer is destroyed handle may become invalid. + * If texture is destroyed handle may become invalid. */ boolean -intel_be_handle_from_buffer(struct drm_api *api, - struct pipe_screen *screen, - struct pipe_buffer *buffer, - unsigned *handle); +intel_be_shared_handle_from_texture(struct drm_api *api, + struct pipe_screen *screen, + struct pipe_texture *texture, + unsigned *pitch, + unsigned *handle); /** - * Gets the global handle from a buffer. + * Gets the local handle from a texture. As used by KMS. * - * If buffer is destroyed handle may become invalid. + * If texture is destroyed handle may become invalid. */ boolean -intel_be_global_handle_from_buffer(struct drm_api *api, +intel_be_local_handle_from_texture(struct drm_api *api, struct pipe_screen *screen, - struct pipe_buffer *buffer, + struct pipe_texture *texture, + unsigned *pitch, unsigned *handle); static INLINE struct intel_be_buffer * |