1 /* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.10 2002/10/30 12:51:25 alanh Exp $ */
2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5 Copyright 2000 VA Linux Systems, Inc.
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:
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial portions
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.
28 **************************************************************************/
32 * Kevin E. Martin <martin@valinux.com>
33 * Jens Owen <jens@tungstengraphics.com>
34 * Rickard E. (Rik) Fiath <faith@valinux.com>
38 #ifndef _XF86DRISTR_H_
39 #define _XF86DRISTR_H_
43 #define XF86DRINAME "XFree86-DRI"
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.
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
54 #define XF86DRI_MAJOR_VERSION 4
55 #define XF86DRI_MINOR_VERSION 1
56 #define XF86DRI_PATCH_VERSION 0
58 typedef struct _XF86DRIQueryVersion
{
59 CARD8 reqType
; /* always DRIReqCode */
60 CARD8 driReqType
; /* always X_DRIQueryVersion */
62 } xXF86DRIQueryVersionReq
;
63 #define sz_xXF86DRIQueryVersionReq 4
66 BYTE type
; /* X_Reply */
68 CARD16 sequenceNumber B16
;
70 CARD16 majorVersion B16
; /* major version of DRI protocol */
71 CARD16 minorVersion B16
; /* minor version of DRI protocol */
72 CARD32 patchVersion B32
; /* patch version of DRI protocol */
77 } xXF86DRIQueryVersionReply
;
78 #define sz_xXF86DRIQueryVersionReply 32
80 typedef struct _XF86DRIQueryDirectRenderingCapable
{
81 CARD8 reqType
; /* always DRIReqCode */
82 CARD8 driReqType
; /* X_DRIQueryDirectRenderingCapable */
85 } xXF86DRIQueryDirectRenderingCapableReq
;
86 #define sz_xXF86DRIQueryDirectRenderingCapableReq 8
89 BYTE type
; /* X_Reply */
91 CARD16 sequenceNumber B16
;
102 } xXF86DRIQueryDirectRenderingCapableReply
;
103 #define sz_xXF86DRIQueryDirectRenderingCapableReply 32
105 typedef struct _XF86DRIOpenConnection
{
106 CARD8 reqType
; /* always DRIReqCode */
107 CARD8 driReqType
; /* always X_DRIOpenConnection */
110 } xXF86DRIOpenConnectionReq
;
111 #define sz_xXF86DRIOpenConnectionReq 8
114 BYTE type
; /* X_Reply */
116 CARD16 sequenceNumber B16
;
118 CARD32 hSAREALow B32
;
119 CARD32 hSAREAHigh B32
;
120 CARD32 busIdStringLength B32
;
124 } xXF86DRIOpenConnectionReply
;
125 #define sz_xXF86DRIOpenConnectionReply 32
127 typedef struct _XF86DRIAuthConnection
{
128 CARD8 reqType
; /* always DRIReqCode */
129 CARD8 driReqType
; /* always X_DRICloseConnection */
133 } xXF86DRIAuthConnectionReq
;
134 #define sz_xXF86DRIAuthConnectionReq 12
139 CARD16 sequenceNumber B16
;
141 CARD32 authenticated B32
;
147 } xXF86DRIAuthConnectionReply
;
148 #define zx_xXF86DRIAuthConnectionReply 32
150 typedef struct _XF86DRICloseConnection
{
151 CARD8 reqType
; /* always DRIReqCode */
152 CARD8 driReqType
; /* always X_DRICloseConnection */
155 } xXF86DRICloseConnectionReq
;
156 #define sz_xXF86DRICloseConnectionReq 8
158 typedef struct _XF86DRIGetClientDriverName
{
159 CARD8 reqType
; /* always DRIReqCode */
160 CARD8 driReqType
; /* always X_DRIGetClientDriverName */
163 } xXF86DRIGetClientDriverNameReq
;
164 #define sz_xXF86DRIGetClientDriverNameReq 8
167 BYTE type
; /* X_Reply */
169 CARD16 sequenceNumber B16
;
171 CARD32 ddxDriverMajorVersion B32
;
172 CARD32 ddxDriverMinorVersion B32
;
173 CARD32 ddxDriverPatchVersion B32
;
174 CARD32 clientDriverNameLength B32
;
177 } xXF86DRIGetClientDriverNameReply
;
178 #define sz_xXF86DRIGetClientDriverNameReply 32
180 typedef struct _XF86DRICreateContext
{
181 CARD8 reqType
; /* always DRIReqCode */
182 CARD8 driReqType
; /* always X_DRICreateContext */
187 } xXF86DRICreateContextReq
;
188 #define sz_xXF86DRICreateContextReq 16
191 BYTE type
; /* X_Reply */
193 CARD16 sequenceNumber B16
;
195 CARD32 hHWContext B32
;
201 } xXF86DRICreateContextReply
;
202 #define sz_xXF86DRICreateContextReply 32
204 typedef struct _XF86DRIDestroyContext
{
205 CARD8 reqType
; /* always DRIReqCode */
206 CARD8 driReqType
; /* always X_DRIDestroyContext */
210 } xXF86DRIDestroyContextReq
;
211 #define sz_xXF86DRIDestroyContextReq 12
213 typedef struct _XF86DRICreateDrawable
{
214 CARD8 reqType
; /* always DRIReqCode */
215 CARD8 driReqType
; /* always X_DRICreateDrawable */
219 } xXF86DRICreateDrawableReq
;
220 #define sz_xXF86DRICreateDrawableReq 12
223 BYTE type
; /* X_Reply */
225 CARD16 sequenceNumber B16
;
227 CARD32 hHWDrawable B32
;
233 } xXF86DRICreateDrawableReply
;
234 #define sz_xXF86DRICreateDrawableReply 32
236 typedef struct _XF86DRIDestroyDrawable
{
237 CARD8 reqType
; /* always DRIReqCode */
238 CARD8 driReqType
; /* always X_DRIDestroyDrawable */
242 } xXF86DRIDestroyDrawableReq
;
243 #define sz_xXF86DRIDestroyDrawableReq 12
245 typedef struct _XF86DRIGetDrawableInfo
{
246 CARD8 reqType
; /* always DRIReqCode */
247 CARD8 driReqType
; /* always X_DRIGetDrawableInfo */
251 } xXF86DRIGetDrawableInfoReq
;
252 #define sz_xXF86DRIGetDrawableInfoReq 12
255 BYTE type
; /* X_Reply */
257 CARD16 sequenceNumber B16
;
259 CARD32 drawableTableIndex B32
;
260 CARD32 drawableTableStamp B32
;
263 INT16 drawableWidth B16
;
264 INT16 drawableHeight B16
;
265 CARD32 numClipRects B32
;
268 CARD32 numBackClipRects B32
;
269 } xXF86DRIGetDrawableInfoReply
;
271 #define sz_xXF86DRIGetDrawableInfoReply 36
274 typedef struct _XF86DRIGetDeviceInfo
{
275 CARD8 reqType
; /* always DRIReqCode */
276 CARD8 driReqType
; /* always X_DRIGetDeviceInfo */
279 } xXF86DRIGetDeviceInfoReq
;
280 #define sz_xXF86DRIGetDeviceInfoReq 8
283 BYTE type
; /* X_Reply */
285 CARD16 sequenceNumber B16
;
287 CARD32 hFrameBufferLow B32
;
288 CARD32 hFrameBufferHigh B32
;
289 CARD32 framebufferOrigin B32
;
290 CARD32 framebufferSize B32
;
291 CARD32 framebufferStride B32
;
292 CARD32 devPrivateSize B32
;
293 } xXF86DRIGetDeviceInfoReply
;
294 #define sz_xXF86DRIGetDeviceInfoReply 32
296 typedef struct _XF86DRIOpenFullScreen
{
297 CARD8 reqType
; /* always DRIReqCode */
298 CARD8 driReqType
; /* always X_DRIOpenFullScreen */
302 } xXF86DRIOpenFullScreenReq
;
303 #define sz_xXF86DRIOpenFullScreenReq 12
308 CARD16 sequenceNumber B16
;
310 CARD32 isFullScreen B32
;
316 } xXF86DRIOpenFullScreenReply
;
317 #define sz_xXF86DRIOpenFullScreenReply 32
319 typedef struct _XF86DRICloseFullScreen
{
320 CARD8 reqType
; /* always DRIReqCode */
321 CARD8 driReqType
; /* always X_DRICloseFullScreen */
325 } xXF86DRICloseFullScreenReq
;
326 #define sz_xXF86DRICloseFullScreenReq 12
331 CARD16 sequenceNumber B16
;
339 } xXF86DRICloseFullScreenReply
;
340 #define sz_xXF86DRICloseFullScreenReply 32
343 #endif /* _XF86DRISTR_H_ */