5 #include "pipe/p_compiler.h"
12 #define DRM_API_HANDLE_TYPE_SHARED 0
13 #define DRM_API_HANDLE_TYPE_KMS 1
16 * For use with pipe_screen::{texture_from_handle|texture_get_handle}.
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.
27 * Input to texture_from_handle.
28 * Output for texture_get_handle.
32 * Input to texture_from_handle.
33 * Output for texture_get_handle.
38 struct drm_driver_descriptor
41 * Identifying sufix/prefix of the binary, used by egl.
46 * Kernel driver name, as accepted by drmOpenByName.
48 const char *driver_name
;
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
;
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 = { \
67 .driver_name = driver_name_str, \
68 .create_screen = func, \