summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/common/intel_drm/intel_be_device.h
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-06-23 00:01:17 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-06-23 00:01:17 +1000
commitaa3ab377e6e2e5811cdd704d87c3e24acb5eff72 (patch)
treeab8a443a58a58a6b88f35d4b5730ed1292e44d26 /src/gallium/winsys/common/intel_drm/intel_be_device.h
parent8c26a521ee80f5d8a1d0aabd0910233aad400322 (diff)
parente2c3f06e9649b5b87fc9adbca7d1f07841bba895 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Conflicts: configs/default
Diffstat (limited to 'src/gallium/winsys/common/intel_drm/intel_be_device.h')
-rw-r--r--src/gallium/winsys/common/intel_drm/intel_be_device.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/gallium/winsys/common/intel_drm/intel_be_device.h b/src/gallium/winsys/common/intel_drm/intel_be_device.h
new file mode 100644
index 0000000000..ec5cace71c
--- /dev/null
+++ b/src/gallium/winsys/common/intel_drm/intel_be_device.h
@@ -0,0 +1,58 @@
+#ifndef INTEL_DRM_DEVICE_H
+#define INTEL_DRM_DEVICE_H
+
+#include "pipe/p_winsys.h"
+#include "pipe/p_context.h"
+
+/*
+ * Device
+ */
+
+struct intel_be_device
+{
+ struct pipe_winsys base;
+
+ int fd; /**< Drm file discriptor */
+
+ size_t max_batch_size;
+ size_t max_vertex_size;
+
+ struct _DriFenceMgr *fenceMgr;
+
+ struct _DriBufferPool *batchPool;
+ struct _DriBufferPool *regionPool;
+ struct _DriBufferPool *mallocPool;
+ struct _DriBufferPool *vertexPool;
+ struct _DriBufferPool *staticPool;
+ struct _DriFreeSlabManager *fMan;
+};
+
+boolean
+intel_be_init_device(struct intel_be_device *device, int fd);
+
+void
+intel_be_destroy_device(struct intel_be_device *dev);
+
+/*
+ * Buffer
+ */
+
+struct intel_be_buffer {
+ struct pipe_buffer base;
+ struct _DriBufferPool *pool;
+ struct _DriBufferObject *driBO;
+};
+
+static INLINE struct intel_be_buffer *
+intel_be_buffer( struct pipe_buffer *buf )
+{
+ return (struct intel_be_buffer *)buf;
+}
+
+static INLINE struct _DriBufferObject *
+dri_bo( struct pipe_buffer *buf )
+{
+ return intel_be_buffer(buf)->driBO;
+}
+
+#endif