45e9809aff7304721fddb95654901b32195c9c7avboxsync/**************************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAll Rights Reserved.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission is hereby granted, free of charge, to any person obtaining a
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopy of this software and associated documentation files (the
45e9809aff7304721fddb95654901b32195c9c7avboxsync"Software"), to deal in the Software without restriction, including
45e9809aff7304721fddb95654901b32195c9c7avboxsyncwithout limitation the rights to use, copy, modify, merge, publish,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdistribute, sub license, and/or sell copies of the Software, and to
45e9809aff7304721fddb95654901b32195c9c7avboxsyncpermit persons to whom the Software is furnished to do so, subject to
45e9809aff7304721fddb95654901b32195c9c7avboxsyncthe following conditions:
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncThe above copyright notice and this permission notice (including the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncnext paragraph) shall be included in all copies or substantial portions
45e9809aff7304721fddb95654901b32195c9c7avboxsyncof the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45e9809aff7304721fddb95654901b32195c9c7avboxsyncMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncIN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync**************************************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Authors:
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Jens Owen <jens@tungstengraphics.com>
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Prototypes for DRI functions */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef _DRI_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <pciaccess.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "scrnintstr.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "xf86dri.h"
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int DRISyncType;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_NO_SYNC 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_2D_SYNC 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_3D_SYNC 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int DRIContextType;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct _DRIContextPrivRec DRIContextPrivRec, *DRIContextPrivPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef enum _DRIContextFlags
45e9809aff7304721fddb95654901b32195c9c7avboxsync{
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRI_CONTEXT_2DONLY = 0x01,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRI_CONTEXT_PRESERVED = 0x02,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRI_CONTEXT_RESERVED = 0x04 /* DRI Only -- no kernel equivalent */
45e9809aff7304721fddb95654901b32195c9c7avboxsync} DRIContextFlags;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_NO_CONTEXT 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_2D_CONTEXT 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_3D_CONTEXT 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int DRISwapMethod;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_HIDE_X_CONTEXT 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_SERVER_SWAP 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_KERNEL_SWAP 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef int DRIWindowRequests;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_NO_WINDOWS 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_3D_WINDOWS_ONLY 1
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRI_ALL_WINDOWS 2
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*ClipNotifyPtr)( WindowPtr, int, int );
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*AdjustFramePtr)(int scrnIndex, int x, int y, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * These functions can be wrapped by the DRI. Each of these have
45e9809aff7304721fddb95654901b32195c9c7avboxsync * generic default funcs (initialized in DRICreateInfoRec) and can be
45e9809aff7304721fddb95654901b32195c9c7avboxsync * overridden by the driver in its [driver]DRIScreenInit function.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenWakeupHandlerProcPtr WakeupHandler;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ScreenBlockHandlerProcPtr BlockHandler;
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowExposuresProcPtr WindowExposures;
45e9809aff7304721fddb95654901b32195c9c7avboxsync CopyWindowProcPtr CopyWindow;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ValidateTreeProcPtr ValidateTree;
45e9809aff7304721fddb95654901b32195c9c7avboxsync PostValidateTreeProcPtr PostValidateTree;
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClipNotifyProcPtr ClipNotify;
45e9809aff7304721fddb95654901b32195c9c7avboxsync AdjustFramePtr AdjustFrame;
45e9809aff7304721fddb95654901b32195c9c7avboxsync} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned
45e9809aff7304721fddb95654901b32195c9c7avboxsync * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also
45e9809aff7304721fddb95654901b32195c9c7avboxsync * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163
45e9809aff7304721fddb95654901b32195c9c7avboxsync * showed that this was inadequate. The DRIInfoRec structure is now versioned
45e9809aff7304721fddb95654901b32195c9c7avboxsync * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18.
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Revision history:
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRIINFO_MAJOR_VERSION 5
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRIINFO_MINOR_VERSION 4
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DRIINFO_PATCH_VERSION 0
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef unsigned long long (*DRITexOffsetStartProcPtr)(PixmapPtr pPix);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef void (*DRITexOffsetFinishProcPtr)(PixmapPtr pPix);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* driver call back functions
45e9809aff7304721fddb95654901b32195c9c7avboxsync *
45e9809aff7304721fddb95654901b32195c9c7avboxsync * New fields should be added at the end for backwards compatibility.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO patch number to indicate bugfixes.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO minor number to indicate new fields.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Bump the DRIINFO major number to indicate binary-incompatible changes.
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool (*CreateContext)(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync VisualPtr visual,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_context_t hHWContext,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* pVisualConfigPriv,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextType context);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*DestroyContext)(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_context_t hHWContext,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextType context);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*SwapContext)(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRISyncType syncType,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextType readContextType,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* readContextStore,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextType writeContextType,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* writeContextStore);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*InitBuffers)(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgn,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 indx);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*MoveBuffers)(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DDXPointRec ptOldOrg,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgnSrc,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 indx);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionTo3d)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionTo2d)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*SetDrawableIndex)(WindowPtr pWin, CARD32 indx);
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool (*OpenFullScreen)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool (*CloseFullScreen)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* wrapped functions */
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIWrappedFuncsRec wrap;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* device info */
45e9809aff7304721fddb95654901b32195c9c7avboxsync char* drmDriverName;
45e9809aff7304721fddb95654901b32195c9c7avboxsync char* clientDriverName;
45e9809aff7304721fddb95654901b32195c9c7avboxsync char* busIdString;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ddxDriverMajorVersion;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ddxDriverMinorVersion;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ddxDriverPatchVersion;
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer frameBufferPhysicalAddress;
45e9809aff7304721fddb95654901b32195c9c7avboxsync long frameBufferSize;
45e9809aff7304721fddb95654901b32195c9c7avboxsync long frameBufferStride;
45e9809aff7304721fddb95654901b32195c9c7avboxsync long SAREASize;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int maxDrawableTableEntry;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int ddxDrawableTableEntry;
45e9809aff7304721fddb95654901b32195c9c7avboxsync long contextSize;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRISwapMethod driverSwapMethod;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIWindowRequests bufferRequests;
45e9809aff7304721fddb95654901b32195c9c7avboxsync int devPrivateSize;
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* devPrivate;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool createDummyCtx;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool createDummyCtxPriv;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 4.1.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionSingleToMulti3D)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*TransitionMultiToSingle3D)(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.1.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync void (*ClipNotify)(ScreenPtr pScreen, WindowPtr *ppWin, int num);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.2.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool allocSarea;
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool keepFDOpen;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.3.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRITexOffsetStartProcPtr texOffsetStart;
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRITexOffsetFinishProcPtr texOffsetFinish;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync /* New with DRI version 5.4.0 */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dontMapFrameBuffer;
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_handle_t hFrameBuffer; /* Handle to framebuffer, either
45e9809aff7304721fddb95654901b32195c9c7avboxsync * mapped by DDX driver or DRI */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync} DRIInfoRec, *DRIInfoPtr;
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char *busID,
45e9809aff7304721fddb95654901b32195c9c7avboxsync const char *drmDriverName);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIInfoPtr pDRIInfo,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *pDRMFD);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIExtensionInit(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIReset(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool *isCapable);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_handle_t * hSAREA,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char **busIdString);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* ddxDriverMajorVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* ddxDriverMinorVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* ddxDriverPatchVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char** clientDriverName);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync VisualPtr visual,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID context,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_context_t * pHWContext);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DrawablePtr pDrawable,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_drawable_t * hHWDrawable);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr client,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DrawablePtr pDrawable);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID id);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DrawablePtr pDrawable,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int* indx,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int* stamp,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* X,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* Y,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* W,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* H,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* numClipRects,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_clip_rect_t ** pClipRects,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* backX,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* backY,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* numBackClipRects,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_clip_rect_t ** pBackClipRects);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_handle_t * hFrameBuffer,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* fbOrigin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* fbSize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* fbStride,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* devPrivateSize,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void** pDevPrivate);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIWakeupHandler(pointer wakeupData,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int result,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pReadmask);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIBlockHandler(pointer blockData,
45e9809aff7304721fddb95654901b32195c9c7avboxsync OSTimePtr pTimeout,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pReadmask);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDoWakeupHandler(int screenNum,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer wakeupData,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long result,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pReadmask);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIDoBlockHandler(int screenNum,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer blockData,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pTimeout,
45e9809aff7304721fddb95654901b32195c9c7avboxsync pointer pReadmask);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRISwapContext(int drmFD,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void *oldctx,
45e9809aff7304721fddb95654901b32195c9c7avboxsync void *newctx);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgn,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr bsreg);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRICopyWindow(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DDXPointRec ptOldOrg,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr prgnSrc);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int DRIValidateTree(WindowPtr pParent,
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr pChild,
45e9809aff7304721fddb95654901b32195c9c7avboxsync VTKind kind);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent,
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr pChild,
45e9809aff7304721fddb95654901b32195c9c7avboxsync VTKind kind);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIClipNotify(WindowPtr pWin,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dx,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dy);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIUnlock(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD32 drawable_index);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_context_t * pHWContext,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextFlags flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync drm_context_t hHWContext,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRIContextFlags flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIQueryVersion(int *majorVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *minorVersion,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *patchVersion);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dx,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dy,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *xdir,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int *ydir,
45e9809aff7304721fddb95654901b32195c9c7avboxsync RegionPtr reg);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *));
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int drmRemoveSIGIOHandler(int fd);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRITexOffsetStartProcPtr *texOffsetStartFunc,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DRITexOffsetFinishProcPtr *texOffsetFinishFunc);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define _DRI_H_
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif