• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Copyright 2007 Intel Corporation
7 All Rights Reserved.
8 
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sub license, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
16 
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
19 of the Software.
20 
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 
29 **************************************************************************/
30 
31 /*
32  * Authors:
33  *   Kevin E. Martin <martin@valinux.com>
34  *   Jens Owen <jens@tungstengraphics.com>
35  *   Rickard E. (Rik) Fiath <faith@valinux.com>
36  *
37  */
38 
39 #ifndef _VA_DRISTR_H_
40 #define _VA_DRISTR_H_
41 
42 #include "va_dri.h"
43 
44 #define VA_DRINAME "XFree86-DRI"
45 
46 /* The DRI version number.  This was originally set to be the same of the
47  * XFree86 version number.  However, this version is really indepedent of
48  * the XFree86 version.
49  *
50  * Version History:
51  *    4.0.0: Original
52  *    4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02
53  *    4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02
54  */
55 #define VA_DRI_MAJOR_VERSION	4
56 #define VA_DRI_MINOR_VERSION	1
57 #define VA_DRI_PATCH_VERSION	0
58 
59 typedef struct _VA_DRIQueryVersion {
60     CARD8	reqType;		/* always DRIReqCode */
61     CARD8	driReqType;		/* always X_DRIQueryVersion */
62     CARD16	length B16;
63 } xVA_DRIQueryVersionReq;
64 #define sz_xVA_DRIQueryVersionReq	4
65 
66 typedef struct {
67     BYTE	type;			/* X_Reply */
68     BOOL	pad1;
69     CARD16	sequenceNumber B16;
70     CARD32	length B32;
71     CARD16	majorVersion B16;	/* major version of DRI protocol */
72     CARD16	minorVersion B16;	/* minor version of DRI protocol */
73     CARD32	patchVersion B32;       /* patch version of DRI protocol */
74     CARD32	pad3 B32;
75     CARD32	pad4 B32;
76     CARD32	pad5 B32;
77     CARD32	pad6 B32;
78 } xVA_DRIQueryVersionReply;
79 #define sz_xVA_DRIQueryVersionReply	32
80 
81 typedef struct _VA_DRIQueryDirectRenderingCapable {
82     CARD8	reqType;		/* always DRIReqCode */
83     CARD8	driReqType;		/* X_DRIQueryDirectRenderingCapable */
84     CARD16	length B16;
85     CARD32	screen B32;
86 } xVA_DRIQueryDirectRenderingCapableReq;
87 #define sz_xVA_DRIQueryDirectRenderingCapableReq	8
88 
89 typedef struct {
90     BYTE	type;			/* X_Reply */
91     BOOL	pad1;
92     CARD16	sequenceNumber B16;
93     CARD32	length B32;
94     BOOL	isCapable;
95     BOOL	pad2;
96     BOOL	pad3;
97     BOOL	pad4;
98     CARD32	pad5 B32;
99     CARD32	pad6 B32;
100     CARD32	pad7 B32;
101     CARD32	pad8 B32;
102     CARD32	pad9 B32;
103 } xVA_DRIQueryDirectRenderingCapableReply;
104 #define sz_xVA_DRIQueryDirectRenderingCapableReply	32
105 
106 typedef struct _VA_DRIOpenConnection {
107     CARD8	reqType;		/* always DRIReqCode */
108     CARD8	driReqType;		/* always X_DRIOpenConnection */
109     CARD16	length B16;
110     CARD32	screen B32;
111 } xVA_DRIOpenConnectionReq;
112 #define sz_xVA_DRIOpenConnectionReq	8
113 
114 typedef struct {
115     BYTE	type;			/* X_Reply */
116     BOOL	pad1;
117     CARD16	sequenceNumber B16;
118     CARD32	length B32;
119     CARD32	hSAREALow B32;
120     CARD32	hSAREAHigh B32;
121     CARD32	busIdStringLength B32;
122     CARD32	pad6 B32;
123     CARD32	pad7 B32;
124     CARD32	pad8 B32;
125 } xVA_DRIOpenConnectionReply;
126 #define sz_xVA_DRIOpenConnectionReply	32
127 
128 typedef struct _VA_DRIAuthConnection {
129     CARD8	reqType;		/* always DRIReqCode */
130     CARD8	driReqType;		/* always X_DRICloseConnection */
131     CARD16	length B16;
132     CARD32	screen B32;
133     CARD32      magic B32;
134 } xVA_DRIAuthConnectionReq;
135 #define sz_xVA_DRIAuthConnectionReq	12
136 
137 typedef struct {
138     BYTE        type;
139     BOOL        pad1;
140     CARD16      sequenceNumber B16;
141     CARD32      length B32;
142     CARD32      authenticated B32;
143     CARD32      pad2 B32;
144     CARD32      pad3 B32;
145     CARD32      pad4 B32;
146     CARD32      pad5 B32;
147     CARD32      pad6 B32;
148 } xVA_DRIAuthConnectionReply;
149 #define zx_xVA_DRIAuthConnectionReply  32
150 
151 typedef struct _VA_DRICloseConnection {
152     CARD8	reqType;		/* always DRIReqCode */
153     CARD8	driReqType;		/* always X_DRICloseConnection */
154     CARD16	length B16;
155     CARD32	screen B32;
156 } xVA_DRICloseConnectionReq;
157 #define sz_xVA_DRICloseConnectionReq	8
158 
159 typedef struct _VA_DRIGetClientDriverName {
160     CARD8	reqType;		/* always DRIReqCode */
161     CARD8	driReqType;		/* always X_DRIGetClientDriverName */
162     CARD16	length B16;
163     CARD32	screen B32;
164 } xVA_DRIGetClientDriverNameReq;
165 #define sz_xVA_DRIGetClientDriverNameReq	8
166 
167 typedef struct {
168     BYTE	type;			/* X_Reply */
169     BOOL	pad1;
170     CARD16	sequenceNumber B16;
171     CARD32	length B32;
172     CARD32	ddxDriverMajorVersion B32;
173     CARD32	ddxDriverMinorVersion B32;
174     CARD32	ddxDriverPatchVersion B32;
175     CARD32	clientDriverNameLength B32;
176     CARD32	pad5 B32;
177     CARD32	pad6 B32;
178 } xVA_DRIGetClientDriverNameReply;
179 #define sz_xVA_DRIGetClientDriverNameReply	32
180 
181 typedef struct _VA_DRICreateContext {
182     CARD8	reqType;		/* always DRIReqCode */
183     CARD8	driReqType;		/* always X_DRICreateContext */
184     CARD16	length B16;
185     CARD32	screen B32;
186     CARD32	visual B32;
187     CARD32	context B32;
188 } xVA_DRICreateContextReq;
189 #define sz_xVA_DRICreateContextReq	16
190 
191 typedef struct {
192     BYTE	type;			/* X_Reply */
193     BOOL	pad1;
194     CARD16	sequenceNumber B16;
195     CARD32	length B32;
196     CARD32	hHWContext B32;
197     CARD32	pad2 B32;
198     CARD32	pad3 B32;
199     CARD32	pad4 B32;
200     CARD32	pad5 B32;
201     CARD32	pad6 B32;
202 } xVA_DRICreateContextReply;
203 #define sz_xVA_DRICreateContextReply	32
204 
205 typedef struct _VA_DRIDestroyContext {
206     CARD8	reqType;		/* always DRIReqCode */
207     CARD8	driReqType;		/* always X_DRIDestroyContext */
208     CARD16	length B16;
209     CARD32	screen B32;
210     CARD32	context B32;
211 } xVA_DRIDestroyContextReq;
212 #define sz_xVA_DRIDestroyContextReq	12
213 
214 typedef struct _VA_DRICreateDrawable {
215     CARD8	reqType;		/* always DRIReqCode */
216     CARD8	driReqType;		/* always X_DRICreateDrawable */
217     CARD16	length B16;
218     CARD32	screen B32;
219     CARD32	drawable B32;
220 } xVA_DRICreateDrawableReq;
221 #define sz_xVA_DRICreateDrawableReq	12
222 
223 typedef struct {
224     BYTE	type;			/* X_Reply */
225     BOOL	pad1;
226     CARD16	sequenceNumber B16;
227     CARD32	length B32;
228     CARD32	hHWDrawable B32;
229     CARD32	pad2 B32;
230     CARD32	pad3 B32;
231     CARD32	pad4 B32;
232     CARD32	pad5 B32;
233     CARD32	pad6 B32;
234 } xVA_DRICreateDrawableReply;
235 #define sz_xVA_DRICreateDrawableReply	32
236 
237 typedef struct _VA_DRIDestroyDrawable {
238     CARD8	reqType;		/* always DRIReqCode */
239     CARD8	driReqType;		/* always X_DRIDestroyDrawable */
240     CARD16	length B16;
241     CARD32	screen B32;
242     CARD32	drawable B32;
243 } xVA_DRIDestroyDrawableReq;
244 #define sz_xVA_DRIDestroyDrawableReq	12
245 
246 typedef struct _VA_DRIGetDrawableInfo {
247     CARD8	reqType;		/* always DRIReqCode */
248     CARD8	driReqType;		/* always X_DRIGetDrawableInfo */
249     CARD16	length B16;
250     CARD32	screen B32;
251     CARD32	drawable B32;
252 } xVA_DRIGetDrawableInfoReq;
253 #define sz_xVA_DRIGetDrawableInfoReq	12
254 
255 typedef struct {
256     BYTE	type;			/* X_Reply */
257     BOOL	pad1;
258     CARD16	sequenceNumber B16;
259     CARD32	length B32;
260     CARD32	drawableTableIndex B32;
261     CARD32	drawableTableStamp B32;
262     INT16	drawableX B16;
263     INT16	drawableY B16;
264     INT16	drawableWidth B16;
265     INT16	drawableHeight B16;
266     CARD32	numClipRects B32;
267     INT16       backX B16;
268     INT16       backY B16;
269     CARD32      numBackClipRects B32;
270 } xVA_DRIGetDrawableInfoReply;
271 
272 #define sz_xVA_DRIGetDrawableInfoReply	36
273 
274 
275 typedef struct _VA_DRIGetDeviceInfo {
276     CARD8	reqType;		/* always DRIReqCode */
277     CARD8	driReqType;		/* always X_DRIGetDeviceInfo */
278     CARD16	length B16;
279     CARD32	screen B32;
280 } xVA_DRIGetDeviceInfoReq;
281 #define sz_xVA_DRIGetDeviceInfoReq	8
282 
283 typedef struct {
284     BYTE	type;			/* X_Reply */
285     BOOL	pad1;
286     CARD16	sequenceNumber B16;
287     CARD32	length B32;
288     CARD32	hFrameBufferLow B32;
289     CARD32	hFrameBufferHigh B32;
290     CARD32	framebufferOrigin B32;
291     CARD32	framebufferSize B32;
292     CARD32	framebufferStride B32;
293     CARD32	devPrivateSize B32;
294 } xVA_DRIGetDeviceInfoReply;
295 #define sz_xVA_DRIGetDeviceInfoReply	32
296 
297 typedef struct _VA_DRIOpenFullScreen {
298     CARD8       reqType;	/* always DRIReqCode */
299     CARD8       driReqType;	/* always X_DRIOpenFullScreen */
300     CARD16      length B16;
301     CARD32      screen B32;
302     CARD32      drawable B32;
303 } xVA_DRIOpenFullScreenReq;
304 #define sz_xVA_DRIOpenFullScreenReq    12
305 
306 typedef struct {
307     BYTE        type;
308     BOOL        pad1;
309     CARD16      sequenceNumber B16;
310     CARD32      length B32;
311     CARD32      isFullScreen B32;
312     CARD32      pad2 B32;
313     CARD32      pad3 B32;
314     CARD32      pad4 B32;
315     CARD32      pad5 B32;
316     CARD32      pad6 B32;
317 } xVA_DRIOpenFullScreenReply;
318 #define sz_xVA_DRIOpenFullScreenReply  32
319 
320 typedef struct _VA_DRICloseFullScreen {
321     CARD8       reqType;	/* always DRIReqCode */
322     CARD8       driReqType;	/* always X_DRICloseFullScreen */
323     CARD16      length B16;
324     CARD32      screen B32;
325     CARD32      drawable B32;
326 } xVA_DRICloseFullScreenReq;
327 #define sz_xVA_DRICloseFullScreenReq   12
328 
329 typedef struct {
330     BYTE        type;
331     BOOL        pad1;
332     CARD16      sequenceNumber B16;
333     CARD32      length B32;
334     CARD32      pad2 B32;
335     CARD32      pad3 B32;
336     CARD32      pad4 B32;
337     CARD32      pad5 B32;
338     CARD32      pad6 B32;
339     CARD32      pad7 B32;
340 } xVA_DRICloseFullScreenReply;
341 #define sz_xVA_DRICloseFullScreenReply  32
342 
343 
344 #endif /* _VA_DRISTR_H_ */
345