1 /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.h,v 1.10 2002/12/10 01:27:04 dawes Exp $ */
7 #include "i810_common.h"
9 #define I810_MAX_DRAWABLES 256
16 drmSize backbufferSize
;
19 drmSize depthbufferSize
;
20 drmHandle depthbuffer
;
25 drmHandle agp_buffers
;
43 int logTextureGranularity
;
46 /* For non-dma direct rendering.
53 unsigned int sarea_priv_offset
;
55 } I810DRIRec
, *I810DRIPtr
;
57 /* WARNING: Do not change the SAREA structure without changing the kernel
60 #define I810_UPLOAD_TEX0IMAGE 0x1 /* handled clientside */
61 #define I810_UPLOAD_TEX1IMAGE 0x2 /* handled clientside */
62 #define I810_UPLOAD_CTX 0x4
63 #define I810_UPLOAD_BUFFERS 0x8
64 #define I810_UPLOAD_TEX0 0x10
65 #define I810_UPLOAD_TEX1 0x20
66 #define I810_UPLOAD_CLIPRECTS 0x40
69 unsigned char next
, prev
; /* indices to form a circular LRU */
70 unsigned char in_use
; /* owned by a client, or free? */
71 int age
; /* tracked by clients to update local LRU's */
72 } I810TexRegionRec
, *I810TexRegionPtr
;
75 unsigned int ContextState
[I810_CTX_SETUP_SIZE
];
76 unsigned int BufferState
[I810_DEST_SETUP_SIZE
];
77 unsigned int TexState
[2][I810_TEX_SETUP_SIZE
];
81 XF86DRIClipRectRec boxes
[I810_NR_SAREA_CLIPRECTS
];
83 /* Maintain an LRU of contiguous regions of texture space. If
84 * you think you own a region of texture memory, and it has an
85 * age different to the one you set, then you are mistaken and
86 * it has been stolen by another client. If global texAge
87 * hasn't changed, there is no need to walk the list.
89 * These regions can be used as a proxy for the fine-grained
90 * texture information of other clients - by maintaining them
91 * in the same lru which is used to age their own textures,
92 * clients have an approximate lru for the whole of global
93 * texture space, and can make informed decisions as to which
94 * areas to kick out. There is no need to choose whether to
95 * kick out your own texture or someone else's - simply eject
96 * them all in LRU order.
99 drmTextureRegion texList
[I810_NR_TEX_REGIONS
+ 1];
101 /* Last elt is sentinal */
102 int texAge
; /* last time texture was uploaded */
104 int last_enqueue
; /* last time a buffer was enqueued */
105 int last_dispatch
; /* age of the most recently dispatched buffer */
106 int last_quiescent
; /* */
108 int ctxOwner
; /* last context to upload state */
112 int pf_enabled
; /* is pageflipping allowed? */
113 int pf_active
; /* is pageflipping active right now? */
114 int pf_current_page
; /* which buffer is being displayed? */
117 } I810SAREARec
, *I810SAREAPtr
;
120 /* Nothing here yet */
122 } I810ConfigPrivRec
, *I810ConfigPrivPtr
;
125 /* Nothing here yet */
127 } I810DRIContextRec
, *I810DRIContextPtr
;