summaryrefslogtreecommitdiff
path: root/src/gallium/include/state_tracker/drm_api.h
blob: 588fa3a312c4f87eb51dd3eda4e931800625ab16 (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
34
35
36

#ifndef _DRM_API_H_
#define _DRM_API_H_

struct pipe_screen;
struct pipe_winsys;
struct pipe_buffer;
struct pipe_context;
struct pipe_texture;

struct drm_api
{
	/**
	 * Special buffer functions
	 */
	/*@{*/
	struct pipe_screen*  (*create_screen)(int drmFB, int pciID);
	struct pipe_context* (*create_context)(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, const char *name, unsigned handle);
	unsigned (*handle_from_buffer)(struct pipe_screen *screen, struct pipe_buffer *buffer);
	/*@}*/
};

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

#endif