softpipe: comments, re-formatting, etc
[mesa.git] / src / gallium / winsys / drm / radeon / python / 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 {
59 CARD8 reqType; /* always DRIReqCode */
60 CARD8 driReqType; /* always X_DRIQueryVersion */
61 CARD16 length B16;
62 } xXF86DRIQueryVersionReq;
63
64 #define sz_xXF86DRIQueryVersionReq 4
65
66 typedef struct
67 {
68 BYTE type; /* X_Reply */
69 BOOL pad1;
70 CARD16 sequenceNumber B16;
71 CARD32 length B32;
72 CARD16 majorVersion B16; /* major version of DRI protocol */
73 CARD16 minorVersion B16; /* minor version of DRI protocol */
74 CARD32 patchVersion B32; /* patch version of DRI protocol */
75 CARD32 pad3 B32;
76 CARD32 pad4 B32;
77 CARD32 pad5 B32;
78 CARD32 pad6 B32;
79 } xXF86DRIQueryVersionReply;
80
81 #define sz_xXF86DRIQueryVersionReply 32
82
83 typedef struct _XF86DRIQueryDirectRenderingCapable
84 {
85 CARD8 reqType; /* always DRIReqCode */
86 CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */
87 CARD16 length B16;
88 CARD32 screen B32;
89 } xXF86DRIQueryDirectRenderingCapableReq;
90
91 #define sz_xXF86DRIQueryDirectRenderingCapableReq 8
92
93 typedef struct
94 {
95 BYTE type; /* X_Reply */
96 BOOL pad1;
97 CARD16 sequenceNumber B16;
98 CARD32 length B32;
99 BOOL isCapable;
100 BOOL pad2;
101 BOOL pad3;
102 BOOL pad4;
103 CARD32 pad5 B32;
104 CARD32 pad6 B32;
105 CARD32 pad7 B32;
106 CARD32 pad8 B32;
107 CARD32 pad9 B32;
108 } xXF86DRIQueryDirectRenderingCapableReply;
109
110 #define sz_xXF86DRIQueryDirectRenderingCapableReply 32
111
112 typedef struct _XF86DRIOpenConnection
113 {
114 CARD8 reqType; /* always DRIReqCode */
115 CARD8 driReqType; /* always X_DRIOpenConnection */
116 CARD16 length B16;
117 CARD32 screen B32;
118 } xXF86DRIOpenConnectionReq;
119
120 #define sz_xXF86DRIOpenConnectionReq 8
121
122 typedef struct
123 {
124 BYTE type; /* X_Reply */
125 BOOL pad1;
126 CARD16 sequenceNumber B16;
127 CARD32 length B32;
128 CARD32 hSAREALow B32;
129 CARD32 hSAREAHigh B32;
130 CARD32 busIdStringLength B32;
131 CARD32 pad6 B32;
132 CARD32 pad7 B32;
133 CARD32 pad8 B32;
134 } xXF86DRIOpenConnectionReply;
135
136 #define sz_xXF86DRIOpenConnectionReply 32
137
138 typedef struct _XF86DRIAuthConnection
139 {
140 CARD8 reqType; /* always DRIReqCode */
141 CARD8 driReqType; /* always X_DRICloseConnection */
142 CARD16 length B16;
143 CARD32 screen B32;
144 CARD32 magic B32;
145 } xXF86DRIAuthConnectionReq;
146
147 #define sz_xXF86DRIAuthConnectionReq 12
148
149 typedef struct
150 {
151 BYTE type;
152 BOOL pad1;
153 CARD16 sequenceNumber B16;
154 CARD32 length B32;
155 CARD32 authenticated B32;
156 CARD32 pad2 B32;
157 CARD32 pad3 B32;
158 CARD32 pad4 B32;
159 CARD32 pad5 B32;
160 CARD32 pad6 B32;
161 } xXF86DRIAuthConnectionReply;
162
163 #define zx_xXF86DRIAuthConnectionReply 32
164
165 typedef struct _XF86DRICloseConnection
166 {
167 CARD8 reqType; /* always DRIReqCode */
168 CARD8 driReqType; /* always X_DRICloseConnection */
169 CARD16 length B16;
170 CARD32 screen B32;
171 } xXF86DRICloseConnectionReq;
172
173 #define sz_xXF86DRICloseConnectionReq 8
174
175 typedef struct _XF86DRIGetClientDriverName
176 {
177 CARD8 reqType; /* always DRIReqCode */
178 CARD8 driReqType; /* always X_DRIGetClientDriverName */
179 CARD16 length B16;
180 CARD32 screen B32;
181 } xXF86DRIGetClientDriverNameReq;
182
183 #define sz_xXF86DRIGetClientDriverNameReq 8
184
185 typedef struct
186 {
187 BYTE type; /* X_Reply */
188 BOOL pad1;
189 CARD16 sequenceNumber B16;
190 CARD32 length B32;
191 CARD32 ddxDriverMajorVersion B32;
192 CARD32 ddxDriverMinorVersion B32;
193 CARD32 ddxDriverPatchVersion B32;
194 CARD32 clientDriverNameLength B32;
195 CARD32 pad5 B32;
196 CARD32 pad6 B32;
197 } xXF86DRIGetClientDriverNameReply;
198
199 #define sz_xXF86DRIGetClientDriverNameReply 32
200
201 typedef struct _XF86DRICreateContext
202 {
203 CARD8 reqType; /* always DRIReqCode */
204 CARD8 driReqType; /* always X_DRICreateContext */
205 CARD16 length B16;
206 CARD32 screen B32;
207 CARD32 visual B32;
208 CARD32 context B32;
209 } xXF86DRICreateContextReq;
210
211 #define sz_xXF86DRICreateContextReq 16
212
213 typedef struct
214 {
215 BYTE type; /* X_Reply */
216 BOOL pad1;
217 CARD16 sequenceNumber B16;
218 CARD32 length B32;
219 CARD32 hHWContext B32;
220 CARD32 pad2 B32;
221 CARD32 pad3 B32;
222 CARD32 pad4 B32;
223 CARD32 pad5 B32;
224 CARD32 pad6 B32;
225 } xXF86DRICreateContextReply;
226
227 #define sz_xXF86DRICreateContextReply 32
228
229 typedef struct _XF86DRIDestroyContext
230 {
231 CARD8 reqType; /* always DRIReqCode */
232 CARD8 driReqType; /* always X_DRIDestroyContext */
233 CARD16 length B16;
234 CARD32 screen B32;
235 CARD32 context B32;
236 } xXF86DRIDestroyContextReq;
237
238 #define sz_xXF86DRIDestroyContextReq 12
239
240 typedef struct _XF86DRICreateDrawable
241 {
242 CARD8 reqType; /* always DRIReqCode */
243 CARD8 driReqType; /* always X_DRICreateDrawable */
244 CARD16 length B16;
245 CARD32 screen B32;
246 CARD32 drawable B32;
247 } xXF86DRICreateDrawableReq;
248
249 #define sz_xXF86DRICreateDrawableReq 12
250
251 typedef struct
252 {
253 BYTE type; /* X_Reply */
254 BOOL pad1;
255 CARD16 sequenceNumber B16;
256 CARD32 length B32;
257 CARD32 hHWDrawable B32;
258 CARD32 pad2 B32;
259 CARD32 pad3 B32;
260 CARD32 pad4 B32;
261 CARD32 pad5 B32;
262 CARD32 pad6 B32;
263 } xXF86DRICreateDrawableReply;
264
265 #define sz_xXF86DRICreateDrawableReply 32
266
267 typedef struct _XF86DRIDestroyDrawable
268 {
269 CARD8 reqType; /* always DRIReqCode */
270 CARD8 driReqType; /* always X_DRIDestroyDrawable */
271 CARD16 length B16;
272 CARD32 screen B32;
273 CARD32 drawable B32;
274 } xXF86DRIDestroyDrawableReq;
275
276 #define sz_xXF86DRIDestroyDrawableReq 12
277
278 typedef struct _XF86DRIGetDrawableInfo
279 {
280 CARD8 reqType; /* always DRIReqCode */
281 CARD8 driReqType; /* always X_DRIGetDrawableInfo */
282 CARD16 length B16;
283 CARD32 screen B32;
284 CARD32 drawable B32;
285 } xXF86DRIGetDrawableInfoReq;
286
287 #define sz_xXF86DRIGetDrawableInfoReq 12
288
289 typedef struct
290 {
291 BYTE type; /* X_Reply */
292 BOOL pad1;
293 CARD16 sequenceNumber B16;
294 CARD32 length B32;
295 CARD32 drawableTableIndex B32;
296 CARD32 drawableTableStamp B32;
297 INT16 drawableX B16;
298 INT16 drawableY B16;
299 INT16 drawableWidth B16;
300 INT16 drawableHeight B16;
301 CARD32 numClipRects B32;
302 INT16 backX B16;
303 INT16 backY B16;
304 CARD32 numBackClipRects B32;
305 } xXF86DRIGetDrawableInfoReply;
306
307 #define sz_xXF86DRIGetDrawableInfoReply 36
308
309 typedef struct _XF86DRIGetDeviceInfo
310 {
311 CARD8 reqType; /* always DRIReqCode */
312 CARD8 driReqType; /* always X_DRIGetDeviceInfo */
313 CARD16 length B16;
314 CARD32 screen B32;
315 } xXF86DRIGetDeviceInfoReq;
316
317 #define sz_xXF86DRIGetDeviceInfoReq 8
318
319 typedef struct
320 {
321 BYTE type; /* X_Reply */
322 BOOL pad1;
323 CARD16 sequenceNumber B16;
324 CARD32 length B32;
325 CARD32 hFrameBufferLow B32;
326 CARD32 hFrameBufferHigh B32;
327 CARD32 framebufferOrigin B32;
328 CARD32 framebufferSize B32;
329 CARD32 framebufferStride B32;
330 CARD32 devPrivateSize B32;
331 } xXF86DRIGetDeviceInfoReply;
332
333 #define sz_xXF86DRIGetDeviceInfoReply 32
334
335 typedef struct _XF86DRIOpenFullScreen
336 {
337 CARD8 reqType; /* always DRIReqCode */
338 CARD8 driReqType; /* always X_DRIOpenFullScreen */
339 CARD16 length B16;
340 CARD32 screen B32;
341 CARD32 drawable B32;
342 } xXF86DRIOpenFullScreenReq;
343
344 #define sz_xXF86DRIOpenFullScreenReq 12
345
346 typedef struct
347 {
348 BYTE type;
349 BOOL pad1;
350 CARD16 sequenceNumber B16;
351 CARD32 length B32;
352 CARD32 isFullScreen B32;
353 CARD32 pad2 B32;
354 CARD32 pad3 B32;
355 CARD32 pad4 B32;
356 CARD32 pad5 B32;
357 CARD32 pad6 B32;
358 } xXF86DRIOpenFullScreenReply;
359
360 #define sz_xXF86DRIOpenFullScreenReply 32
361
362 typedef struct _XF86DRICloseFullScreen
363 {
364 CARD8 reqType; /* always DRIReqCode */
365 CARD8 driReqType; /* always X_DRICloseFullScreen */
366 CARD16 length B16;
367 CARD32 screen B32;
368 CARD32 drawable B32;
369 } xXF86DRICloseFullScreenReq;
370
371 #define sz_xXF86DRICloseFullScreenReq 12
372
373 typedef struct
374 {
375 BYTE type;
376 BOOL pad1;
377 CARD16 sequenceNumber B16;
378 CARD32 length B32;
379 CARD32 pad2 B32;
380 CARD32 pad3 B32;
381 CARD32 pad4 B32;
382 CARD32 pad5 B32;
383 CARD32 pad6 B32;
384 CARD32 pad7 B32;
385 } xXF86DRICloseFullScreenReply;
386
387 #define sz_xXF86DRICloseFullScreenReply 32
388
389 #endif /* _XF86DRISTR_H_ */