summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-06-30 11:49:43 +0200
committerJakob Bornecrantz <[email protected]>2009-06-30 12:20:39 +0200
commit303cbb45b558a2b94e6922252cf57d115ba60b82 (patch)
treed56f9e58b8a3944ed7885bc1a72b1f786c98338e /src/gallium/include
parentefe9faf0612778db2423a4f8835b318b95d9efd7 (diff)
drm/st: Return drm_api struct from a function
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/state_tracker/drm_api.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
index 5790b2f6c7e..7a38b508fbe 100644
--- a/src/gallium/include/state_tracker/drm_api.h
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -32,33 +32,37 @@ struct drm_api
* Special buffer functions
*/
/*@{*/
- struct pipe_screen* (*create_screen)(int drm_fd,
- struct drm_create_screen_arg *arg);
- struct pipe_context* (*create_context)(struct pipe_screen *screen);
+ struct pipe_screen* (*create_screen)(struct drm_api *api, int drm_fd,
+ struct drm_create_screen_arg *arg);
+ struct pipe_context* (*create_context)(struct drm_api *api,
+ struct pipe_screen *screen);
/*@}*/
/**
* Special buffer functions
*/
/*@{*/
- boolean (*buffer_from_texture)(struct pipe_texture *texture,
- struct pipe_buffer **buffer,
- unsigned *stride);
- struct pipe_buffer* (*buffer_from_handle)(struct pipe_screen *screen,
+ 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 pipe_screen *screen,
- struct pipe_buffer *buffer,
- unsigned *handle);
- boolean (*global_handle_from_buffer)(struct pipe_screen *screen,
- struct pipe_buffer *buffer,
- 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_screen *screen,
+ struct pipe_buffer *buffer,
+ unsigned *handle);
/*@}*/
+
+ void (*destroy)(struct drm_api *api);
};
-/**
- * A driver needs to export this symbol
- */
-extern struct drm_api drm_api_hooks;
+extern struct drm_api * drm_api_create(void);
#endif