f0171f3c0f804a8a995233a0bd16afe84cd628ed
[mesa.git] / src / mesa / drivers / dri / sis / server / sis_dri.h
1
2 /* modified from tdfx_dri.h */
3
4 #ifndef _SIS_DRI_
5 #define _SIS_DRI_
6
7 #include "xf86drm.h"
8 #include "drm.h"
9
10 #define SIS_MAX_DRAWABLES 256
11 #define SISIOMAPSIZE (64*1024)
12
13 typedef struct {
14 int CtxOwner;
15 int QueueLength;
16 unsigned int AGPCmdBufNext;
17 unsigned int FrameCount;
18 #ifdef SIS315DRI
19 /* For 315 series */
20 unsigned long sharedWPoffset;
21 #endif
22 #if 0
23 unsigned char *AGPCmdBufBase;
24 unsigned long AGPCmdBufAddr;
25 unsigned long AGPCmdBufOffset;
26 unsigned int AGPCmdBufSize;
27 unsigned long AGPCmdBufNext;
28 #endif
29 } SISSAREAPriv, *SISSAREAPrivPtr;
30
31 #define AGPVtxBufNext AGPCmdBufNext
32
33 #define SIS_FRONT 0
34 #define SIS_BACK 1
35 #define SIS_DEPTH 2
36
37 typedef struct {
38 drm_handle_t handle;
39 drmSize size;
40 } sisRegion, *sisRegionPtr;
41
42 typedef struct {
43 sisRegion regs, agp;
44 int deviceID;
45 int width;
46 int height;
47 int mem; /* unused in Mesa 3 DRI */
48 int bytesPerPixel;
49 int priv1; /* unused in Mesa 3 DRI */
50 int priv2; /* unused in Mesa 3 DRI */
51 int fbOffset; /* unused in Mesa 3 DRI */
52 int backOffset; /* unused in Mesa 3 DRI */
53 int depthOffset; /* unused in Mesa 3 DRI */
54 int textureOffset; /* unused in Mesa 3 DRI */
55 int textureSize; /* unused in Mesa 3 DRI */
56 unsigned int AGPCmdBufOffset;
57 unsigned int AGPCmdBufSize;
58 int irqEnabled; /* unused in Mesa 3 DRI */
59 unsigned int scrnX, scrnY; /* unused in Mesa 3 DRI */
60 } SISDRIRec, *SISDRIPtr;
61
62 #define AGPVtxBufOffset AGPCmdBufOffset
63 #define AGPVtxBufSize AGPCmdBufSize
64
65 typedef struct {
66 /* Nothing here yet */
67 int dummy;
68 } SISConfigPrivRec, *SISConfigPrivPtr;
69
70 typedef struct {
71 /* Nothing here yet */
72 int dummy;
73 } SISDRIContextRec, *SISDRIContextPtr;
74
75 #ifdef XFree86Server
76
77 #include "screenint.h"
78
79 Bool SISDRIScreenInit(ScreenPtr pScreen);
80 void SISDRICloseScreen(ScreenPtr pScreen);
81 Bool SISDRIFinishScreenInit(ScreenPtr pScreen);
82
83 #endif
84 #endif