st/drm: Bring drm_api.h up to date with latest changes
[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_buffer;
8 struct pipe_context;
9 struct pipe_texture;
10
11 struct drm_api
12 {
13 /**
14 * Special buffer functions
15 */
16 /*@{*/
17 struct pipe_screen* (*create_screen)(int drmFB, int pciID);
18 struct pipe_context* (*create_context)(struct pipe_screen *screen);
19 /*@}*/
20
21 /**
22 * Special buffer functions
23 */
24 /*@{*/
25 boolean (*buffer_from_texture)(struct pipe_texture *texture, struct pipe_buffer **buffer, unsigned *stride);
26 struct pipe_buffer* (*buffer_from_handle)(struct pipe_screen *screen, const char *name, unsigned handle);
27 unsigned (*handle_from_buffer)(struct pipe_screen *screen, struct pipe_buffer *buffer);
28 /*@}*/
29 };
30
31 /**
32 * A driver needs to export this symbol
33 */
34 extern struct drm_api drm_api_hocks;
35
36 #endif