summaryrefslogtreecommitdiff
path: root/src/gallium/include/state_tracker/drm_api.h
blob: 54480fa0477ad9cdf3ad5710c485a324e7ba445f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

#ifndef _DRM_API_H_
#define _DRM_API_H_

struct pipe_screen;
struct pipe_winsys;
struct pipe_context;

struct drm_api
{
	/**
	 * Special buffer function
	 */
	/*@{*/
	struct pipe_screen*  (*create_screen)(int drmFB, int pciID);
	struct pipe_context* (*create_context)(struct pipe_screen *screen);
	/*@}*/

	/**
	 * Special buffer function
	 */
	/*@{*/
	struct pipe_buffer* (*buffer_from_handle)(struct pipe_winsys *winsys, const char *name, unsigned handle);
	unsigned (*handle_from_buffer)(struct pipe_winsys *winsys, struct pipe_buffer *buffer);
	/*@}*/
};

/**
 * A driver needs to export this symbol
 */
extern struct drm_api drm_api_hocks;

#endif