#ifndef _I830_DRI_H
#define _I830_DRI_H
#include "xf86drm.h"
#include "i830_common.h"
#define I830_MAX_DRAWABLES 256
#define I830_MAJOR_VERSION 1
#define I830_MINOR_VERSION 3
#define I830_PATCHLEVEL 0
#define I830_REG_SIZE 0x80000
typedef struct _I830DRIRec {
drmHandle regs;
drmSize regsSize;
drmAddress regsMap;
drmSize backbufferSize;
drmHandle backbuffer;
drmSize depthbufferSize;
drmHandle depthbuffer;
drmHandle textures;
int textureSize;
drmHandle agp_buffers;
drmSize agp_buf_size;
int deviceID;
int width;
int height;
int mem;
int cpp;
int bitsPerPixel;
int fbOffset;
int fbStride;
int backOffset;
int depthOffset;
int auxPitch;
int auxPitchBits;
int logTextureGranularity;
int textureOffset;
int ringOffset;
int ringSize;
drmBufMapPtr drmBufs;
int irq;
int sarea_priv_offset;
} I830DRIRec, *I830DRIPtr;
typedef struct {
int dummy;
} I830ConfigPrivRec, *I830ConfigPrivPtr;
typedef struct {
int dummy;
} I830DRIContextRec, *I830DRIContextPtr;
typedef struct _I830SAREA {
unsigned int ContextState[I830_CTX_SETUP_SIZE];
unsigned int BufferState[I830_DEST_SETUP_SIZE];
unsigned int TexState[I830_TEXTURE_COUNT][I830_TEX_SETUP_SIZE];
unsigned int TexBlendState[I830_TEXBLEND_COUNT][I830_TEXBLEND_SIZE];
unsigned int TexBlendStateWordsUsed[I830_TEXBLEND_COUNT];
unsigned int Palette[2][256];
unsigned int dirty;
unsigned int nbox;
XF86DRIClipRectRec boxes[I830_NR_SAREA_CLIPRECTS];
drmTextureRegion texList[I830_NR_TEX_REGIONS + 1];
int texAge;
int last_enqueue;
int last_dispatch;
int last_quiescent;
int ctxOwner;
int vertex_prim;
int pf_enabled;
int pf_active;
int pf_current_page;
int perf_boxes;
unsigned int TexState2[I830_TEX_SETUP_SIZE];
unsigned int TexBlendState2[I830_TEXBLEND_SIZE];
unsigned int TexBlendStateWordsUsed2;
unsigned int TexState3[I830_TEX_SETUP_SIZE];
unsigned int TexBlendState3[I830_TEXBLEND_SIZE];
unsigned int TexBlendStateWordsUsed3;
unsigned int StippleState[I830_STP_SETUP_SIZE];
} I830SAREARec, *I830SAREAPtr;
#define I830_BOX_RING_EMPTY 0x1
#define I830_BOX_FLIP 0x2
#define I830_BOX_WAIT 0x4
#define I830_BOX_TEXTURE_LOAD 0x8
#define I830_BOX_LOST_CONTEXT 0x10
#endif