1/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 2002/10/30 12:51:25 alanh Exp $ */ 2/************************************************************************** 3 4Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 5Copyright 2000 VA Linux Systems, Inc. 6Copyright 2007 Intel Corporation 7All Rights Reserved. 8 9Permission is hereby granted, free of charge, to any person obtaining a 10copy of this software and associated documentation files (the 11"Software"), to deal in the Software without restriction, including 12without limitation the rights to use, copy, modify, merge, publish, 13distribute, sub license, and/or sell copies of the Software, and to 14permit persons to whom the Software is furnished to do so, subject to 15the following conditions: 16 17The above copyright notice and this permission notice (including the 18next paragraph) shall be included in all copies or substantial portions 19of the Software. 20 21THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 24IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR 25ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 26TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 27SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 29**************************************************************************/ 30 31/** 32 * \file xf86dri.h 33 * Protocol numbers and function prototypes for DRI X protocol. 34 * 35 * \author Kevin E. Martin <martin@valinux.com> 36 * \author Jens Owen <jens@tungstengraphics.com> 37 * \author Rickard E. (Rik) Faith <faith@valinux.com> 38 */ 39 40#ifndef _VA_DRI_H_ 41#define _VA_DRI_H_ 42 43#include <X11/Xfuncproto.h> 44#include <xf86drm.h> 45 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 */ 60 61#define VA_DRINumberEvents 0 62 63#define VA_DRIClientNotLocal 0 64#define VA_DRIOperationNotSupported 1 65#define VA_DRINumberErrors (VA_DRIOperationNotSupported + 1) 66 67typedef unsigned long __DRIid; 68typedef void __DRInativeDisplay; 69 70_XFUNCPROTOBEGIN 71 72Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base ); 73 74Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion, 75 int *patchVersion ); 76 77Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen, 78 Bool *isCapable ); 79 80Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA, 81 char **busIDString ); 82 83Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic ); 84 85Bool VA_DRICloseConnection( Display *dpy, int screen ); 86 87Bool VA_DRIGetClientDriverName( Display *dpy, int screen, 88 int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, 89 int *ddxDriverPatchVersion, char **clientDriverName ); 90 91Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual, 92 XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); 93 94Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID, 95 XID *ptr_to_returned_context_id, drm_context_t *hHWContext ); 96 97Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen, 98 __DRIid context_id ); 99 100Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen, 101 __DRIid drawable, drm_drawable_t *hHWDrawable ); 102 103Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen, 104 __DRIid drawable); 105 106Bool 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 ); 112 113Bool VA_DRIGetDeviceInfo( Display *dpy, int screen, 114 drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize, 115 int *fbStride, int *devPrivateSize, void **pDevPrivate ); 116 117_XFUNCPROTOEND 118 119#endif /* _VA_DRI_H_ */ 120 121