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