gallium/util: use uint sampler for stencil-reads
[mesa.git] / src / gallium / include / frontend / drm_driver.h
1
2 #ifndef _DRM_DRIVER_H_
3 #define _DRM_DRIVER_H_
4
5 #include "pipe/p_compiler.h"
6
7 #include "winsys_handle.h"
8
9 struct pipe_screen;
10 struct pipe_screen_config;
11 struct pipe_context;
12 struct pipe_resource;
13
14 struct drm_driver_descriptor
15 {
16 /**
17 * Identifying prefix/suffix of the binary, used by the pipe-loader.
18 */
19 const char *driver_name;
20
21 /**
22 * Pointer to the XML string describing driver-specific driconf options.
23 * Use DRI_CONF_* macros to create the string.
24 */
25 const char **driconf_xml;
26
27 /**
28 * Create a pipe srcreen.
29 *
30 * This function does any wrapping of the screen.
31 * For example wrapping trace or rbug debugging drivers around it.
32 */
33 struct pipe_screen* (*create_screen)(int drm_fd,
34 const struct pipe_screen_config *config);
35 };
36
37 extern const struct drm_driver_descriptor driver_descriptor;
38
39 /**
40 * Instantiate a drm_driver_descriptor struct.
41 */
42 #define DRM_DRIVER_DESCRIPTOR(driver_name_str, driconf, func) \
43 const struct drm_driver_descriptor driver_descriptor = { \
44 .driver_name = driver_name_str, \
45 .driconf_xml = driconf, \
46 .create_screen = func, \
47 };
48
49 #endif