summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-04-28 11:23:11 +0200
committerThomas Hellstrom <thellstrom-at-vmware-dot-com>2009-04-28 11:25:56 +0200
commit638261b3530106b70819c2fe0c3cd613c0d85777 (patch)
tree120e783f5c7402ced10d07b288112c503261c67a /src/gallium/include
parent359a58230e0644a39c1904a74bc25803dc6cab6f (diff)
gallium: Update the drm_api.
Make it possible to pass state-tracker-specific data to the init_screen function, and even open the door for device-specific state-tracker screen initialization. Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/state_tracker/drm_api.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/include/state_tracker/drm_api.h b/src/gallium/include/state_tracker/drm_api.h
index 435435da29c..5790b2f6c7e 100644
--- a/src/gallium/include/state_tracker/drm_api.h
+++ b/src/gallium/include/state_tracker/drm_api.h
@@ -10,13 +10,30 @@ struct pipe_buffer;
struct pipe_context;
struct pipe_texture;
+enum drm_create_screen_mode {
+ DRM_CREATE_NORMAL = 0,
+ DRM_CREATE_DRI1,
+ DRM_CREATE_DRIVER = 1024,
+ DRM_CREATE_MAX
+};
+
+/**
+ * Modes other than DRM_CREATE_NORMAL derive from this struct.
+ */
+/*@{*/
+struct drm_create_screen_arg {
+ enum drm_create_screen_mode mode;
+};
+/*@}*/
+
struct drm_api
{
/**
* Special buffer functions
*/
/*@{*/
- struct pipe_screen* (*create_screen)(int drmFB, int pciID);
+ struct pipe_screen* (*create_screen)(int drm_fd,
+ struct drm_create_screen_arg *arg);
struct pipe_context* (*create_context)(struct pipe_screen *screen);
/*@}*/