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