revert between 56095 -> 55830 in arch
[AROS.git] / workbench / libs / mesa / src / gallium / include / state_tracker / drm_driver.h
blobd94c1e6a7cf2eff9e95d5ac84851e98d36e30a6e
2 #ifndef _DRM_DRIVER_H_
3 #define _DRM_DRIVER_H_
5 #include "pipe/p_compiler.h"
7 struct pipe_screen;
8 struct pipe_winsys;
9 struct pipe_context;
10 struct pipe_resource;
12 #define DRM_API_HANDLE_TYPE_SHARED 0
13 #define DRM_API_HANDLE_TYPE_KMS 1
15 /**
16 * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
18 struct winsys_handle
20 /**
21 * Unused for texture_from_handle, always
22 * DRM_API_HANDLE_TYPE_SHARED. Input to texture_get_handle,
23 * use TEXTURE_USAGE to select handle for kms or ipc.
25 unsigned type;
26 /**
27 * Input to texture_from_handle.
28 * Output for texture_get_handle.
30 unsigned handle;
31 /**
32 * Input to texture_from_handle.
33 * Output for texture_get_handle.
35 unsigned stride;
38 struct drm_driver_descriptor
40 /**
41 * Identifying sufix/prefix of the binary, used by egl.
43 const char *name;
45 /**
46 * Kernel driver name, as accepted by drmOpenByName.
48 const char *driver_name;
50 /**
51 * Create a pipe srcreen.
53 * This function does any wrapping of the screen.
54 * For example wrapping trace or rbug debugging drivers around it.
56 struct pipe_screen* (*create_screen)(int drm_fd);
59 extern struct drm_driver_descriptor driver_descriptor;
61 /**
62 * Instantiate a drm_driver_descriptor struct.
64 #define DRM_DRIVER_DESCRIPTOR(name_str, driver_name_str, func) \
65 struct drm_driver_descriptor driver_descriptor = { \
66 .name = name_str, \
67 .driver_name = driver_name_str, \
68 .create_screen = func, \
71 #endif