mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-29 18:28:14 +02:00
This works on top Gallium and KMS. The only thing that does not work currently is swap buffers for shown mesa screens. So the only fun thing this will produce is a white screen. The driver wishing to us the state_tracker needs to implement the intrace as define in drm_api.h located in gallium/include/state_tracker. And also have a working KMS implementation.
33 lines
654 B
C
33 lines
654 B
C
|
|
#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
|