aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2009-01-18 15:36:47 +0100
committerJakob Bornecrantz <[email protected]>2009-01-18 15:40:12 +0100
commit7047f1755f88d6b1f424904e692edbd03a9d190b (patch)
treeb993987c2199b5019ba855c4a0d1fa4901bff2d1 /src/gallium/include
parenta874cf37ee2a792991819cad2cb73e3d2ddc87a3 (diff)
egl: Add a egl state_tracker that use Gallium
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.
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/state_tracker/drm_api.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
new file mode 100644
index 00000000000..54480fa0477
--- /dev/null
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -0,0 +1,33 @@
+
+#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