117ca54c3Smrg/**************************************************************************
217ca54c3Smrg
317ca54c3SmrgCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
417ca54c3SmrgCopyright 2000 VA Linux Systems, Inc.
517ca54c3SmrgAll Rights Reserved.
617ca54c3Smrg
717ca54c3SmrgPermission is hereby granted, free of charge, to any person obtaining a
817ca54c3Smrgcopy of this software and associated documentation files (the
917ca54c3Smrg"Software"), to deal in the Software without restriction, including
1017ca54c3Smrgwithout limitation the rights to use, copy, modify, merge, publish,
1117ca54c3Smrgdistribute, sub license, and/or sell copies of the Software, and to
1217ca54c3Smrgpermit persons to whom the Software is furnished to do so, subject to
1317ca54c3Smrgthe following conditions:
1417ca54c3Smrg
1517ca54c3SmrgThe above copyright notice and this permission notice (including the
1617ca54c3Smrgnext paragraph) shall be included in all copies or substantial portions
1717ca54c3Smrgof the Software.
1817ca54c3Smrg
1917ca54c3SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2017ca54c3SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2117ca54c3SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2217ca54c3SmrgIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
2317ca54c3SmrgANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
2417ca54c3SmrgTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2517ca54c3SmrgSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2617ca54c3Smrg
2717ca54c3Smrg**************************************************************************/
2817ca54c3Smrg
2917ca54c3Smrg/*
3017ca54c3Smrg * Authors:
3117ca54c3Smrg *   Kevin E. Martin <martin@valinux.com>
3217ca54c3Smrg *   Jens Owen <jens@tungstengraphics.com>
3317ca54c3Smrg *   Rickard E. (Rik) Faith <faith@valinux.com>
3417ca54c3Smrg *
3517ca54c3Smrg */
3617ca54c3Smrg
3717ca54c3Smrg#ifndef _XF86DRISTR_H_
3817ca54c3Smrg#define _XF86DRISTR_H_
3917ca54c3Smrg
4017ca54c3Smrg#include "xf86dri.h"
4117ca54c3Smrg
4217ca54c3Smrg#define XF86DRINAME "XFree86-DRI"
4317ca54c3Smrg
4417ca54c3Smrg/* The DRI version number.  This was originally set to be the same of the
45ea1d6981Smrg * XFree86 version number.  However, this version is really independent of
4617ca54c3Smrg * the XFree86 version.
4717ca54c3Smrg *
4817ca54c3Smrg * Version History:
4917ca54c3Smrg *    4.0.0: Original
5017ca54c3Smrg *    4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02
5117ca54c3Smrg *    4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02
5217ca54c3Smrg */
5317ca54c3Smrg#define XF86DRI_MAJOR_VERSION	4
5417ca54c3Smrg#define XF86DRI_MINOR_VERSION	1
5517ca54c3Smrg#define XF86DRI_PATCH_VERSION	0
5617ca54c3Smrg
5717ca54c3Smrgtypedef struct _XF86DRIQueryVersion {
5817ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
5917ca54c3Smrg    CARD8	driReqType;		/* always X_DRIQueryVersion */
60ea1d6981Smrg    CARD16	length;
6117ca54c3Smrg} xXF86DRIQueryVersionReq;
6217ca54c3Smrg#define sz_xXF86DRIQueryVersionReq	4
6317ca54c3Smrg
6417ca54c3Smrgtypedef struct {
6517ca54c3Smrg    BYTE	type;			/* X_Reply */
6617ca54c3Smrg    BOOL	pad1;
67ea1d6981Smrg    CARD16	sequenceNumber;
68ea1d6981Smrg    CARD32	length;
69ea1d6981Smrg    CARD16	majorVersion;		/* major version of DRI protocol */
70ea1d6981Smrg    CARD16	minorVersion;		/* minor version of DRI protocol */
71ea1d6981Smrg    CARD32	patchVersion;		/* patch version of DRI protocol */
72ea1d6981Smrg    CARD32	pad3;
73ea1d6981Smrg    CARD32	pad4;
74ea1d6981Smrg    CARD32	pad5;
75ea1d6981Smrg    CARD32	pad6;
7617ca54c3Smrg} xXF86DRIQueryVersionReply;
7717ca54c3Smrg#define sz_xXF86DRIQueryVersionReply	32
7817ca54c3Smrg
7917ca54c3Smrgtypedef struct _XF86DRIQueryDirectRenderingCapable {
8017ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
8117ca54c3Smrg    CARD8	driReqType;		/* X_DRIQueryDirectRenderingCapable */
82ea1d6981Smrg    CARD16	length;
83ea1d6981Smrg    CARD32	screen;
8417ca54c3Smrg} xXF86DRIQueryDirectRenderingCapableReq;
8517ca54c3Smrg#define sz_xXF86DRIQueryDirectRenderingCapableReq	8
8617ca54c3Smrg
8717ca54c3Smrgtypedef struct {
8817ca54c3Smrg    BYTE	type;			/* X_Reply */
8917ca54c3Smrg    BOOL	pad1;
90ea1d6981Smrg    CARD16	sequenceNumber;
91ea1d6981Smrg    CARD32	length;
9217ca54c3Smrg    BOOL	isCapable;
9317ca54c3Smrg    BOOL	pad2;
9417ca54c3Smrg    BOOL	pad3;
9517ca54c3Smrg    BOOL	pad4;
96ea1d6981Smrg    CARD32	pad5;
97ea1d6981Smrg    CARD32	pad6;
98ea1d6981Smrg    CARD32	pad7;
99ea1d6981Smrg    CARD32	pad8;
100ea1d6981Smrg    CARD32	pad9;
10117ca54c3Smrg} xXF86DRIQueryDirectRenderingCapableReply;
10217ca54c3Smrg#define sz_xXF86DRIQueryDirectRenderingCapableReply	32
10317ca54c3Smrg
10417ca54c3Smrgtypedef struct _XF86DRIOpenConnection {
10517ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
10617ca54c3Smrg    CARD8	driReqType;		/* always X_DRIOpenConnection */
107ea1d6981Smrg    CARD16	length;
108ea1d6981Smrg    CARD32	screen;
10917ca54c3Smrg} xXF86DRIOpenConnectionReq;
11017ca54c3Smrg#define sz_xXF86DRIOpenConnectionReq	8
11117ca54c3Smrg
11217ca54c3Smrgtypedef struct {
11317ca54c3Smrg    BYTE	type;			/* X_Reply */
11417ca54c3Smrg    BOOL	pad1;
115ea1d6981Smrg    CARD16	sequenceNumber;
116ea1d6981Smrg    CARD32	length;
117ea1d6981Smrg    CARD32	hSAREALow;
118ea1d6981Smrg    CARD32	hSAREAHigh;
119ea1d6981Smrg    CARD32	busIdStringLength;
120ea1d6981Smrg    CARD32	pad6;
121ea1d6981Smrg    CARD32	pad7;
122ea1d6981Smrg    CARD32	pad8;
12317ca54c3Smrg} xXF86DRIOpenConnectionReply;
12417ca54c3Smrg#define sz_xXF86DRIOpenConnectionReply	32
12517ca54c3Smrg
12617ca54c3Smrgtypedef struct _XF86DRIAuthConnection {
12717ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
12817ca54c3Smrg    CARD8	driReqType;		/* always X_DRICloseConnection */
129ea1d6981Smrg    CARD16	length;
130ea1d6981Smrg    CARD32	screen;
131ea1d6981Smrg    CARD32	magic;
13217ca54c3Smrg} xXF86DRIAuthConnectionReq;
13317ca54c3Smrg#define sz_xXF86DRIAuthConnectionReq	12
13417ca54c3Smrg
13517ca54c3Smrgtypedef struct {
13617ca54c3Smrg    BYTE        type;
13717ca54c3Smrg    BOOL        pad1;
138ea1d6981Smrg    CARD16      sequenceNumber;
139ea1d6981Smrg    CARD32      length;
140ea1d6981Smrg    CARD32      authenticated;
141ea1d6981Smrg    CARD32      pad2;
142ea1d6981Smrg    CARD32      pad3;
143ea1d6981Smrg    CARD32      pad4;
144ea1d6981Smrg    CARD32      pad5;
145ea1d6981Smrg    CARD32      pad6;
14617ca54c3Smrg} xXF86DRIAuthConnectionReply;
14717ca54c3Smrg#define zx_xXF86DRIAuthConnectionReply  32
14817ca54c3Smrg
14917ca54c3Smrgtypedef struct _XF86DRICloseConnection {
15017ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
15117ca54c3Smrg    CARD8	driReqType;		/* always X_DRICloseConnection */
152ea1d6981Smrg    CARD16	length;
153ea1d6981Smrg    CARD32	screen;
15417ca54c3Smrg} xXF86DRICloseConnectionReq;
15517ca54c3Smrg#define sz_xXF86DRICloseConnectionReq	8
15617ca54c3Smrg
15717ca54c3Smrgtypedef struct _XF86DRIGetClientDriverName {
15817ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
15917ca54c3Smrg    CARD8	driReqType;		/* always X_DRIGetClientDriverName */
160ea1d6981Smrg    CARD16	length;
161ea1d6981Smrg    CARD32	screen;
16217ca54c3Smrg} xXF86DRIGetClientDriverNameReq;
16317ca54c3Smrg#define sz_xXF86DRIGetClientDriverNameReq	8
16417ca54c3Smrg
16517ca54c3Smrgtypedef struct {
16617ca54c3Smrg    BYTE	type;			/* X_Reply */
16717ca54c3Smrg    BOOL	pad1;
168ea1d6981Smrg    CARD16	sequenceNumber;
169ea1d6981Smrg    CARD32	length;
170ea1d6981Smrg    CARD32	ddxDriverMajorVersion;
171ea1d6981Smrg    CARD32	ddxDriverMinorVersion;
172ea1d6981Smrg    CARD32	ddxDriverPatchVersion;
173ea1d6981Smrg    CARD32	clientDriverNameLength;
174ea1d6981Smrg    CARD32	pad5;
175ea1d6981Smrg    CARD32	pad6;
17617ca54c3Smrg} xXF86DRIGetClientDriverNameReply;
17717ca54c3Smrg#define sz_xXF86DRIGetClientDriverNameReply	32
17817ca54c3Smrg
17917ca54c3Smrgtypedef struct _XF86DRICreateContext {
18017ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
18117ca54c3Smrg    CARD8	driReqType;		/* always X_DRICreateContext */
182ea1d6981Smrg    CARD16	length;
183ea1d6981Smrg    CARD32	screen;
184ea1d6981Smrg    CARD32	visual;
185ea1d6981Smrg    CARD32	context;
18617ca54c3Smrg} xXF86DRICreateContextReq;
18717ca54c3Smrg#define sz_xXF86DRICreateContextReq	16
18817ca54c3Smrg
18917ca54c3Smrgtypedef struct {
19017ca54c3Smrg    BYTE	type;			/* X_Reply */
19117ca54c3Smrg    BOOL	pad1;
192ea1d6981Smrg    CARD16	sequenceNumber;
193ea1d6981Smrg    CARD32	length;
194ea1d6981Smrg    CARD32	hHWContext;
195ea1d6981Smrg    CARD32	pad2;
196ea1d6981Smrg    CARD32	pad3;
197ea1d6981Smrg    CARD32	pad4;
198ea1d6981Smrg    CARD32	pad5;
199ea1d6981Smrg    CARD32	pad6;
20017ca54c3Smrg} xXF86DRICreateContextReply;
20117ca54c3Smrg#define sz_xXF86DRICreateContextReply	32
20217ca54c3Smrg
20317ca54c3Smrgtypedef struct _XF86DRIDestroyContext {
20417ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
20517ca54c3Smrg    CARD8	driReqType;		/* always X_DRIDestroyContext */
206ea1d6981Smrg    CARD16	length;
207ea1d6981Smrg    CARD32	screen;
208ea1d6981Smrg    CARD32	context;
20917ca54c3Smrg} xXF86DRIDestroyContextReq;
21017ca54c3Smrg#define sz_xXF86DRIDestroyContextReq	12
21117ca54c3Smrg
21217ca54c3Smrgtypedef struct _XF86DRICreateDrawable {
21317ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
21417ca54c3Smrg    CARD8	driReqType;		/* always X_DRICreateDrawable */
215ea1d6981Smrg    CARD16	length;
216ea1d6981Smrg    CARD32	screen;
217ea1d6981Smrg    CARD32	drawable;
21817ca54c3Smrg} xXF86DRICreateDrawableReq;
21917ca54c3Smrg#define sz_xXF86DRICreateDrawableReq	12
22017ca54c3Smrg
22117ca54c3Smrgtypedef struct {
22217ca54c3Smrg    BYTE	type;			/* X_Reply */
22317ca54c3Smrg    BOOL	pad1;
224ea1d6981Smrg    CARD16	sequenceNumber;
225ea1d6981Smrg    CARD32	length;
226ea1d6981Smrg    CARD32	hHWDrawable;
227ea1d6981Smrg    CARD32	pad2;
228ea1d6981Smrg    CARD32	pad3;
229ea1d6981Smrg    CARD32	pad4;
230ea1d6981Smrg    CARD32	pad5;
231ea1d6981Smrg    CARD32	pad6;
23217ca54c3Smrg} xXF86DRICreateDrawableReply;
23317ca54c3Smrg#define sz_xXF86DRICreateDrawableReply	32
23417ca54c3Smrg
23517ca54c3Smrgtypedef struct _XF86DRIDestroyDrawable {
23617ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
23717ca54c3Smrg    CARD8	driReqType;		/* always X_DRIDestroyDrawable */
238ea1d6981Smrg    CARD16	length;
239ea1d6981Smrg    CARD32	screen;
240ea1d6981Smrg    CARD32	drawable;
24117ca54c3Smrg} xXF86DRIDestroyDrawableReq;
24217ca54c3Smrg#define sz_xXF86DRIDestroyDrawableReq	12
24317ca54c3Smrg
24417ca54c3Smrgtypedef struct _XF86DRIGetDrawableInfo {
24517ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
24617ca54c3Smrg    CARD8	driReqType;		/* always X_DRIGetDrawableInfo */
247ea1d6981Smrg    CARD16	length;
248ea1d6981Smrg    CARD32	screen;
249ea1d6981Smrg    CARD32	drawable;
25017ca54c3Smrg} xXF86DRIGetDrawableInfoReq;
25117ca54c3Smrg#define sz_xXF86DRIGetDrawableInfoReq	12
25217ca54c3Smrg
25317ca54c3Smrgtypedef struct {
25417ca54c3Smrg    BYTE	type;			/* X_Reply */
25517ca54c3Smrg    BOOL	pad1;
256ea1d6981Smrg    CARD16	sequenceNumber;
257ea1d6981Smrg    CARD32	length;
258ea1d6981Smrg    CARD32	drawableTableIndex;
259ea1d6981Smrg    CARD32	drawableTableStamp;
260ea1d6981Smrg    INT16	drawableX;
261ea1d6981Smrg    INT16	drawableY;
262ea1d6981Smrg    INT16	drawableWidth;
263ea1d6981Smrg    INT16	drawableHeight;
264ea1d6981Smrg    CARD32	numClipRects;
265ea1d6981Smrg    INT16	backX;
266ea1d6981Smrg    INT16	backY;
267ea1d6981Smrg    CARD32	numBackClipRects;
26817ca54c3Smrg} xXF86DRIGetDrawableInfoReply;
26917ca54c3Smrg
27017ca54c3Smrg#define sz_xXF86DRIGetDrawableInfoReply	36
27117ca54c3Smrg
27217ca54c3Smrg
27317ca54c3Smrgtypedef struct _XF86DRIGetDeviceInfo {
27417ca54c3Smrg    CARD8	reqType;		/* always DRIReqCode */
27517ca54c3Smrg    CARD8	driReqType;		/* always X_DRIGetDeviceInfo */
276ea1d6981Smrg    CARD16	length;
277ea1d6981Smrg    CARD32	screen;
27817ca54c3Smrg} xXF86DRIGetDeviceInfoReq;
27917ca54c3Smrg#define sz_xXF86DRIGetDeviceInfoReq	8
28017ca54c3Smrg
28117ca54c3Smrgtypedef struct {
28217ca54c3Smrg    BYTE	type;			/* X_Reply */
28317ca54c3Smrg    BOOL	pad1;
284ea1d6981Smrg    CARD16	sequenceNumber;
285ea1d6981Smrg    CARD32	length;
286ea1d6981Smrg    CARD32	hFrameBufferLow;
287ea1d6981Smrg    CARD32	hFrameBufferHigh;
288ea1d6981Smrg    CARD32	framebufferOrigin;
289ea1d6981Smrg    CARD32	framebufferSize;
290ea1d6981Smrg    CARD32	framebufferStride;
291ea1d6981Smrg    CARD32	devPrivateSize;
29217ca54c3Smrg} xXF86DRIGetDeviceInfoReply;
29317ca54c3Smrg#define sz_xXF86DRIGetDeviceInfoReply	32
29417ca54c3Smrg
29517ca54c3Smrgtypedef struct _XF86DRIOpenFullScreen {
29617ca54c3Smrg    CARD8       reqType;	/* always DRIReqCode */
29717ca54c3Smrg    CARD8       driReqType;	/* always X_DRIOpenFullScreen */
298ea1d6981Smrg    CARD16      length;
299ea1d6981Smrg    CARD32      screen;
300ea1d6981Smrg    CARD32      drawable;
30117ca54c3Smrg} xXF86DRIOpenFullScreenReq;
30217ca54c3Smrg#define sz_xXF86DRIOpenFullScreenReq    12
30317ca54c3Smrg
30417ca54c3Smrgtypedef struct {
30517ca54c3Smrg    BYTE        type;
30617ca54c3Smrg    BOOL        pad1;
307ea1d6981Smrg    CARD16      sequenceNumber;
308ea1d6981Smrg    CARD32      length;
309ea1d6981Smrg    CARD32      isFullScreen;
310ea1d6981Smrg    CARD32      pad2;
311ea1d6981Smrg    CARD32      pad3;
312ea1d6981Smrg    CARD32      pad4;
313ea1d6981Smrg    CARD32      pad5;
314ea1d6981Smrg    CARD32      pad6;
31517ca54c3Smrg} xXF86DRIOpenFullScreenReply;
31617ca54c3Smrg#define sz_xXF86DRIOpenFullScreenReply  32
31717ca54c3Smrg
31817ca54c3Smrgtypedef struct _XF86DRICloseFullScreen {
31917ca54c3Smrg    CARD8       reqType;	/* always DRIReqCode */
32017ca54c3Smrg    CARD8       driReqType;	/* always X_DRICloseFullScreen */
321ea1d6981Smrg    CARD16      length;
322ea1d6981Smrg    CARD32      screen;
323ea1d6981Smrg    CARD32      drawable;
32417ca54c3Smrg} xXF86DRICloseFullScreenReq;
32517ca54c3Smrg#define sz_xXF86DRICloseFullScreenReq   12
32617ca54c3Smrg
32717ca54c3Smrgtypedef struct {
32817ca54c3Smrg    BYTE        type;
32917ca54c3Smrg    BOOL        pad1;
330ea1d6981Smrg    CARD16      sequenceNumber;
331ea1d6981Smrg    CARD32      length;
332ea1d6981Smrg    CARD32      pad2;
333ea1d6981Smrg    CARD32      pad3;
334ea1d6981Smrg    CARD32      pad4;
335ea1d6981Smrg    CARD32      pad5;
336ea1d6981Smrg    CARD32      pad6;
337ea1d6981Smrg    CARD32      pad7;
33817ca54c3Smrg} xXF86DRICloseFullScreenReply;
33917ca54c3Smrg#define sz_xXF86DRICloseFullScreenReply  32
34017ca54c3Smrg
34117ca54c3Smrg
34217ca54c3Smrg#endif /* _XF86DRISTR_H_ */
343