186c93d9c46415cf7746351c502a3513f637e77e4root/* 286c93d9c46415cf7746351c502a3513f637e77e4root * Copyright © 2007,2008 Red Hat, Inc. 386c93d9c46415cf7746351c502a3513f637e77e4root * 486c93d9c46415cf7746351c502a3513f637e77e4root * Permission is hereby granted, free of charge, to any person obtaining a 586c93d9c46415cf7746351c502a3513f637e77e4root * copy of this software and associated documentation files (the "Soft- 686c93d9c46415cf7746351c502a3513f637e77e4root * ware"), to deal in the Software without restriction, including without 786c93d9c46415cf7746351c502a3513f637e77e4root * limitation the rights to use, copy, modify, merge, publish, distribute, 886c93d9c46415cf7746351c502a3513f637e77e4root * and/or sell copies of the Software, and to permit persons to whom the 986c93d9c46415cf7746351c502a3513f637e77e4root * Software is furnished to do so, provided that the above copyright 1086c93d9c46415cf7746351c502a3513f637e77e4root * notice(s) and this permission notice appear in all copies of the Soft- 1186c93d9c46415cf7746351c502a3513f637e77e4root * ware and that both the above copyright notice(s) and this permission 1286c93d9c46415cf7746351c502a3513f637e77e4root * notice appear in supporting documentation. 1386c93d9c46415cf7746351c502a3513f637e77e4root * 1486c93d9c46415cf7746351c502a3513f637e77e4root * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1586c93d9c46415cf7746351c502a3513f637e77e4root * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 1686c93d9c46415cf7746351c502a3513f637e77e4root * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY 1786c93d9c46415cf7746351c502a3513f637e77e4root * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN 1886c93d9c46415cf7746351c502a3513f637e77e4root * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- 1986c93d9c46415cf7746351c502a3513f637e77e4root * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 2086c93d9c46415cf7746351c502a3513f637e77e4root * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 2186c93d9c46415cf7746351c502a3513f637e77e4root * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- 2286c93d9c46415cf7746351c502a3513f637e77e4root * MANCE OF THIS SOFTWARE. 2386c93d9c46415cf7746351c502a3513f637e77e4root * 2486c93d9c46415cf7746351c502a3513f637e77e4root * Except as contained in this notice, the name of a copyright holder shall 2586c93d9c46415cf7746351c502a3513f637e77e4root * not be used in advertising or otherwise to promote the sale, use or 2686c93d9c46415cf7746351c502a3513f637e77e4root * other dealings in this Software without prior written authorization of 2786c93d9c46415cf7746351c502a3513f637e77e4root * the copyright holder. 2886c93d9c46415cf7746351c502a3513f637e77e4root * 2986c93d9c46415cf7746351c502a3513f637e77e4root * Authors: 3086c93d9c46415cf7746351c502a3513f637e77e4root * Kristian Høgsberg (krh@redhat.com) 3186c93d9c46415cf7746351c502a3513f637e77e4root */ 3286c93d9c46415cf7746351c502a3513f637e77e4root 3386c93d9c46415cf7746351c502a3513f637e77e4root#ifndef _VA_DRI2_H_ 3486c93d9c46415cf7746351c502a3513f637e77e4root#define _VA_DRI2_H_ 3586c93d9c46415cf7746351c502a3513f637e77e4root 36b0fac498ca4863166252f1268fda83394db54153Fei Jiang#include <X11/Xproto.h> 3786c93d9c46415cf7746351c502a3513f637e77e4root#include <X11/extensions/Xfixes.h> 3886c93d9c46415cf7746351c502a3513f637e77e4root#include <X11/Xfuncproto.h> 3986c93d9c46415cf7746351c502a3513f637e77e4root#include <xf86drm.h> 4086c93d9c46415cf7746351c502a3513f637e77e4root 4186c93d9c46415cf7746351c502a3513f637e77e4roottypedef struct { 4286c93d9c46415cf7746351c502a3513f637e77e4root unsigned int attachment; 4386c93d9c46415cf7746351c502a3513f637e77e4root unsigned int name; 4486c93d9c46415cf7746351c502a3513f637e77e4root unsigned int pitch; 4586c93d9c46415cf7746351c502a3513f637e77e4root unsigned int cpp; 4686c93d9c46415cf7746351c502a3513f637e77e4root unsigned int flags; 4786c93d9c46415cf7746351c502a3513f637e77e4root} VA_DRI2Buffer; 4886c93d9c46415cf7746351c502a3513f637e77e4root 4986c93d9c46415cf7746351c502a3513f637e77e4rootextern Bool 5086c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2QueryExtension(Display *display, int *eventBase, int *errorBase); 5186c93d9c46415cf7746351c502a3513f637e77e4rootextern Bool 5286c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2QueryVersion(Display *display, int *major, int *minor); 5386c93d9c46415cf7746351c502a3513f637e77e4rootextern Bool 5486c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2Connect(Display *display, XID window, 5586c93d9c46415cf7746351c502a3513f637e77e4root char **driverName, char **deviceName); 5686c93d9c46415cf7746351c502a3513f637e77e4rootextern Bool 5786c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2Authenticate(Display *display, XID window, drm_magic_t magic); 5886c93d9c46415cf7746351c502a3513f637e77e4rootextern void 5986c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2CreateDrawable(Display *display, XID drawable); 6086c93d9c46415cf7746351c502a3513f637e77e4rootextern void 6186c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2DestroyDrawable(Display *display, XID handle); 6286c93d9c46415cf7746351c502a3513f637e77e4rootextern VA_DRI2Buffer * 6386c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2GetBuffers(Display *dpy, XID drawable, 6486c93d9c46415cf7746351c502a3513f637e77e4root int *width, int *height, 6586c93d9c46415cf7746351c502a3513f637e77e4root unsigned int *attachments, int count, 6686c93d9c46415cf7746351c502a3513f637e77e4root int *outCount); 6786c93d9c46415cf7746351c502a3513f637e77e4rootextern void 6886c93d9c46415cf7746351c502a3513f637e77e4rootVA_DRI2CopyRegion(Display *dpy, XID drawable, XserverRegion region, 69b0fac498ca4863166252f1268fda83394db54153Fei Jiang CARD32 dest, CARD32 src); 70b0fac498ca4863166252f1268fda83394db54153Fei Jiangextern void 71b0fac498ca4863166252f1268fda83394db54153Fei JiangVA_DRI2SwapBuffers(Display *dpy, XID drawable, CARD64 target_msc, CARD64 divisor, 72b0fac498ca4863166252f1268fda83394db54153Fei Jiang CARD64 remainder, CARD64 *count); 7386c93d9c46415cf7746351c502a3513f637e77e4root#endif 74