1 /* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 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.
6 Copyright 2007 Intel Corporation
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:
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
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.
29 **************************************************************************/
33 * Protocol numbers and function prototypes for DRI X protocol.
35 * \author Kevin E. Martin <martin@valinux.com>
36 * \author Jens Owen <jens@tungstengraphics.com>
37 * \author Rickard E. (Rik) Faith <faith@valinux.com>
43 #include <X11/Xfuncproto.h>
46 #define X_VA_DRIQueryVersion 0
47 #define X_VA_DRIQueryDirectRenderingCapable 1
48 #define X_VA_DRIOpenConnection 2
49 #define X_VA_DRICloseConnection 3
50 #define X_VA_DRIGetClientDriverName 4
51 #define X_VA_DRICreateContext 5
52 #define X_VA_DRIDestroyContext 6
53 #define X_VA_DRICreateDrawable 7
54 #define X_VA_DRIDestroyDrawable 8
55 #define X_VA_DRIGetDrawableInfo 9
56 #define X_VA_DRIGetDeviceInfo 10
57 #define X_VA_DRIAuthConnection 11
58 #define X_VA_DRIOpenFullScreen 12 /* Deprecated */
59 #define X_VA_DRICloseFullScreen 13 /* Deprecated */
61 #define VA_DRINumberEvents 0
63 #define VA_DRIClientNotLocal 0
64 #define VA_DRIOperationNotSupported 1
65 #define VA_DRINumberErrors (VA_DRIOperationNotSupported + 1)
67 typedef unsigned long __DRIid;
68 typedef void __DRInativeDisplay;
72 Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base );
74 Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion,
77 Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen,
80 Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA,
83 Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic );
85 Bool VA_DRICloseConnection( Display *dpy, int screen );
87 Bool VA_DRIGetClientDriverName( Display *dpy, int screen,
88 int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
89 int *ddxDriverPatchVersion, char **clientDriverName );
91 Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual,
92 XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
94 Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID,
95 XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
97 Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
100 Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
101 __DRIid drawable, drm_drawable_t *hHWDrawable );
103 Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
106 Bool VA_DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable,
107 unsigned int *index, unsigned int *stamp,
108 int *X, int *Y, int *W, int *H,
109 int *numClipRects, drm_clip_rect_t ** pClipRects,
110 int *backX, int *backY,
111 int *numBackClipRects, drm_clip_rect_t **pBackClipRects );
113 Bool VA_DRIGetDeviceInfo( Display *dpy, int screen,
114 drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize,
115 int *fbStride, int *devPrivateSize, void **pDevPrivate );
119 #endif /* _VA_DRI_H_ */