Commit bc81330d authored by Waldo Bastian's avatar Waldo Bastian

Include & export DRI interface as part of VA namespace

parent d74704a1
......@@ -5,9 +5,9 @@ libva_ladir = $(libdir)
libva_la_LDFLAGS = -version-number 0:1:0 -no-undefined
libva_la_LIBADD = -ldl -lX11 -lXext
libva_la_SOURCES = XF86dri.c xf86dri.h xf86dristr.h va.c
libva_la_SOURCES = va_dri.c va.c va_dristr.h
libvaincludedir = ${includedir}
libvainclude_HEADERS = va.h va_x11.h
libvainclude_HEADERS = va.h va_x11.h va_dri.h va_backend.h
EXTRA_DIST = ChangeLog TODO
/*
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
* (C) Copyright IBM Corporation 2004
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file dri_interface.h
*
* This file contains all the types and functions that define the interface
* between a DRI driver and driver loader. Currently, the most common driver
* loader is the XFree86 libGL.so. However, other loaders do exist, and in
* the future the server-side libglx.a will also be a loader.
*
* \author Kevin E. Martin <kevin@precisioninsight.com>
* \author Ian Romanick <idr@us.ibm.com>
*/
#ifndef DRI_INTERFACE_H
#define DRI_INTERFACE_H
#include <GL/gl.h>
#include <GL/internal/glcore.h>
#include <drm.h>
/**
* \name DRI interface structures
*
* The following structures define the interface between the GLX client
* side library and the DRI (direct rendering infrastructure).
*/
/*@{*/
typedef struct __DRIdisplayRec __DRIdisplay;
typedef struct __DRIscreenRec __DRIscreen;
typedef struct __DRIcontextRec __DRIcontext;
typedef struct __DRIdrawableRec __DRIdrawable;
typedef struct __DRIdriverRec __DRIdriver;
typedef struct __DRIframebufferRec __DRIframebuffer;
typedef struct __DRIversionRec __DRIversion;
typedef struct __DRIinterfaceMethodsRec __DRIinterfaceMethods;
typedef unsigned long __DRIid;
typedef void __DRInativeDisplay;
/*@}*/
/**
* \name Functions provided by the driver loader.
*/
/*@{*/
/**
* Type of a pointer to \c glXGetScreenDriver, as returned by
* \c glXGetProcAddress. This function is used to get the name of the DRI
* driver for the specified screen of the specified display. The driver
* name is typically used with \c glXGetDriverConfig.
*
* \sa glXGetScreenDriver, glXGetProcAddress, glXGetDriverConfig
*/
typedef const char * (* PFNGLXGETSCREENDRIVERPROC) (__DRInativeDisplay *dpy, int scrNum);
/**
* Type of a pointer to \c glXGetDriverConfig, as returned by
* \c glXGetProcAddress. This function is used to get the XML document
* describing the configuration options available for the specified driver.
*
* \sa glXGetDriverConfig, glXGetProcAddress, glXGetScreenDriver
*/
typedef const char * (* PFNGLXGETDRIVERCONFIGPROC) (const char *driverName);
/**
* Type of a pointer to \c glxEnableExtension, as returned by
* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
* a GLX extension on the specified screen.
*/
typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
/*@}*/
/**
* \name Functions and data provided by the driver.
*/
/*@{*/
typedef void *(CREATENEWSCREENFUNC)(__DRInativeDisplay *dpy, int scrn,
__DRIscreen *psc, const __GLcontextModes * modes,
const __DRIversion * ddx_version, const __DRIversion * dri_version,
const __DRIversion * drm_version, const __DRIframebuffer * frame_buffer,
void * pSAREA, int fd, int internal_api_version,
const __DRIinterfaceMethods * interface,
__GLcontextModes ** driver_modes);
typedef CREATENEWSCREENFUNC* PFNCREATENEWSCREENFUNC;
extern CREATENEWSCREENFUNC __driCreateNewScreen_20050727;
/**
* XML document describing the configuration options supported by the
* driver.
*/
extern const char __driConfigOptions[];
/*@}*/
/**
* Stored version of some component (i.e., server-side DRI module, kernel-side
* DRM, etc.).
*
* \todo
* There are several data structures that explicitly store a major version,
* minor version, and patch level. These structures should be modified to
* have a \c __DRIversionRec instead.
*/
struct __DRIversionRec {
int major; /**< Major version number. */
int minor; /**< Minor version number. */
int patch; /**< Patch-level. */
};
typedef void (*__DRIfuncPtr)(void);
struct __DRIinterfaceMethodsRec {
/**
* Get pointer to named function.
*/
__DRIfuncPtr (*getProcAddress)( const char * proc_name );
/**
* Create a list of \c __GLcontextModes structures.
*/
__GLcontextModes * (*createContextModes)(unsigned count,
size_t minimum_bytes_per_struct);
/**
* Destroy a list of \c __GLcontextModes structures.
*
* \todo
* Determine if the drivers actually need to call this.
*/
void (*destroyContextModes)( __GLcontextModes * modes );
/**
* Get the \c __DRIscreen for a given display and screen number.
*/
__DRIscreen *(*getScreen)(__DRInativeDisplay *dpy, int screenNum);
/**
* \name Client/server protocol functions.
*
* These functions implement the DRI client/server protocol for
* context and drawable operations. Platforms that do not implement
* the wire protocol (e.g., EGL) will implement glorified no-op functions.
*/
/*@{*/
/**
* Determine if the specified window ID still exists.
*
* \note
* Implementations may assume that the driver will only pass an ID into
* this function that actually corresponds to a window. On
* implementations where windows can only be destroyed by the DRI driver
* (e.g., EGL), this function is allowed to always return \c GL_TRUE.
*/
GLboolean (*windowExists)(__DRInativeDisplay *dpy, __DRIid draw);
/**
* Create the server-side portion of the GL context.
*/
GLboolean (* createContext)( __DRInativeDisplay *dpy, int screenNum,
int configID, void * contextID, drm_context_t * hw_context );
/**
* Destroy the server-side portion of the GL context.
*/
GLboolean (* destroyContext)( __DRInativeDisplay *dpy, int screenNum,
__DRIid context );
/**
* Create the server-side portion of the drawable.
*/
GLboolean (*createDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable, drm_drawable_t * hHWDrawable );
/**
* Destroy the server-side portion of the drawable.
*/
GLboolean (*destroyDrawable)( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable );
/**
* This function is used to get information about the position, size, and
* clip rects of a drawable.
*/
GLboolean (* getDrawableInfo) ( __DRInativeDisplay *dpy, int scrn,
__DRIid draw, unsigned int * index, unsigned int * stamp,
int * x, int * y, int * width, int * height,
int * numClipRects, drm_clip_rect_t ** pClipRects,
int * backX, int * backY,
int * numBackClipRects, drm_clip_rect_t ** pBackClipRects );
/*@}*/
/**
* \name Timing related functions.
*/
/*@{*/
/**
* Get the 64-bit unadjusted system time (UST).
*/
int (*getUST)(int64_t * ust);
/**
* Get the media stream counter (MSC) rate.
*
* Matching the definition in GLX_OML_sync_control, this function returns
* the rate of the "media stream counter". In practical terms, this is
* the frame refresh rate of the display.
*/
GLboolean (*getMSCRate)(__DRInativeDisplay * dpy, __DRIid drawable,
int32_t * numerator, int32_t * denominator);
/*@}*/
};
/**
* Framebuffer information record. Used by libGL to communicate information
* about the framebuffer to the driver's \c __driCreateNewScreen function.
*
* In XFree86, most of this information is derrived from data returned by
* calling \c XF86DRIGetDeviceInfo.
*
* \sa XF86DRIGetDeviceInfo __DRIdisplayRec::createNewScreen
* __driUtilCreateNewScreen CallCreateNewScreen
*
* \bug This structure could be better named.
*/
struct __DRIframebufferRec {
unsigned char *base; /**< Framebuffer base address in the CPU's
* address space. This value is calculated by
* calling \c drmMap on the framebuffer handle
* returned by \c XF86DRIGetDeviceInfo (or a
* similar function).
*/
int size; /**< Framebuffer size, in bytes. */
int stride; /**< Number of bytes from one line to the next. */
int width; /**< Pixel width of the framebuffer. */
int height; /**< Pixel height of the framebuffer. */
int dev_priv_size; /**< Size of the driver's dev-priv structure. */
void *dev_priv; /**< Pointer to the driver's dev-priv structure. */
};
/**
* Screen dependent methods. This structure is initialized during the
* \c __DRIdisplayRec::createScreen call.
*/
struct __DRIscreenRec {
/**
* Method to destroy the private DRI screen data.
*/
void (*destroyScreen)(__DRInativeDisplay *dpy, int scrn, void *screenPrivate);
/**
* Method to create the private DRI drawable data and initialize the
* drawable dependent methods.
*/
void *(*createNewDrawable)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
__DRIid draw, __DRIdrawable *pdraw,
int renderType, const int *attrs);
/**
* Method to return a pointer to the DRI drawable data.
*/
__DRIdrawable *(*getDrawable)(__DRInativeDisplay *dpy, __DRIid draw,
void *drawablePrivate);
/**
* Opaque pointer to private per screen direct rendering data. \c NULL
* if direct rendering is not supported on this screen. Never
* dereferenced in libGL.
*/
void *private;
/**
* Get the number of vertical refreshes since some point in time before
* this function was first called (i.e., system start up).
*
* \since Internal API version 20030317.
*/
int (*getMSC)( void *screenPrivate, int64_t *msc );
/**
* Opaque pointer that points back to the containing
* \c __GLXscreenConfigs. This data structure is shared with DRI drivers
* but \c __GLXscreenConfigs is not. However, they are needed by some GLX
* functions called by DRI drivers.
*
* \since Internal API version 20030813.
*/
void *screenConfigs;
/**
* Functions associated with MESA_allocate_memory.
*
* \since Internal API version 20030815.
*/
/*@{*/
void *(*allocateMemory)(__DRInativeDisplay *dpy, int scrn, GLsizei size,
GLfloat readfreq, GLfloat writefreq,
GLfloat priority);
void (*freeMemory)(__DRInativeDisplay *dpy, int scrn, GLvoid *pointer);
GLuint (*memoryOffset)(__DRInativeDisplay *dpy, int scrn, const GLvoid *pointer);
/*@}*/
/**
* Method to create the private DRI context data and initialize the
* context dependent methods.
*
* \since Internal API version 20031201.
*/
void * (*createNewContext)(__DRInativeDisplay *dpy, const __GLcontextModes *modes,
int render_type,
void *sharedPrivate, __DRIcontext *pctx);
};
/**
* Context dependent methods. This structure is initialized during the
* \c __DRIscreenRec::createContext call.
*/
struct __DRIcontextRec {
/**
* Method to destroy the private DRI context data.
*/
void (*destroyContext)(__DRInativeDisplay *dpy, int scrn, void *contextPrivate);
/**
* Opaque pointer to private per context direct rendering data.
* \c NULL if direct rendering is not supported on the display or
* screen used to create this context. Never dereferenced in libGL.
*/
void *private;
/**
* Pointer to the mode used to create this context.
*
* \since Internal API version 20040317.
*/
const __GLcontextModes * mode;
/**
* Method to bind a DRI drawable to a DRI graphics context.
*
* \since Internal API version 20050727.
*/
GLboolean (*bindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
/**
* Method to unbind a DRI drawable from a DRI graphics context.
*
* \since Internal API version 20050727.
*/
GLboolean (*unbindContext)(__DRInativeDisplay *dpy, int scrn, __DRIid draw,
__DRIid read, __DRIcontext *ctx);
};
/**
* Drawable dependent methods. This structure is initialized during the
* \c __DRIscreenRec::createDrawable call. \c createDrawable is not called
* by libGL at this time. It's currently used via the dri_util.c utility code
* instead.
*/
struct __DRIdrawableRec {
/**
* Method to destroy the private DRI drawable data.
*/
void (*destroyDrawable)(__DRInativeDisplay *dpy, void *drawablePrivate);
/**
* Method to swap the front and back buffers.
*/
void (*swapBuffers)(__DRInativeDisplay *dpy, void *drawablePrivate);
/**
* Opaque pointer to private per drawable direct rendering data.
* \c NULL if direct rendering is not supported on the display or
* screen used to create this drawable. Never dereferenced in libGL.
*/
void *private;
/**
* Get the number of completed swap buffers for this drawable.
*
* \since Internal API version 20030317.
*/
int (*getSBC)(__DRInativeDisplay *dpy, void *drawablePrivate, int64_t *sbc );
/**
* Wait for the SBC to be greater than or equal target_sbc.
*
* \since Internal API version 20030317.
*/
int (*waitForSBC)( __DRInativeDisplay * dpy, void *drawablePriv,
int64_t target_sbc,
int64_t * msc, int64_t * sbc );
/**
* Wait for the MSC to equal target_msc, or, if that has already passed,
* the next time (MSC % divisor) is equal to remainder. If divisor is
* zero, the function will return as soon as MSC is greater than or equal
* to target_msc.
*
* \since Internal API version 20030317.
*/
int (*waitForMSC)( __DRInativeDisplay * dpy, void *drawablePriv,
int64_t target_msc, int64_t divisor, int64_t remainder,
int64_t * msc, int64_t * sbc );
/**
* Like \c swapBuffers, but does NOT have an implicit \c glFlush. Once
* rendering is complete, waits until MSC is equal to target_msc, or
* if that has already passed, waits until (MSC % divisor) is equal
* to remainder. If divisor is zero, the swap will happen as soon as
* MSC is greater than or equal to target_msc.
*
* \since Internal API version 20030317.
*/
int64_t (*swapBuffersMSC)(__DRInativeDisplay *dpy, void *drawablePrivate,
int64_t target_msc,
int64_t divisor, int64_t remainder);
/**
* Enable or disable frame usage tracking.
*
* \since Internal API version 20030317.
*/
int (*frameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate, GLboolean enable);
/**
* Retrieve frame usage information.
*
* \since Internal API version 20030317.
*/
int (*queryFrameTracking)(__DRInativeDisplay *dpy, void *drawablePrivate,
int64_t * sbc, int64_t * missedFrames,
float * lastMissedUsage, float * usage );
/**
* Used by drivers that implement the GLX_SGI_swap_control or
* GLX_MESA_swap_control extension.
*
* \since Internal API version 20030317.
*/
unsigned swap_interval;
};
#endif
......@@ -12,7 +12,7 @@
#include <string.h>
#include <dlfcn.h>
#include <unistd.h>
#include <xf86dri.h>
#include "va_dri.h"
#define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri"
#define DRIVER_EXTENSION "_drv_video.so"
......@@ -136,10 +136,10 @@ static VAStatus va_getDriverName(VADriverContextP ctx, char **driver_name)
}
if (result)
{
result = XF86DRIQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen, &direct_capable);
result = VA_DRIQueryDirectRenderingCapable(ctx->x11_dpy, ctx->x11_screen, &direct_capable);
if (!result)
{
va_errorMessage("XF86DRIQueryDirectRenderingCapable failed\n");
va_errorMessage("VA_DRIQueryDirectRenderingCapable failed\n");
}
}
if (result)
......@@ -147,22 +147,22 @@ static VAStatus va_getDriverName(VADriverContextP ctx, char **driver_name)
result = direct_capable;
if (!result)
{
va_errorMessage("XF86DRIQueryDirectRenderingCapable returned false\n");
va_errorMessage("VA_DRIQueryDirectRenderingCapable returned false\n");
}
}
if (result)
{
result = XF86DRIGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, &driver_major, &driver_minor,
result = VA_DRIGetClientDriverName(ctx->x11_dpy, ctx->x11_screen, &driver_major, &driver_minor,
&driver_patch, driver_name);
if (!result)
{
va_errorMessage("XF86DRIGetClientDriverName returned false\n");
va_errorMessage("VA_DRIGetClientDriverName returned false\n");
}
}
if (result)
{
vaStatus = VA_STATUS_SUCCESS;
va_infoMessage("XF86DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n",
va_infoMessage("VA_DRIGetClientDriverName: %d.%d.%d %s (screen %d)\n",
driver_major, driver_minor, driver_patch, *driver_name, ctx->x11_screen);
}
......
......@@ -3,6 +3,7 @@
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
Copyright 2000 VA Linux Systems, Inc.
Copyright 2007 Intel Corporation
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
......@@ -41,16 +42,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <X11/Xlibint.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include "xf86dristr.h"
#include "va_dristr.h"
#define PUBLIC
static XExtensionInfo _xf86dri_info_data;
static XExtensionInfo *xf86dri_info = &_xf86dri_info_data;
static char xf86dri_extension_name[] = XF86DRINAME;
static XExtensionInfo _va_dri_info_data;
static XExtensionInfo *va_dri_info = &_va_dri_info_data;
static char va_dri_extension_name[] = VA_DRINAME;
#define XF86DRICheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, xf86dri_extension_name, val)
#define VA_DRICheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, va_dri_extension_name, val)
/*****************************************************************************
* *
......@@ -59,7 +60,7 @@ static char xf86dri_extension_name[] = XF86DRINAME;
*****************************************************************************/
static int close_display(Display *dpy, XExtCodes *extCodes);
static /* const */ XExtensionHooks xf86dri_extension_hooks = {
static /* const */ XExtensionHooks va_dri_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
......@@ -73,12 +74,12 @@ static /* const */ XExtensionHooks xf86dri_extension_hooks = {
NULL, /* error_string */
};
static XEXT_GENERATE_FIND_DISPLAY (find_display, xf86dri_info,
xf86dri_extension_name,
&xf86dri_extension_hooks,
static XEXT_GENERATE_FIND_DISPLAY (find_display, va_dri_info,
va_dri_extension_name,
&va_dri_extension_hooks,
0, NULL)
static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86dri_info)
static XEXT_GENERATE_CLOSE_DISPLAY (close_display, va_dri_info)
/*****************************************************************************
......@@ -95,7 +96,7 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86dri_info)
#endif
PUBLIC Bool XF86DRIQueryExtension (dpy, event_basep, error_basep)
PUBLIC Bool VA_DRIQueryExtension (dpy, event_basep, error_basep)
Display *dpy;
int *event_basep, *error_basep;
{
......@@ -113,23 +114,23 @@ PUBLIC Bool XF86DRIQueryExtension (dpy, event_basep, error_basep)
}
}
PUBLIC Bool XF86DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
PUBLIC Bool VA_DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
Display* dpy;
int* majorVersion;
int* minorVersion;
int* patchVersion;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIQueryVersionReply rep;
xXF86DRIQueryVersionReq *req;
xVA_DRIQueryVersionReply rep;
xVA_DRIQueryVersionReq *req;
TRACE("QueryVersion...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIQueryVersion, req);
GetReq(VA_DRIQueryVersion, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIQueryVersion;
req->driReqType = X_VA_DRIQueryVersion;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
......@@ -145,22 +146,22 @@ PUBLIC Bool XF86DRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion)
return True;
}
PUBLIC Bool XF86DRIQueryDirectRenderingCapable(dpy, screen, isCapable)
PUBLIC Bool VA_DRIQueryDirectRenderingCapable(dpy, screen, isCapable)
Display* dpy;
int screen;
Bool* isCapable;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIQueryDirectRenderingCapableReply rep;
xXF86DRIQueryDirectRenderingCapableReq *req;
xVA_DRIQueryDirectRenderingCapableReply rep;
xVA_DRIQueryDirectRenderingCapableReq *req;
TRACE("QueryDirectRenderingCapable...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIQueryDirectRenderingCapable, req);
GetReq(VA_DRIQueryDirectRenderingCapable, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIQueryDirectRenderingCapable;
req->driReqType = X_VA_DRIQueryDirectRenderingCapable;
req->screen = screen;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
......@@ -175,23 +176,23 @@ PUBLIC Bool XF86DRIQueryDirectRenderingCapable(dpy, screen, isCapable)
return True;
}
PUBLIC Bool XF86DRIOpenConnection(dpy, screen, hSAREA, busIdString)
PUBLIC Bool VA_DRIOpenConnection(dpy, screen, hSAREA, busIdString)
Display* dpy;
int screen;
drm_handle_t * hSAREA;
char **busIdString;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIOpenConnectionReply rep;
xXF86DRIOpenConnectionReq *req;
xVA_DRIOpenConnectionReply rep;
xVA_DRIOpenConnectionReq *req;
TRACE("OpenConnection...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIOpenConnection, req);
GetReq(VA_DRIOpenConnection, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIOpenConnection;
req->driReqType = X_VA_DRIOpenConnection;
req->screen = screen;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
......@@ -224,22 +225,22 @@ PUBLIC Bool XF86DRIOpenConnection(dpy, screen, hSAREA, busIdString)
return True;
}
PUBLIC Bool XF86DRIAuthConnection(dpy, screen, magic)
PUBLIC Bool VA_DRIAuthConnection(dpy, screen, magic)
Display* dpy;
int screen;
drm_magic_t magic;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIAuthConnectionReq *req;
xXF86DRIAuthConnectionReply rep;
xVA_DRIAuthConnectionReq *req;
xVA_DRIAuthConnectionReply rep;
TRACE("AuthConnection...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIAuthConnection, req);
GetReq(VA_DRIAuthConnection, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIAuthConnection;
req->driReqType = X_VA_DRIAuthConnection;
req->screen = screen;
req->magic = magic;
rep.authenticated = 0;
......@@ -255,21 +256,21 @@ PUBLIC Bool XF86DRIAuthConnection(dpy, screen, magic)
return True;
}
PUBLIC Bool XF86DRICloseConnection(dpy, screen)
PUBLIC Bool VA_DRICloseConnection(dpy, screen)
Display* dpy;
int screen;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRICloseConnectionReq *req;
xVA_DRICloseConnectionReq *req;
TRACE("CloseConnection...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRICloseConnection, req);
GetReq(VA_DRICloseConnection, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRICloseConnection;
req->driReqType = X_VA_DRICloseConnection;
req->screen = screen;
UnlockDisplay(dpy);
SyncHandle();
......@@ -277,7 +278,7 @@ PUBLIC Bool XF86DRICloseConnection(dpy, screen)
return True;
}
PUBLIC Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
PUBLIC Bool VA_DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
ddxDriverMinorVersion, ddxDriverPatchVersion, clientDriverName)
Display* dpy;
int screen;
......@@ -287,16 +288,16 @@ PUBLIC Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
char** clientDriverName;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIGetClientDriverNameReply rep;
xXF86DRIGetClientDriverNameReq *req;
xVA_DRIGetClientDriverNameReply rep;
xVA_DRIGetClientDriverNameReq *req;
TRACE("GetClientDriverName...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIGetClientDriverName, req);
GetReq(VA_DRIGetClientDriverName, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIGetClientDriverName;
req->driReqType = X_VA_DRIGetClientDriverName;
req->screen = screen;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
......@@ -327,7 +328,7 @@ PUBLIC Bool XF86DRIGetClientDriverName(dpy, screen, ddxDriverMajorVersion,
return True;
}
PUBLIC Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context,
PUBLIC Bool VA_DRICreateContextWithConfig(dpy, screen, configID, context,
hHWContext)
Display* dpy;
int screen;
......@@ -336,16 +337,16 @@ PUBLIC Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context,
drm_context_t * hHWContext;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRICreateContextReply rep;
xXF86DRICreateContextReq *req;
xVA_DRICreateContextReply rep;
xVA_DRICreateContextReq *req;
TRACE("CreateContext...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRICreateContext, req);
GetReq(VA_DRICreateContext, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRICreateContext;
req->driReqType = X_VA_DRICreateContext;
req->visual = configID;
req->screen = screen;
*context = XAllocID(dpy);
......@@ -363,31 +364,31 @@ PUBLIC Bool XF86DRICreateContextWithConfig(dpy, screen, configID, context,
return True;
}
PUBLIC Bool XF86DRICreateContext(dpy, screen, visual, context, hHWContext)
PUBLIC Bool VA_DRICreateContext(dpy, screen, visual, context, hHWContext)
Display* dpy;
int screen;
Visual* visual;
XID* context;
drm_context_t * hHWContext;
{
return XF86DRICreateContextWithConfig( dpy, screen, visual->visualid,
return VA_DRICreateContextWithConfig( dpy, screen, visual->visualid,
context, hHWContext );
}
PUBLIC GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen,
PUBLIC Bool VA_DRIDestroyContext( __DRInativeDisplay * ndpy, int screen,
__DRIid context )
{
Display * const dpy = (Display *) ndpy;
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIDestroyContextReq *req;
xVA_DRIDestroyContextReq *req;
TRACE("DestroyContext...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIDestroyContext, req);
GetReq(VA_DRIDestroyContext, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIDestroyContext;
req->driReqType = X_VA_DRIDestroyContext;
req->screen = screen;
req->context = context;
UnlockDisplay(dpy);
......@@ -396,21 +397,21 @@ PUBLIC GLboolean XF86DRIDestroyContext( __DRInativeDisplay * ndpy, int screen,
return True;
}
PUBLIC GLboolean XF86DRICreateDrawable( __DRInativeDisplay * ndpy, int screen,
PUBLIC Bool VA_DRICreateDrawable( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable, drm_drawable_t * hHWDrawable )
{
Display * const dpy = (Display *) ndpy;
XExtDisplayInfo *info = find_display (dpy);
xXF86DRICreateDrawableReply rep;
xXF86DRICreateDrawableReq *req;
xVA_DRICreateDrawableReply rep;
xVA_DRICreateDrawableReq *req;
TRACE("CreateDrawable...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRICreateDrawable, req);
GetReq(VA_DRICreateDrawable, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRICreateDrawable;
req->driReqType = X_VA_DRICreateDrawable;
req->screen = screen;
req->drawable = drawable;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
......@@ -426,20 +427,20 @@ PUBLIC GLboolean XF86DRICreateDrawable( __DRInativeDisplay * ndpy, int screen,
return True;
}
PUBLIC GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
PUBLIC Bool VA_DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
__DRIid drawable )
{
Display * const dpy = (Display *) ndpy;
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIDestroyDrawableReq *req;
xVA_DRIDestroyDrawableReq *req;
TRACE("DestroyDrawable...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIDestroyDrawable, req);
GetReq(VA_DRIDestroyDrawable, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIDestroyDrawable;
req->driReqType = X_VA_DRIDestroyDrawable;
req->screen = screen;
req->drawable = drawable;
UnlockDisplay(dpy);
......@@ -448,7 +449,7 @@ PUBLIC GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay * ndpy, int screen,
return True;
}
PUBLIC Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
PUBLIC Bool VA_DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
unsigned int* index, unsigned int* stamp,
int* X, int* Y, int* W, int* H,
int* numClipRects, drm_clip_rect_t ** pClipRects,
......@@ -456,17 +457,17 @@ PUBLIC Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
int* numBackClipRects, drm_clip_rect_t ** pBackClipRects )
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIGetDrawableInfoReply rep;
xXF86DRIGetDrawableInfoReq *req;
xVA_DRIGetDrawableInfoReply rep;
xVA_DRIGetDrawableInfoReq *req;
int total_rects;
TRACE("GetDrawableInfo...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIGetDrawableInfo, req);
GetReq(VA_DRIGetDrawableInfo, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIGetDrawableInfo;
req->driReqType = X_VA_DRIGetDrawableInfo;
req->screen = screen;
req->drawable = drawable;
......@@ -496,7 +497,7 @@ PUBLIC Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
* backwards compatibility (Because of the >> 2 shift) but the fix
* enables multi-threaded apps to work.
*/
if (rep.length != ((((SIZEOF(xXF86DRIGetDrawableInfoReply) -
if (rep.length != ((((SIZEOF(xVA_DRIGetDrawableInfoReply) -
SIZEOF(xGenericReply) +
total_rects * sizeof(drm_clip_rect_t)) + 3) & ~3) >> 2)) {
_XEatData(dpy, rep.length);
......@@ -533,7 +534,7 @@ PUBLIC Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable,
return True;
}
PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer,
PUBLIC Bool VA_DRIGetDeviceInfo(dpy, screen, hFrameBuffer,
fbOrigin, fbSize, fbStride, devPrivateSize, pDevPrivate)
Display* dpy;
int screen;
......@@ -545,16 +546,16 @@ PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer,
void** pDevPrivate;
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIGetDeviceInfoReply rep;
xXF86DRIGetDeviceInfoReq *req;
xVA_DRIGetDeviceInfoReply rep;
xVA_DRIGetDeviceInfoReq *req;
TRACE("GetDeviceInfo...");
XF86DRICheckExtension (dpy, info, False);
VA_DRICheckExtension (dpy, info, False);
LockDisplay(dpy);
GetReq(XF86DRIGetDeviceInfo, req);
GetReq(VA_DRIGetDeviceInfo, req);
req->reqType = info->codes->major_opcode;
req->driReqType = X_XF86DRIGetDeviceInfo;
req->driReqType = X_VA_DRIGetDeviceInfo;
req->screen = screen;
if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
UnlockDisplay(dpy);
......@@ -593,7 +594,7 @@ PUBLIC Bool XF86DRIGetDeviceInfo(dpy, screen, hFrameBuffer,
return True;
}
PUBLIC Bool XF86DRIOpenFullScreen(dpy, screen, drawable)
PUBLIC Bool VA_DRIOpenFullScreen(dpy, screen, drawable)
Display* dpy;
int screen;
Drawable drawable;
......@@ -606,7 +607,7 @@ PUBLIC Bool XF86DRIOpenFullScreen(dpy, screen, drawable)
return False;
}
PUBLIC Bool XF86DRICloseFullScreen(dpy, screen, drawable)
PUBLIC Bool VA_DRICloseFullScreen(dpy, screen, drawable)
Display* dpy;
int screen;
Drawable drawable;
......@@ -618,3 +619,6 @@ PUBLIC Bool XF86DRICloseFullScreen(dpy, screen, drawable)
(void) drawable;
return True;
}
#undef TRACE
......@@ -3,6 +3,7 @@
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
Copyright 2000 VA Linux Systems, Inc.
Copyright 2007 Intel Corporation
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
......@@ -36,87 +37,84 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* \author Rickard E. (Rik) Faith <faith@valinux.com>
*/
#ifndef _XF86DRI_H_
#define _XF86DRI_H_
#ifndef _VA_DRI_H_
#define _VA_DRI_H_
#include <X11/Xfuncproto.h>
#include <xf86drm.h>
#define X_XF86DRIQueryVersion 0
#define X_XF86DRIQueryDirectRenderingCapable 1
#define X_XF86DRIOpenConnection 2
#define X_XF86DRICloseConnection 3
#define X_XF86DRIGetClientDriverName 4
#define X_XF86DRICreateContext 5
#define X_XF86DRIDestroyContext 6
#define X_XF86DRICreateDrawable 7
#define X_XF86DRIDestroyDrawable 8
#define X_XF86DRIGetDrawableInfo 9
#define X_XF86DRIGetDeviceInfo 10
#define X_XF86DRIAuthConnection 11
#define X_XF86DRIOpenFullScreen 12 /* Deprecated */
#define X_XF86DRICloseFullScreen 13 /* Deprecated */
#define XF86DRINumberEvents 0
#define XF86DRIClientNotLocal 0
#define XF86DRIOperationNotSupported 1
#define XF86DRINumberErrors (XF86DRIOperationNotSupported + 1)
#ifndef _XF86DRI_SERVER_
#include "dri_interface.h"
#define X_VA_DRIQueryVersion 0
#define X_VA_DRIQueryDirectRenderingCapable 1
#define X_VA_DRIOpenConnection 2
#define X_VA_DRICloseConnection 3
#define X_VA_DRIGetClientDriverName 4
#define X_VA_DRICreateContext 5
#define X_VA_DRIDestroyContext 6
#define X_VA_DRICreateDrawable 7
#define X_VA_DRIDestroyDrawable 8
#define X_VA_DRIGetDrawableInfo 9
#define X_VA_DRIGetDeviceInfo 10
#define X_VA_DRIAuthConnection 11
#define X_VA_DRIOpenFullScreen 12 /* Deprecated */
#define X_VA_DRICloseFullScreen 13 /* Deprecated */
#define VA_DRINumberEvents 0
#define VA_DRIClientNotLocal 0
#define VA_DRIOperationNotSupported 1
#define VA_DRINumberErrors (VA_DRIOperationNotSupported + 1)
typedef unsigned long __DRIid;
typedef void __DRInativeDisplay;
_XFUNCPROTOBEGIN
Bool XF86DRIQueryExtension( Display *dpy, int *event_base, int *error_base );
Bool VA_DRIQueryExtension( Display *dpy, int *event_base, int *error_base );
Bool XF86DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion,
Bool VA_DRIQueryVersion( Display *dpy, int *majorVersion, int *minorVersion,
int *patchVersion );
Bool XF86DRIQueryDirectRenderingCapable( Display *dpy, int screen,
Bool VA_DRIQueryDirectRenderingCapable( Display *dpy, int screen,
Bool *isCapable );
Bool XF86DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA,
Bool VA_DRIOpenConnection( Display *dpy, int screen, drm_handle_t *hSAREA,
char **busIDString );
Bool XF86DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic );
Bool VA_DRIAuthConnection( Display *dpy, int screen, drm_magic_t magic );
Bool XF86DRICloseConnection( Display *dpy, int screen );
Bool VA_DRICloseConnection( Display *dpy, int screen );
Bool XF86DRIGetClientDriverName( Display *dpy, int screen,
Bool VA_DRIGetClientDriverName( Display *dpy, int screen,
int *ddxDriverMajorVersion, int *ddxDriverMinorVersion,
int *ddxDriverPatchVersion, char **clientDriverName );
Bool XF86DRICreateContext( Display *dpy, int screen, Visual *visual,
Bool VA_DRICreateContext( Display *dpy, int screen, Visual *visual,
XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
Bool XF86DRICreateContextWithConfig( Display *dpy, int screen, int configID,
Bool VA_DRICreateContextWithConfig( Display *dpy, int screen, int configID,
XID *ptr_to_returned_context_id, drm_context_t *hHWContext );
extern GLboolean XF86DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
Bool VA_DRIDestroyContext( __DRInativeDisplay *dpy, int screen,
__DRIid context_id );
extern GLboolean XF86DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
Bool VA_DRICreateDrawable( __DRInativeDisplay *dpy, int screen,
__DRIid drawable, drm_drawable_t *hHWDrawable );
extern GLboolean XF86DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
Bool VA_DRIDestroyDrawable( __DRInativeDisplay *dpy, int screen,
__DRIid drawable);
Bool XF86DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable,
Bool VA_DRIGetDrawableInfo( Display *dpy, int screen, Drawable drawable,
unsigned int *index, unsigned int *stamp,
int *X, int *Y, int *W, int *H,
int *numClipRects, drm_clip_rect_t ** pClipRects,
int *backX, int *backY,
int *numBackClipRects, drm_clip_rect_t **pBackClipRects );
Bool XF86DRIGetDeviceInfo( Display *dpy, int screen,
Bool VA_DRIGetDeviceInfo( Display *dpy, int screen,
drm_handle_t *hFrameBuffer, int *fbOrigin, int *fbSize,
int *fbStride, int *devPrivateSize, void **pDevPrivate );
_XFUNCPROTOEND
#endif /* _XF86DRI_SERVER_ */
#endif /* _XF86DRI_H_ */
#endif /* _VA_DRI_H_ */
......@@ -3,6 +3,7 @@
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
Copyright 2000 VA Linux Systems, Inc.
Copyright 2007 Intel Corporation
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
......@@ -35,12 +36,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef _XF86DRISTR_H_
#define _XF86DRISTR_H_
#ifndef _VA_DRISTR_H_
#define _VA_DRISTR_H_
#include "xf86dri.h"
#include "va_dri.h"
#define XF86DRINAME "XFree86-DRI"
#define VA_DRINAME "XFree86-DRI"
/* The DRI version number. This was originally set to be the same of the
* XFree86 version number. However, this version is really indepedent of
......@@ -51,16 +52,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 4.0.1: Patch to bump clipstamp when windows are destroyed, 28 May 02
* 4.1.0: Add transition from single to multi in DRMInfo rec, 24 Jun 02
*/
#define XF86DRI_MAJOR_VERSION 4
#define XF86DRI_MINOR_VERSION 1
#define XF86DRI_PATCH_VERSION 0
#define VA_DRI_MAJOR_VERSION 4
#define VA_DRI_MINOR_VERSION 1
#define VA_DRI_PATCH_VERSION 0
typedef struct _XF86DRIQueryVersion {
typedef struct _VA_DRIQueryVersion {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIQueryVersion */
CARD16 length B16;
} xXF86DRIQueryVersionReq;
#define sz_xXF86DRIQueryVersionReq 4
} xVA_DRIQueryVersionReq;
#define sz_xVA_DRIQueryVersionReq 4
typedef struct {
BYTE type; /* X_Reply */
......@@ -74,16 +75,16 @@ typedef struct {
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRIQueryVersionReply;
#define sz_xXF86DRIQueryVersionReply 32
} xVA_DRIQueryVersionReply;
#define sz_xVA_DRIQueryVersionReply 32
typedef struct _XF86DRIQueryDirectRenderingCapable {
typedef struct _VA_DRIQueryDirectRenderingCapable {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */
CARD16 length B16;
CARD32 screen B32;
} xXF86DRIQueryDirectRenderingCapableReq;
#define sz_xXF86DRIQueryDirectRenderingCapableReq 8
} xVA_DRIQueryDirectRenderingCapableReq;
#define sz_xVA_DRIQueryDirectRenderingCapableReq 8
typedef struct {
BYTE type; /* X_Reply */
......@@ -99,16 +100,16 @@ typedef struct {
CARD32 pad7 B32;
CARD32 pad8 B32;
CARD32 pad9 B32;
} xXF86DRIQueryDirectRenderingCapableReply;
#define sz_xXF86DRIQueryDirectRenderingCapableReply 32
} xVA_DRIQueryDirectRenderingCapableReply;
#define sz_xVA_DRIQueryDirectRenderingCapableReply 32
typedef struct _XF86DRIOpenConnection {
typedef struct _VA_DRIOpenConnection {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIOpenConnection */
CARD16 length B16;
CARD32 screen B32;
} xXF86DRIOpenConnectionReq;
#define sz_xXF86DRIOpenConnectionReq 8
} xVA_DRIOpenConnectionReq;
#define sz_xVA_DRIOpenConnectionReq 8
typedef struct {
BYTE type; /* X_Reply */
......@@ -121,17 +122,17 @@ typedef struct {
CARD32 pad6 B32;
CARD32 pad7 B32;
CARD32 pad8 B32;
} xXF86DRIOpenConnectionReply;
#define sz_xXF86DRIOpenConnectionReply 32
} xVA_DRIOpenConnectionReply;
#define sz_xVA_DRIOpenConnectionReply 32
typedef struct _XF86DRIAuthConnection {
typedef struct _VA_DRIAuthConnection {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICloseConnection */
CARD16 length B16;
CARD32 screen B32;
CARD32 magic B32;
} xXF86DRIAuthConnectionReq;
#define sz_xXF86DRIAuthConnectionReq 12
} xVA_DRIAuthConnectionReq;
#define sz_xVA_DRIAuthConnectionReq 12
typedef struct {
BYTE type;
......@@ -144,24 +145,24 @@ typedef struct {
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRIAuthConnectionReply;
#define zx_xXF86DRIAuthConnectionReply 32
} xVA_DRIAuthConnectionReply;
#define zx_xVA_DRIAuthConnectionReply 32
typedef struct _XF86DRICloseConnection {
typedef struct _VA_DRICloseConnection {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICloseConnection */
CARD16 length B16;
CARD32 screen B32;
} xXF86DRICloseConnectionReq;
#define sz_xXF86DRICloseConnectionReq 8
} xVA_DRICloseConnectionReq;
#define sz_xVA_DRICloseConnectionReq 8
typedef struct _XF86DRIGetClientDriverName {
typedef struct _VA_DRIGetClientDriverName {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIGetClientDriverName */
CARD16 length B16;
CARD32 screen B32;
} xXF86DRIGetClientDriverNameReq;
#define sz_xXF86DRIGetClientDriverNameReq 8
} xVA_DRIGetClientDriverNameReq;
#define sz_xVA_DRIGetClientDriverNameReq 8
typedef struct {
BYTE type; /* X_Reply */
......@@ -174,18 +175,18 @@ typedef struct {
CARD32 clientDriverNameLength B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRIGetClientDriverNameReply;
#define sz_xXF86DRIGetClientDriverNameReply 32
} xVA_DRIGetClientDriverNameReply;
#define sz_xVA_DRIGetClientDriverNameReply 32
typedef struct _XF86DRICreateContext {
typedef struct _VA_DRICreateContext {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICreateContext */
CARD16 length B16;
CARD32 screen B32;
CARD32 visual B32;
CARD32 context B32;
} xXF86DRICreateContextReq;
#define sz_xXF86DRICreateContextReq 16
} xVA_DRICreateContextReq;
#define sz_xVA_DRICreateContextReq 16
typedef struct {
BYTE type; /* X_Reply */
......@@ -198,26 +199,26 @@ typedef struct {
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRICreateContextReply;
#define sz_xXF86DRICreateContextReply 32
} xVA_DRICreateContextReply;
#define sz_xVA_DRICreateContextReply 32
typedef struct _XF86DRIDestroyContext {
typedef struct _VA_DRIDestroyContext {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIDestroyContext */
CARD16 length B16;
CARD32 screen B32;
CARD32 context B32;
} xXF86DRIDestroyContextReq;
#define sz_xXF86DRIDestroyContextReq 12
} xVA_DRIDestroyContextReq;
#define sz_xVA_DRIDestroyContextReq 12
typedef struct _XF86DRICreateDrawable {
typedef struct _VA_DRICreateDrawable {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICreateDrawable */
CARD16 length B16;
CARD32 screen B32;
CARD32 drawable B32;
} xXF86DRICreateDrawableReq;
#define sz_xXF86DRICreateDrawableReq 12
} xVA_DRICreateDrawableReq;
#define sz_xVA_DRICreateDrawableReq 12
typedef struct {
BYTE type; /* X_Reply */
......@@ -230,26 +231,26 @@ typedef struct {
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRICreateDrawableReply;
#define sz_xXF86DRICreateDrawableReply 32
} xVA_DRICreateDrawableReply;
#define sz_xVA_DRICreateDrawableReply 32
typedef struct _XF86DRIDestroyDrawable {
typedef struct _VA_DRIDestroyDrawable {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIDestroyDrawable */
CARD16 length B16;
CARD32 screen B32;
CARD32 drawable B32;
} xXF86DRIDestroyDrawableReq;
#define sz_xXF86DRIDestroyDrawableReq 12
} xVA_DRIDestroyDrawableReq;
#define sz_xVA_DRIDestroyDrawableReq 12
typedef struct _XF86DRIGetDrawableInfo {
typedef struct _VA_DRIGetDrawableInfo {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIGetDrawableInfo */
CARD16 length B16;
CARD32 screen B32;
CARD32 drawable B32;
} xXF86DRIGetDrawableInfoReq;
#define sz_xXF86DRIGetDrawableInfoReq 12
} xVA_DRIGetDrawableInfoReq;
#define sz_xVA_DRIGetDrawableInfoReq 12
typedef struct {
BYTE type; /* X_Reply */
......@@ -266,18 +267,18 @@ typedef struct {
INT16 backX B16;
INT16 backY B16;
CARD32 numBackClipRects B32;
} xXF86DRIGetDrawableInfoReply;
} xVA_DRIGetDrawableInfoReply;
#define sz_xXF86DRIGetDrawableInfoReply 36
#define sz_xVA_DRIGetDrawableInfoReply 36
typedef struct _XF86DRIGetDeviceInfo {
typedef struct _VA_DRIGetDeviceInfo {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIGetDeviceInfo */
CARD16 length B16;
CARD32 screen B32;
} xXF86DRIGetDeviceInfoReq;
#define sz_xXF86DRIGetDeviceInfoReq 8
} xVA_DRIGetDeviceInfoReq;
#define sz_xVA_DRIGetDeviceInfoReq 8
typedef struct {
BYTE type; /* X_Reply */
......@@ -290,17 +291,17 @@ typedef struct {
CARD32 framebufferSize B32;
CARD32 framebufferStride B32;
CARD32 devPrivateSize B32;
} xXF86DRIGetDeviceInfoReply;
#define sz_xXF86DRIGetDeviceInfoReply 32
} xVA_DRIGetDeviceInfoReply;
#define sz_xVA_DRIGetDeviceInfoReply 32
typedef struct _XF86DRIOpenFullScreen {
typedef struct _VA_DRIOpenFullScreen {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRIOpenFullScreen */
CARD16 length B16;
CARD32 screen B32;
CARD32 drawable B32;
} xXF86DRIOpenFullScreenReq;
#define sz_xXF86DRIOpenFullScreenReq 12
} xVA_DRIOpenFullScreenReq;
#define sz_xVA_DRIOpenFullScreenReq 12
typedef struct {
BYTE type;
......@@ -313,17 +314,17 @@ typedef struct {
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DRIOpenFullScreenReply;
#define sz_xXF86DRIOpenFullScreenReply 32
} xVA_DRIOpenFullScreenReply;
#define sz_xVA_DRIOpenFullScreenReply 32
typedef struct _XF86DRICloseFullScreen {
typedef struct _VA_DRICloseFullScreen {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICloseFullScreen */
CARD16 length B16;
CARD32 screen B32;
CARD32 drawable B32;
} xXF86DRICloseFullScreenReq;
#define sz_xXF86DRICloseFullScreenReq 12
} xVA_DRICloseFullScreenReq;
#define sz_xVA_DRICloseFullScreenReq 12
typedef struct {
BYTE type;
......@@ -336,8 +337,8 @@ typedef struct {
CARD32 pad5 B32;
CARD32 pad6 B32;
CARD32 pad7 B32;
} xXF86DRICloseFullScreenReply;
#define sz_xXF86DRICloseFullScreenReply 32
} xVA_DRICloseFullScreenReply;
#define sz_xVA_DRICloseFullScreenReply 32
#endif /* _XF86DRISTR_H_ */
#endif /* _VA_DRISTR_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment