Merge commit 'origin/gallium-0.2' into gallium-xlib-rework
[mesa.git] / src / gallium / include / state_tracker / drm_api.h
1
2 #ifndef _DRM_API_H_
3 #define _DRM_API_H_
4
5 struct pipe_screen;
6 struct pipe_winsys;
7 struct pipe_context;
8
9 struct drm_api
10 {
11 /**
12 * Special buffer function
13 */
14 /*@{*/
15 struct pipe_screen* (*create_screen)(int drmFB, int pciID);
16 struct pipe_context* (*create_context)(struct pipe_screen *screen);
17 /*@}*/
18
19 /**
20 * Special buffer function
21 */
22 /*@{*/
23 struct pipe_buffer* (*buffer_from_handle)(struct pipe_winsys *winsys, const char *name, unsigned handle);
24 unsigned (*handle_from_buffer)(struct pipe_winsys *winsys, struct pipe_buffer *buffer);
25 /*@}*/
26 };
27
28 /**
29 * A driver needs to export this symbol
30 */
31 extern struct drm_api drm_api_hocks;
32
33 #endif