intel_be_device.h

Go to the documentation of this file.
00001 #ifndef INTEL_DRM_DEVICE_H
00002 #define INTEL_DRM_DEVICE_H
00003 
00004 #include "pipe/p_winsys.h"
00005 #include "pipe/p_context.h"
00006 
00007 /*
00008  * Device
00009  */
00010 
00011 struct intel_be_device
00012 {
00013         struct pipe_winsys base;
00014 
00018         struct pipe_screen *screen;
00019 
00020         int fd; 
00022         size_t max_batch_size;
00023         size_t max_vertex_size;
00024 
00025         struct _DriFenceMgr *fenceMgr;
00026 
00027         struct _DriBufferPool *batchPool;
00028         struct _DriBufferPool *regionPool;
00029         struct _DriBufferPool *mallocPool;
00030         struct _DriBufferPool *vertexPool;
00031         struct _DriBufferPool *staticPool;
00032         struct _DriFreeSlabManager *fMan;
00033 };
00034 
00035 boolean
00036 intel_be_init_device(struct intel_be_device *device, int fd, unsigned id);
00037 
00038 void
00039 intel_be_destroy_device(struct intel_be_device *dev);
00040 
00041 /*
00042  * Buffer
00043  */
00044 
00045 struct intel_be_buffer {
00046         struct pipe_buffer base;
00047         struct _DriBufferPool *pool;
00048         struct _DriBufferObject *driBO;
00049 };
00050 
00056 struct pipe_buffer *
00057 intel_be_buffer_from_handle(struct intel_be_device *device,
00058                             const char* name, unsigned handle);
00059 
00060 static INLINE struct intel_be_buffer *
00061 intel_be_buffer(struct pipe_buffer *buf)
00062 {
00063         return (struct intel_be_buffer *)buf;
00064 }
00065 
00066 static INLINE struct _DriBufferObject *
00067 dri_bo(struct pipe_buffer *buf)
00068 {
00069         return intel_be_buffer(buf)->driBO;
00070 }
00071 
00072 #endif

Generated on Tue Sep 29 06:25:17 2009 for Gallium3D by  doxygen 1.5.4