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