svga: More don't recurse
[mesa.git] / src / driclient / src / xf86dristr.h
1 /**************************************************************************
2
3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
4 Copyright 2000 VA Linux Systems, Inc.
5 All Rights Reserved.
6
7 Permission is hereby granted, free of charge, to any person obtaining a
8 copy of this software and associated documentation files (the
9 "Software"), to deal in the Software without restriction, including
10 without limitation the rights to use, copy, modify, merge, publish,
11 distribute, sub license, and/or sell copies of the Software, and to
12 permit persons to whom the Software is furnished to do so, subject to
13 the following conditions:
14
15 The above copyright notice and this permission notice (including the
16 next paragraph) shall be included in all copies or substantial portions
17 of the Software.
18
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
23 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
27 **************************************************************************/
28
29 /*
30 * Authors:
31 * Kevin E. Martin <martin@valinux.com>
32 * Jens Owen <jens@tungstengraphics.com>
33 * Rickard E. (Rik) Fiath <faith@valinux.com>
34 *
35 */
36
37 #ifndef _XF86DRISTR_H_
38 #define _XF86DRISTR_H_
39
40 #include "xf86dri.h"
41
42 #define XF86DRINAME "XFree86-DRI"
43
44 /* The DRI version number. This was originally set to be the same of the
45 * XFree86 version number. However, this version is really indepedent of
46 * the XFree86 version.
47 *
48 * Version History:
49 * 4.0.0: Original
50 * 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02
51 * 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02
52 */
53 #define XF86DRI_MAJOR_VERSION 4
54 #define XF86DRI_MINOR_VERSION 1
55 #define XF86DRI_PATCH_VERSION 0
56
57 typedef struct _XF86DRIQueryVersion {
58 CARD8 reqType; /* always DRIReqCode */
59 CARD8 driReqType; /* always X_DRIQueryVersion */
60 CARD16 length B16;
61 } xXF86DRIQueryVersionReq;
62 #define sz_xXF86DRIQueryVersionReq 4
63
64 typedef struct {
65 BYTE type; /* X_Reply */
66 BOOL pad1;
67 CARD16 sequenceNumber B16;
68 CARD32 length B32;
69 CARD16 majorVersion B16; /* major version of DRI protocol */
70 CARD16 minorVersion B16; /* minor version of DRI protocol */
71 CARD32 patchVersion B32; /* patch version of DRI protocol */
72 CARD32 pad3 B32;
73 CARD32 pad4 B32;
74 CARD32 pad5 B32;
75 CARD32 pad6 B32;
76 } xXF86DRIQueryVersionReply;
77 #define sz_xXF86DRIQueryVersionReply 32
78
79 typedef struct _XF86DRIQueryDirectRenderingCapable {
80 CARD8 reqType; /* always DRIReqCode */
81 CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */
82 CARD16 length B16;
83 CARD32 screen B32;
84 } xXF86DRIQueryDirectRenderingCapableReq;
85 #define sz_xXF86DRIQueryDirectRenderingCapableReq 8
86
87 typedef struct {
88 BYTE type; /* X_Reply */
89 BOOL pad1;
90 CARD16 sequenceNumber B16;
91 CARD32 length B32;
92 BOOL isCapable;
93 BOOL pad2;
94 BOOL pad3;
95 BOOL pad4;
96 CARD32 pad5 B32;
97 CARD32 pad6 B32;
98 CARD32 pad7 B32;
99 CARD32 pad8 B32;
100 CARD32 pad9 B32;
101 } xXF86DRIQueryDirectRenderingCapableReply;
102 #define sz_xXF86DRIQueryDirectRenderingCapableReply 32
103
104 typedef struct _XF86DRIOpenConnection {
105 CARD8 reqType; /* always DRIReqCode */
106 CARD8 driReqType; /* always X_DRIOpenConnection */
107 CARD16 length B16;
108 CARD32 screen B32;
109 } xXF86DRIOpenConnectionReq;
110 #define sz_xXF86DRIOpenConnectionReq 8
111
112 typedef struct {
113 BYTE type; /* X_Reply */
114 BOOL pad1;
115 CARD16 sequenceNumber B16;
116 CARD32 length B32;
117 CARD32 hSAREALow B32;
118 CARD32 hSAREAHigh B32;
119 CARD32 busIdStringLength B32;
120 CARD32 pad6 B32;
121 CARD32 pad7 B32;
122 CARD32 pad8 B32;
123 } xXF86DRIOpenConnectionReply;
124 #define sz_xXF86DRIOpenConnectionReply 32
125
126 typedef struct _XF86DRIAuthConnection {
127 CARD8 reqType; /* always DRIReqCode */
128 CARD8 driReqType; /* always X_DRICloseConnection */
129 CARD16 length B16;
130 CARD32 screen B32;
131 CARD32 magic B32;
132 } xXF86DRIAuthConnectionReq;
133 #define sz_xXF86DRIAuthConnectionReq 12
134
135 typedef struct {
136 BYTE type;
137 BOOL pad1;
138 CARD16 sequenceNumber B16;
139 CARD32 length B32;
140 CARD32 authenticated B32;
141 CARD32 pad2 B32;
142 CARD32 pad3 B32;
143 CARD32 pad4 B32;
144 CARD32 pad5 B32;
145 CARD32 pad6 B32;
146 } xXF86DRIAuthConnectionReply;
147 #define zx_xXF86DRIAuthConnectionReply 32
148
149 typedef struct _XF86DRICloseConnection {
150 CARD8 reqType; /* always DRIReqCode */
151 CARD8 driReqType; /* always X_DRICloseConnection */
152 CARD16 length B16;
153 CARD32 screen B32;
154 } xXF86DRICloseConnectionReq;
155 #define sz_xXF86DRICloseConnectionReq 8
156
157 typedef struct _XF86DRIGetClientDriverName {
158 CARD8 reqType; /* always DRIReqCode */
159 CARD8 driReqType; /* always X_DRIGetClientDriverName */
160 CARD16 length B16;
161 CARD32 screen B32;
162 } xXF86DRIGetClientDriverNameReq;
163 #define sz_xXF86DRIGetClientDriverNameReq 8
164
165 typedef struct {
166 BYTE type; /* X_Reply */
167 BOOL pad1;
168 CARD16 sequenceNumber B16;
169 CARD32 length B32;
170 CARD32 ddxDriverMajorVersion B32;
171 CARD32 ddxDriverMinorVersion B32;
172 CARD32 ddxDriverPatchVersion B32;
173 CARD32 clientDriverNameLength B32;
174 CARD32 pad5 B32;
175 CARD32 pad6 B32;
176 } xXF86DRIGetClientDriverNameReply;
177 #define sz_xXF86DRIGetClientDriverNameReply 32
178
179 typedef struct _XF86DRICreateContext {
180 CARD8 reqType; /* always DRIReqCode */
181 CARD8 driReqType; /* always X_DRICreateContext */
182 CARD16 length B16;
183 CARD32 screen B32;
184 CARD32 visual B32;
185 CARD32 context B32;
186 } xXF86DRICreateContextReq;
187 #define sz_xXF86DRICreateContextReq 16
188
189 typedef struct {
190 BYTE type; /* X_Reply */
191 BOOL pad1;
192 CARD16 sequenceNumber B16;
193 CARD32 length B32;
194 CARD32 hHWContext B32;
195 CARD32 pad2 B32;
196 CARD32 pad3 B32;
197 CARD32 pad4 B32;
198 CARD32 pad5 B32;
199 CARD32 pad6 B32;
200 } xXF86DRICreateContextReply;
201 #define sz_xXF86DRICreateContextReply 32
202
203 typedef struct _XF86DRIDestroyContext {
204 CARD8 reqType; /* always DRIReqCode */
205 CARD8 driReqType; /* always X_DRIDestroyContext */
206 CARD16 length B16;
207 CARD32 screen B32;
208 CARD32 context B32;
209 } xXF86DRIDestroyContextReq;
210 #define sz_xXF86DRIDestroyContextReq 12
211
212 typedef struct _XF86DRICreateDrawable {
213 CARD8 reqType; /* always DRIReqCode */
214 CARD8 driReqType; /* always X_DRICreateDrawable */
215 CARD16 length B16;
216 CARD32 screen B32;
217 CARD32 drawable B32;
218 } xXF86DRICreateDrawableReq;
219 #define sz_xXF86DRICreateDrawableReq 12
220
221 typedef struct {
222 BYTE type; /* X_Reply */
223 BOOL pad1;
224 CARD16 sequenceNumber B16;
225 CARD32 length B32;
226 CARD32 hHWDrawable B32;
227 CARD32 pad2 B32;
228 CARD32 pad3 B32;
229 CARD32 pad4 B32;
230 CARD32 pad5 B32;
231 CARD32 pad6 B32;
232 } xXF86DRICreateDrawableReply;
233 #define sz_xXF86DRICreateDrawableReply 32
234
235 typedef struct _XF86DRIDestroyDrawable {
236 CARD8 reqType; /* always DRIReqCode */
237 CARD8 driReqType; /* always X_DRIDestroyDrawable */
238 CARD16 length B16;
239 CARD32 screen B32;
240 CARD32 drawable B32;
241 } xXF86DRIDestroyDrawableReq;
242 #define sz_xXF86DRIDestroyDrawableReq 12
243
244 typedef struct _XF86DRIGetDrawableInfo {
245 CARD8 reqType; /* always DRIReqCode */
246 CARD8 driReqType; /* always X_DRIGetDrawableInfo */
247 CARD16 length B16;
248 CARD32 screen B32;
249 CARD32 drawable B32;
250 } xXF86DRIGetDrawableInfoReq;
251 #define sz_xXF86DRIGetDrawableInfoReq 12
252
253 typedef struct {
254 BYTE type; /* X_Reply */
255 BOOL pad1;
256 CARD16 sequenceNumber B16;
257 CARD32 length B32;
258 CARD32 drawableTableIndex B32;
259 CARD32 drawableTableStamp B32;
260 INT16 drawableX B16;
261 INT16 drawableY B16;
262 INT16 drawableWidth B16;
263 INT16 drawableHeight B16;
264 CARD32 numClipRects B32;
265 INT16 backX B16;
266 INT16 backY B16;
267 CARD32 numBackClipRects B32;
268 } xXF86DRIGetDrawableInfoReply;
269
270 #define sz_xXF86DRIGetDrawableInfoReply 36
271
272
273 typedef struct _XF86DRIGetDeviceInfo {
274 CARD8 reqType; /* always DRIReqCode */
275 CARD8 driReqType; /* always X_DRIGetDeviceInfo */
276 CARD16 length B16;
277 CARD32 screen B32;
278 } xXF86DRIGetDeviceInfoReq;
279 #define sz_xXF86DRIGetDeviceInfoReq 8
280
281 typedef struct {
282 BYTE type; /* X_Reply */
283 BOOL pad1;
284 CARD16 sequenceNumber B16;
285 CARD32 length B32;
286 CARD32 hFrameBufferLow B32;
287 CARD32 hFrameBufferHigh B32;
288 CARD32 framebufferOrigin B32;
289 CARD32 framebufferSize B32;
290 CARD32 framebufferStride B32;
291 CARD32 devPrivateSize B32;
292 } xXF86DRIGetDeviceInfoReply;
293 #define sz_xXF86DRIGetDeviceInfoReply 32
294
295 typedef struct _XF86DRIOpenFullScreen {
296 CARD8 reqType; /* always DRIReqCode */
297 CARD8 driReqType; /* always X_DRIOpenFullScreen */
298 CARD16 length B16;
299 CARD32 screen B32;
300 CARD32 drawable B32;
301 } xXF86DRIOpenFullScreenReq;
302 #define sz_xXF86DRIOpenFullScreenReq 12
303
304 typedef struct {
305 BYTE type;
306 BOOL pad1;
307 CARD16 sequenceNumber B16;
308 CARD32 length B32;
309 CARD32 isFullScreen B32;
310 CARD32 pad2 B32;
311 CARD32 pad3 B32;
312 CARD32 pad4 B32;
313 CARD32 pad5 B32;
314 CARD32 pad6 B32;
315 } xXF86DRIOpenFullScreenReply;
316 #define sz_xXF86DRIOpenFullScreenReply 32
317
318 typedef struct _XF86DRICloseFullScreen {
319 CARD8 reqType; /* always DRIReqCode */
320 CARD8 driReqType; /* always X_DRICloseFullScreen */
321 CARD16 length B16;
322 CARD32 screen B32;
323 CARD32 drawable B32;
324 } xXF86DRICloseFullScreenReq;
325 #define sz_xXF86DRICloseFullScreenReq 12
326
327 typedef struct {
328 BYTE type;
329 BOOL pad1;
330 CARD16 sequenceNumber B16;
331 CARD32 length B32;
332 CARD32 pad2 B32;
333 CARD32 pad3 B32;
334 CARD32 pad4 B32;
335 CARD32 pad5 B32;
336 CARD32 pad6 B32;
337 CARD32 pad7 B32;
338 } xXF86DRICloseFullScreenReply;
339 #define sz_xXF86DRICloseFullScreenReply 32
340
341
342 #endif /* _XF86DRISTR_H_ */