summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/common/intel_drm/intel_be_device.h
diff options
context:
space:
mode:
authorJakob Bornecrantz <jakob@tungstengraphics.com>2008-06-06 14:49:02 +0200
committerJakob Bornecrantz <jakob@tungstengraphics.com>2008-06-06 14:49:02 +0200
commitadbdabb85ae322d5c80cadcee931e36d5c688d98 (patch)
tree9274a42def079ecf97e7dff782e8196af4a5c246 /src/gallium/winsys/common/intel_drm/intel_be_device.h
parent18953a8771054f02f9a9bef08bf323e19086fdac (diff)
i915: Moved pipe_buffer and i915_winsys functions to a common folder
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