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
{
58 CARD8 reqType
; /* always DRIReqCode */
59 CARD8 driReqType
; /* always X_DRIQueryVersion */
61 } xXF86DRIQueryVersionReq
;
62 #define sz_xXF86DRIQueryVersionReq 4
65 BYTE type
; /* X_Reply */
67 CARD16 sequenceNumber B16
;
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 */
76 } xXF86DRIQueryVersionReply
;
77 #define sz_xXF86DRIQueryVersionReply 32
79 typedef struct _XF86DRIQueryDirectRenderingCapable
{
80 CARD8 reqType
; /* always DRIReqCode */
81 CARD8 driReqType
; /* X_DRIQueryDirectRenderingCapable */
84 } xXF86DRIQueryDirectRenderingCapableReq
;
85 #define sz_xXF86DRIQueryDirectRenderingCapableReq 8
88 BYTE type
; /* X_Reply */
90 CARD16 sequenceNumber B16
;
101 } xXF86DRIQueryDirectRenderingCapableReply
;
102 #define sz_xXF86DRIQueryDirectRenderingCapableReply 32
104 typedef struct _XF86DRIOpenConnection
{
105 CARD8 reqType
; /* always DRIReqCode */
106 CARD8 driReqType
; /* always X_DRIOpenConnection */
109 } xXF86DRIOpenConnectionReq
;
110 #define sz_xXF86DRIOpenConnectionReq 8
113 BYTE type
; /* X_Reply */
115 CARD16 sequenceNumber B16
;
117 CARD32 hSAREALow B32
;
118 CARD32 hSAREAHigh B32
;
119 CARD32 busIdStringLength B32
;
123 } xXF86DRIOpenConnectionReply
;
124 #define sz_xXF86DRIOpenConnectionReply 32
126 typedef struct _XF86DRIAuthConnection
{
127 CARD8 reqType
; /* always DRIReqCode */
128 CARD8 driReqType
; /* always X_DRICloseConnection */
132 } xXF86DRIAuthConnectionReq
;
133 #define sz_xXF86DRIAuthConnectionReq 12
138 CARD16 sequenceNumber B16
;
140 CARD32 authenticated B32
;
146 } xXF86DRIAuthConnectionReply
;
147 #define zx_xXF86DRIAuthConnectionReply 32
149 typedef struct _XF86DRICloseConnection
{
150 CARD8 reqType
; /* always DRIReqCode */
151 CARD8 driReqType
; /* always X_DRICloseConnection */
154 } xXF86DRICloseConnectionReq
;
155 #define sz_xXF86DRICloseConnectionReq 8
157 typedef struct _XF86DRIGetClientDriverName
{
158 CARD8 reqType
; /* always DRIReqCode */
159 CARD8 driReqType
; /* always X_DRIGetClientDriverName */
162 } xXF86DRIGetClientDriverNameReq
;
163 #define sz_xXF86DRIGetClientDriverNameReq 8
166 BYTE type
; /* X_Reply */
168 CARD16 sequenceNumber B16
;
170 CARD32 ddxDriverMajorVersion B32
;
171 CARD32 ddxDriverMinorVersion B32
;
172 CARD32 ddxDriverPatchVersion B32
;
173 CARD32 clientDriverNameLength B32
;
176 } xXF86DRIGetClientDriverNameReply
;
177 #define sz_xXF86DRIGetClientDriverNameReply 32
179 typedef struct _XF86DRICreateContext
{
180 CARD8 reqType
; /* always DRIReqCode */
181 CARD8 driReqType
; /* always X_DRICreateContext */
186 } xXF86DRICreateContextReq
;
187 #define sz_xXF86DRICreateContextReq 16
190 BYTE type
; /* X_Reply */
192 CARD16 sequenceNumber B16
;
194 CARD32 hHWContext B32
;
200 } xXF86DRICreateContextReply
;
201 #define sz_xXF86DRICreateContextReply 32
203 typedef struct _XF86DRIDestroyContext
{
204 CARD8 reqType
; /* always DRIReqCode */
205 CARD8 driReqType
; /* always X_DRIDestroyContext */
209 } xXF86DRIDestroyContextReq
;
210 #define sz_xXF86DRIDestroyContextReq 12
212 typedef struct _XF86DRICreateDrawable
{
213 CARD8 reqType
; /* always DRIReqCode */
214 CARD8 driReqType
; /* always X_DRICreateDrawable */
218 } xXF86DRICreateDrawableReq
;
219 #define sz_xXF86DRICreateDrawableReq 12
222 BYTE type
; /* X_Reply */
224 CARD16 sequenceNumber B16
;
226 CARD32 hHWDrawable B32
;
232 } xXF86DRICreateDrawableReply
;
233 #define sz_xXF86DRICreateDrawableReply 32
235 typedef struct _XF86DRIDestroyDrawable
{
236 CARD8 reqType
; /* always DRIReqCode */
237 CARD8 driReqType
; /* always X_DRIDestroyDrawable */
241 } xXF86DRIDestroyDrawableReq
;
242 #define sz_xXF86DRIDestroyDrawableReq 12
244 typedef struct _XF86DRIGetDrawableInfo
{
245 CARD8 reqType
; /* always DRIReqCode */
246 CARD8 driReqType
; /* always X_DRIGetDrawableInfo */
250 } xXF86DRIGetDrawableInfoReq
;
251 #define sz_xXF86DRIGetDrawableInfoReq 12
254 BYTE type
; /* X_Reply */
256 CARD16 sequenceNumber B16
;
258 CARD32 drawableTableIndex B32
;
259 CARD32 drawableTableStamp B32
;
262 INT16 drawableWidth B16
;
263 INT16 drawableHeight B16
;
264 CARD32 numClipRects B32
;
267 CARD32 numBackClipRects B32
;
268 } xXF86DRIGetDrawableInfoReply
;
270 #define sz_xXF86DRIGetDrawableInfoReply 36
273 typedef struct _XF86DRIGetDeviceInfo
{
274 CARD8 reqType
; /* always DRIReqCode */
275 CARD8 driReqType
; /* always X_DRIGetDeviceInfo */
278 } xXF86DRIGetDeviceInfoReq
;
279 #define sz_xXF86DRIGetDeviceInfoReq 8
282 BYTE type
; /* X_Reply */
284 CARD16 sequenceNumber B16
;
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
295 typedef struct _XF86DRIOpenFullScreen
{
296 CARD8 reqType
; /* always DRIReqCode */
297 CARD8 driReqType
; /* always X_DRIOpenFullScreen */
301 } xXF86DRIOpenFullScreenReq
;
302 #define sz_xXF86DRIOpenFullScreenReq 12
307 CARD16 sequenceNumber B16
;
309 CARD32 isFullScreen B32
;
315 } xXF86DRIOpenFullScreenReply
;
316 #define sz_xXF86DRIOpenFullScreenReply 32
318 typedef struct _XF86DRICloseFullScreen
{
319 CARD8 reqType
; /* always DRIReqCode */
320 CARD8 driReqType
; /* always X_DRICloseFullScreen */
324 } xXF86DRICloseFullScreenReq
;
325 #define sz_xXF86DRICloseFullScreenReq 12
330 CARD16 sequenceNumber B16
;
338 } xXF86DRICloseFullScreenReply
;
339 #define sz_xXF86DRICloseFullScreenReply 32
342 #endif /* _XF86DRISTR_H_ */