Home | History | Annotate | Download | only in x11
      1 /* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.8 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  * \file xf86dri.h
     33  * Protocol numbers and function prototypes for DRI X protocol.
     34  *
     35  * \author Kevin E. Martin <martin (at) valinux.com>
     36  * \author Jens Owen <jens (at) tungstengraphics.com>
     37  * \author Rickard E. (Rik) Faith <faith (at) 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 
     67 typedef unsigned long __DRIid;
     68 typedef void __DRInativeDisplay;
     69 
     70 _XFUNCPROTOBEGIN
     71 
     72 Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base );
     73 
     74 Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion,
     75     int *patchVersion );
     76 
     77 Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen,
     78     Bool *isCapable );
     79 
     80 Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA,
     81     char **busIDString );
     82 
     83 Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic );
     84 
     85 Bool VA_DRICloseConnection( Display *dpy, int screen );
     86 
     87 Bool VA_DRIGetClientDriverName( Display *dpy, int screen,
     88     int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
     89     int *ddxDriverPatchVersion, char **clientDriverName );
     90 
     91 Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual,
     92     XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
     93 
     94 Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID,
     95     XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
     96 
     97 Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
     98     __DRIid context_id );
     99 
    100 Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
    101     __DRIid drawable, drm_drawable_t *hHWDrawable );
    102 
    103 Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
    104     __DRIid drawable);
    105 
    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 );
    112 
    113 Bool 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