1 /**************************************************************************
3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
4 Copyright 2000 VA Linux Systems, Inc.
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:
15 The above copyright notice and this permission notice (including the
16 next paragraph) shall be included in all copies or substantial portions
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.
27 **************************************************************************/
31 * Kevin E. Martin <martin@valinux.com>
32 * Jens Owen <jens@tungstengraphics.com>
33 * Rickard E. (Rik) Fiath <faith@valinux.com>
37 #ifndef _XF86DRISTR_H_
38 #define _XF86DRISTR_H_
42 #define XF86DRINAME "XFree86-DRI"
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.
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
53 #define XF86DRI_MAJOR_VERSION 4
54 #define XF86DRI_MINOR_VERSION 1
55 #define XF86DRI_PATCH_VERSION 0
57 typedef struct _XF86DRIQueryVersion
59 CARD8 reqType
; /* always DRIReqCode */
60 CARD8 driReqType
; /* always X_DRIQueryVersion */
62 } xXF86DRIQueryVersionReq
;
64 #define sz_xXF86DRIQueryVersionReq 4
68 BYTE type
; /* X_Reply */
70 CARD16 sequenceNumber B16
;
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 */
79 } xXF86DRIQueryVersionReply
;
81 #define sz_xXF86DRIQueryVersionReply 32
83 typedef struct _XF86DRIQueryDirectRenderingCapable
85 CARD8 reqType
; /* always DRIReqCode */
86 CARD8 driReqType
; /* X_DRIQueryDirectRenderingCapable */
89 } xXF86DRIQueryDirectRenderingCapableReq
;
91 #define sz_xXF86DRIQueryDirectRenderingCapableReq 8
95 BYTE type
; /* X_Reply */
97 CARD16 sequenceNumber B16
;
108 } xXF86DRIQueryDirectRenderingCapableReply
;
110 #define sz_xXF86DRIQueryDirectRenderingCapableReply 32
112 typedef struct _XF86DRIOpenConnection
114 CARD8 reqType
; /* always DRIReqCode */
115 CARD8 driReqType
; /* always X_DRIOpenConnection */
118 } xXF86DRIOpenConnectionReq
;
120 #define sz_xXF86DRIOpenConnectionReq 8
124 BYTE type
; /* X_Reply */
126 CARD16 sequenceNumber B16
;
128 CARD32 hSAREALow B32
;
129 CARD32 hSAREAHigh B32
;
130 CARD32 busIdStringLength B32
;
134 } xXF86DRIOpenConnectionReply
;
136 #define sz_xXF86DRIOpenConnectionReply 32
138 typedef struct _XF86DRIAuthConnection
140 CARD8 reqType
; /* always DRIReqCode */
141 CARD8 driReqType
; /* always X_DRICloseConnection */
145 } xXF86DRIAuthConnectionReq
;
147 #define sz_xXF86DRIAuthConnectionReq 12
153 CARD16 sequenceNumber B16
;
155 CARD32 authenticated B32
;
161 } xXF86DRIAuthConnectionReply
;
163 #define zx_xXF86DRIAuthConnectionReply 32
165 typedef struct _XF86DRICloseConnection
167 CARD8 reqType
; /* always DRIReqCode */
168 CARD8 driReqType
; /* always X_DRICloseConnection */
171 } xXF86DRICloseConnectionReq
;
173 #define sz_xXF86DRICloseConnectionReq 8
175 typedef struct _XF86DRIGetClientDriverName
177 CARD8 reqType
; /* always DRIReqCode */
178 CARD8 driReqType
; /* always X_DRIGetClientDriverName */
181 } xXF86DRIGetClientDriverNameReq
;
183 #define sz_xXF86DRIGetClientDriverNameReq 8
187 BYTE type
; /* X_Reply */
189 CARD16 sequenceNumber B16
;
191 CARD32 ddxDriverMajorVersion B32
;
192 CARD32 ddxDriverMinorVersion B32
;
193 CARD32 ddxDriverPatchVersion B32
;
194 CARD32 clientDriverNameLength B32
;
197 } xXF86DRIGetClientDriverNameReply
;
199 #define sz_xXF86DRIGetClientDriverNameReply 32
201 typedef struct _XF86DRICreateContext
203 CARD8 reqType
; /* always DRIReqCode */
204 CARD8 driReqType
; /* always X_DRICreateContext */
209 } xXF86DRICreateContextReq
;
211 #define sz_xXF86DRICreateContextReq 16
215 BYTE type
; /* X_Reply */
217 CARD16 sequenceNumber B16
;
219 CARD32 hHWContext B32
;
225 } xXF86DRICreateContextReply
;
227 #define sz_xXF86DRICreateContextReply 32
229 typedef struct _XF86DRIDestroyContext
231 CARD8 reqType
; /* always DRIReqCode */
232 CARD8 driReqType
; /* always X_DRIDestroyContext */
236 } xXF86DRIDestroyContextReq
;
238 #define sz_xXF86DRIDestroyContextReq 12
240 typedef struct _XF86DRICreateDrawable
242 CARD8 reqType
; /* always DRIReqCode */
243 CARD8 driReqType
; /* always X_DRICreateDrawable */
247 } xXF86DRICreateDrawableReq
;
249 #define sz_xXF86DRICreateDrawableReq 12
253 BYTE type
; /* X_Reply */
255 CARD16 sequenceNumber B16
;
257 CARD32 hHWDrawable B32
;
263 } xXF86DRICreateDrawableReply
;
265 #define sz_xXF86DRICreateDrawableReply 32
267 typedef struct _XF86DRIDestroyDrawable
269 CARD8 reqType
; /* always DRIReqCode */
270 CARD8 driReqType
; /* always X_DRIDestroyDrawable */
274 } xXF86DRIDestroyDrawableReq
;
276 #define sz_xXF86DRIDestroyDrawableReq 12
278 typedef struct _XF86DRIGetDrawableInfo
280 CARD8 reqType
; /* always DRIReqCode */
281 CARD8 driReqType
; /* always X_DRIGetDrawableInfo */
285 } xXF86DRIGetDrawableInfoReq
;
287 #define sz_xXF86DRIGetDrawableInfoReq 12
291 BYTE type
; /* X_Reply */
293 CARD16 sequenceNumber B16
;
295 CARD32 drawableTableIndex B32
;
296 CARD32 drawableTableStamp B32
;
299 INT16 drawableWidth B16
;
300 INT16 drawableHeight B16
;
301 CARD32 numClipRects B32
;
304 CARD32 numBackClipRects B32
;
305 } xXF86DRIGetDrawableInfoReply
;
307 #define sz_xXF86DRIGetDrawableInfoReply 36
309 typedef struct _XF86DRIGetDeviceInfo
311 CARD8 reqType
; /* always DRIReqCode */
312 CARD8 driReqType
; /* always X_DRIGetDeviceInfo */
315 } xXF86DRIGetDeviceInfoReq
;
317 #define sz_xXF86DRIGetDeviceInfoReq 8
321 BYTE type
; /* X_Reply */
323 CARD16 sequenceNumber B16
;
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
;
333 #define sz_xXF86DRIGetDeviceInfoReply 32
335 typedef struct _XF86DRIOpenFullScreen
337 CARD8 reqType
; /* always DRIReqCode */
338 CARD8 driReqType
; /* always X_DRIOpenFullScreen */
342 } xXF86DRIOpenFullScreenReq
;
344 #define sz_xXF86DRIOpenFullScreenReq 12
350 CARD16 sequenceNumber B16
;
352 CARD32 isFullScreen B32
;
358 } xXF86DRIOpenFullScreenReply
;
360 #define sz_xXF86DRIOpenFullScreenReply 32
362 typedef struct _XF86DRICloseFullScreen
364 CARD8 reqType
; /* always DRIReqCode */
365 CARD8 driReqType
; /* always X_DRICloseFullScreen */
369 } xXF86DRICloseFullScreenReq
;
371 #define sz_xXF86DRICloseFullScreenReq 12
377 CARD16 sequenceNumber B16
;
385 } xXF86DRICloseFullScreenReply
;
387 #define sz_xXF86DRICloseFullScreenReply 32
389 #endif /* _XF86DRISTR_H_ */