Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
bc81330d
Commit
bc81330d
authored
Aug 07, 2007
by
Waldo Bastian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include & export DRI interface as part of VA namespace
parent
d74704a1
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
213 additions
and
688 deletions
+213
-688
src/Makefile.am
src/Makefile.am
+2
-2
src/dri_interface.h
src/dri_interface.h
+0
-478
src/va.c
src/va.c
+7
-7
src/va_dri.c
src/va_dri.c
+90
-86
src/va_dri.h
src/va_dri.h
+41
-43
src/va_dristr.h
src/va_dristr.h
+73
-72
No files found.
src/Makefile.am
View file @
bc81330d
...
...
@@ -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
src/dri_interface.h
deleted
100644 → 0
View file @
d74704a1
/*
* 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
src/va.c
View file @
bc81330d
...
...
@@ -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
=
XF86
DRIQueryDirectRenderingCapable
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
&
direct_capable
);
result
=
VA_
DRIQueryDirectRenderingCapable
(
ctx
->
x11_dpy
,
ctx
->
x11_screen
,
&
direct_capable
);
if
(
!
result
)
{
va_errorMessage
(
"
XF86
DRIQueryDirectRenderingCapable 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
(
"
XF86
DRIQueryDirectRenderingCapable returned false
\n
"
);
va_errorMessage
(
"
VA_
DRIQueryDirectRenderingCapable returned false
\n
"
);
}
}
if
(
result
)
{
result
=
XF86
DRIGetClientDriverName
(
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
(
"
XF86
DRIGetClientDriverName returned false
\n
"
);
va_errorMessage
(
"
VA_
DRIGetClientDriverName returned false
\n
"
);
}
}
if
(
result
)
{
vaStatus
=
VA_STATUS_SUCCESS
;
va_infoMessage
(
"
XF86
DRIGetClientDriverName: %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
);
}
...
...
src/
XF86
dri.c
→
src/
va_
dri.c
View file @
bc81330d
...
...
@@ -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 "
xf86
dristr.h"
#include "
va_
dristr.h"
#define PUBLIC
static
XExtensionInfo
_
xf86
dri_info_data
;
static
XExtensionInfo
*
xf86dri_info
=
&
_xf86
dri_info_data
;
static
char
xf86dri_extension_name
[]
=
XF86
DRINAME
;
static
XExtensionInfo
_
va_
dri_info_data
;
static
XExtensionInfo
*
va_dri_info
=
&
_va_
dri_info_data
;
static
char
va_dri_extension_name
[]
=
VA_
DRINAME
;
#define
XF86
DRICheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i,
xf86
dri_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
xf86
dri_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
,
xf86
dri_info
,
xf86
dri_extension_name
,
&
xf86
dri_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
,
xf86
dri_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
XF86
DRIQueryExtension
(
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
XF86
DRIQueryVersion
(
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
);
x
XF86
DRIQueryVersionReply
rep
;
x
XF86
DRIQueryVersionReq
*
req
;
x
VA_
DRIQueryVersionReply
rep
;
x
VA_
DRIQueryVersionReq
*
req
;
TRACE
(
"QueryVersion..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIQueryVersion
,
req
);
GetReq
(
VA_
DRIQueryVersion
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIQueryVersion
;
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
XF86
DRIQueryDirectRenderingCapable
(
dpy
,
screen
,
isCapable
)
PUBLIC
Bool
VA_
DRIQueryDirectRenderingCapable
(
dpy
,
screen
,
isCapable
)
Display
*
dpy
;
int
screen
;
Bool
*
isCapable
;
{
XExtDisplayInfo
*
info
=
find_display
(
dpy
);
x
XF86
DRIQueryDirectRenderingCapableReply
rep
;
x
XF86
DRIQueryDirectRenderingCapableReq
*
req
;
x
VA_
DRIQueryDirectRenderingCapableReply
rep
;
x
VA_
DRIQueryDirectRenderingCapableReq
*
req
;
TRACE
(
"QueryDirectRenderingCapable..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIQueryDirectRenderingCapable
,
req
);
GetReq
(
VA_
DRIQueryDirectRenderingCapable
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIQueryDirectRenderingCapable
;
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
XF86
DRIOpenConnection
(
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
);
x
XF86
DRIOpenConnectionReply
rep
;
x
XF86
DRIOpenConnectionReq
*
req
;
x
VA_
DRIOpenConnectionReply
rep
;
x
VA_
DRIOpenConnectionReq
*
req
;
TRACE
(
"OpenConnection..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIOpenConnection
,
req
);
GetReq
(
VA_
DRIOpenConnection
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIOpenConnection
;
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
XF86
DRIAuthConnection
(
dpy
,
screen
,
magic
)
PUBLIC
Bool
VA_
DRIAuthConnection
(
dpy
,
screen
,
magic
)
Display
*
dpy
;
int
screen
;
drm_magic_t
magic
;
{
XExtDisplayInfo
*
info
=
find_display
(
dpy
);
x
XF86
DRIAuthConnectionReq
*
req
;
x
XF86
DRIAuthConnectionReply
rep
;
x
VA_
DRIAuthConnectionReq
*
req
;
x
VA_
DRIAuthConnectionReply
rep
;
TRACE
(
"AuthConnection..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIAuthConnection
,
req
);
GetReq
(
VA_
DRIAuthConnection
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIAuthConnection
;
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
XF86
DRICloseConnection
(
dpy
,
screen
)
PUBLIC
Bool
VA_
DRICloseConnection
(
dpy
,
screen
)
Display
*
dpy
;
int
screen
;
{
XExtDisplayInfo
*
info
=
find_display
(
dpy
);
x
XF86
DRICloseConnectionReq
*
req
;
x
VA_
DRICloseConnectionReq
*
req
;
TRACE
(
"CloseConnection..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRICloseConnection
,
req
);
GetReq
(
VA_
DRICloseConnection
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRICloseConnection
;
req
->
driReqType
=
X_
VA_
DRICloseConnection
;
req
->
screen
=
screen
;
UnlockDisplay
(
dpy
);
SyncHandle
();
...
...
@@ -277,7 +278,7 @@ PUBLIC Bool XF86DRICloseConnection(dpy, screen)
return
True
;
}
PUBLIC
Bool
XF86
DRIGetClientDriverName
(
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
);
x
XF86
DRIGetClientDriverNameReply
rep
;
x
XF86
DRIGetClientDriverNameReq
*
req
;
x
VA_
DRIGetClientDriverNameReply
rep
;
x
VA_
DRIGetClientDriverNameReq
*
req
;
TRACE
(
"GetClientDriverName..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIGetClientDriverName
,
req
);
GetReq
(
VA_
DRIGetClientDriverName
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIGetClientDriverName
;
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
XF86
DRICreateContextWithConfig
(
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
);
x
XF86
DRICreateContextReply
rep
;
x
XF86
DRICreateContextReq
*
req
;
x
VA_
DRICreateContextReply
rep
;
x
VA_
DRICreateContextReq
*
req
;
TRACE
(
"CreateContext..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRICreateContext
,
req
);
GetReq
(
VA_
DRICreateContext
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRICreateContext
;
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
XF86
DRICreateContext
(
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
XF86
DRICreateContextWithConfig
(
dpy
,
screen
,
visual
->
visualid
,
return
VA_
DRICreateContextWithConfig
(
dpy
,
screen
,
visual
->
visualid
,
context
,
hHWContext
);
}
PUBLIC
GLboolean
XF86
DRIDestroyContext
(
__DRInativeDisplay
*
ndpy
,
int
screen
,
PUBLIC
Bool
VA_
DRIDestroyContext
(
__DRInativeDisplay
*
ndpy
,
int
screen
,
__DRIid
context
)
{
Display
*
const
dpy
=
(
Display
*
)
ndpy
;
XExtDisplayInfo
*
info
=
find_display
(
dpy
);
x
XF86
DRIDestroyContextReq
*
req
;
x
VA_
DRIDestroyContextReq
*
req
;
TRACE
(
"DestroyContext..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIDestroyContext
,
req
);
GetReq
(
VA_
DRIDestroyContext
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIDestroyContext
;
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
XF86
DRICreateDrawable
(
__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
);
x
XF86
DRICreateDrawableReply
rep
;
x
XF86
DRICreateDrawableReq
*
req
;
x
VA_
DRICreateDrawableReply
rep
;
x
VA_
DRICreateDrawableReq
*
req
;
TRACE
(
"CreateDrawable..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRICreateDrawable
,
req
);
GetReq
(
VA_
DRICreateDrawable
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRICreateDrawable
;
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
XF86
DRIDestroyDrawable
(
__DRInativeDisplay
*
ndpy
,
int
screen
,
PUBLIC
Bool
VA_
DRIDestroyDrawable
(
__DRInativeDisplay
*
ndpy
,
int
screen
,
__DRIid
drawable
)
{
Display
*
const
dpy
=
(
Display
*
)
ndpy
;
XExtDisplayInfo
*
info
=
find_display
(
dpy
);
x
XF86
DRIDestroyDrawableReq
*
req
;
x
VA_
DRIDestroyDrawableReq
*
req
;
TRACE
(
"DestroyDrawable..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIDestroyDrawable
,
req
);
GetReq
(
VA_
DRIDestroyDrawable
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIDestroyDrawable
;
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
XF86
DRIGetDrawableInfo
(
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
);
x
XF86
DRIGetDrawableInfoReply
rep
;
x
XF86
DRIGetDrawableInfoReq
*
req
;
x
VA_
DRIGetDrawableInfoReply
rep
;
x
VA_
DRIGetDrawableInfoReq
*
req
;
int
total_rects
;
TRACE
(
"GetDrawableInfo..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIGetDrawableInfo
,
req
);
GetReq
(
VA_
DRIGetDrawableInfo
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIGetDrawableInfo
;
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(x
XF86
DRIGetDrawableInfoReply) -
if (rep.length != ((((SIZEOF(x
VA_
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
XF86
DRIGetDeviceInfo
(
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
);
x
XF86
DRIGetDeviceInfoReply
rep
;
x
XF86
DRIGetDeviceInfoReq
*
req
;
x
VA_
DRIGetDeviceInfoReply
rep
;
x
VA_
DRIGetDeviceInfoReq
*
req
;
TRACE
(
"GetDeviceInfo..."
);
XF86
DRICheckExtension
(
dpy
,
info
,
False
);
VA_
DRICheckExtension
(
dpy
,
info
,
False
);
LockDisplay
(
dpy
);
GetReq
(
XF86
DRIGetDeviceInfo
,
req
);
GetReq
(
VA_
DRIGetDeviceInfo
,
req
);
req
->
reqType
=
info
->
codes
->
major_opcode
;
req
->
driReqType
=
X_
XF86
DRIGetDeviceInfo
;
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
XF86
DRIOpenFullScreen
(
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
XF86
DRICloseFullScreen
(
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
src/
xf86
dri.h
→
src/
va_
dri.h
View file @
bc81330d
...
...
@@ -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 _
XF86
DRI_H_
#define _
XF86
DRI_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
XF86
DRIQueryExtension
(
Display
*
dpy
,
int
*
event_base
,
int
*
error_base
);
Bool
VA_
DRIQueryExtension
(
Display
*
dpy
,
int
*
event_base
,
int
*
error_base
);
Bool
XF86
DRIQueryVersion
(
Display
*
dpy
,
int
*
majorVersion
,
int
*
minorVersion
,
Bool
VA_
DRIQueryVersion
(
Display
*
dpy
,
int
*
majorVersion
,
int
*
minorVersion
,
int
*
patchVersion
);
Bool
XF86
DRIQueryDirectRenderingCapable
(
Display
*
dpy
,
int
screen
,
Bool
VA_
DRIQueryDirectRenderingCapable
(
Display
*
dpy
,
int
screen
,
Bool
*
isCapable
);
Bool
XF86
DRIOpenConnection
(
Display
*
dpy
,
int
screen
,
drm_handle_t
*
hSAREA
,
Bool
VA_
DRIOpenConnection
(
Display
*
dpy
,
int
screen
,
drm_handle_t
*
hSAREA
,
char
**
busIDString
);
Bool
XF86
DRIAuthConnection
(
Display
*
dpy
,
int
screen
,
drm_magic_t
magic
);
Bool
VA_
DRIAuthConnection
(
Display
*
dpy
,
int
screen
,
drm_magic_t
magic
);
Bool
XF86
DRICloseConnection
(
Display
*
dpy
,
int
screen
);
Bool
VA_
DRICloseConnection
(
Display
*
dpy
,
int
screen
);
Bool
XF86
DRIGetClientDriverName
(
Display
*
dpy
,
int
screen
,
Bool
VA_
DRIGetClientDriverName
(
Display
*
dpy
,
int
screen
,
int
*
ddxDriverMajorVersion
,
int
*
ddxDriverMinorVersion
,
int
*
ddxDriverPatchVersion
,
char
**
clientDriverName
);
Bool
XF86
DRICreateContext
(
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
XF86
DRICreateContextWithConfig
(
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
XF86
DRIDestroyContext
(
__DRInativeDisplay
*
dpy
,
int
screen
,
Bool
VA_
DRIDestroyContext
(
__DRInativeDisplay
*
dpy
,
int
screen
,
__DRIid
context_id
);
extern
GLboolean
XF86
DRICreateDrawable
(
__DRInativeDisplay
*
dpy
,
int
screen
,
Bool
VA_
DRICreateDrawable
(
__DRInativeDisplay
*
dpy
,
int
screen
,
__DRIid
drawable
,
drm_drawable_t
*
hHWDrawable
);
extern
GLboolean
XF86
DRIDestroyDrawable
(
__DRInativeDisplay
*
dpy
,
int
screen
,
Bool
VA_
DRIDestroyDrawable
(
__DRInativeDisplay
*
dpy
,
int
screen
,
__DRIid
drawable
);
Bool
XF86
DRIGetDrawableInfo
(
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
XF86
DRIGetDeviceInfo
(
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_ */
src/
xf86
dristr.h
→
src/
va_
dristr.h
View file @
bc81330d
...
...
@@ -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 _
XF86
DRISTR_H_
#define _
XF86
DRISTR_H_
#ifndef _
VA_
DRISTR_H_
#define _
VA_
DRISTR_H_
#include "
xf86
dri.h"
#include "
va_
dri.h"
#define
XF86
DRINAME "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
XF86
DRI_MAJOR_VERSION 4
#define
XF86
DRI_MINOR_VERSION 1
#define
XF86
DRI_PATCH_VERSION 0
#define
VA_
DRI_MAJOR_VERSION 4
#define
VA_
DRI_MINOR_VERSION 1
#define
VA_
DRI_PATCH_VERSION 0
typedef
struct
_
XF86
DRIQueryVersion
{
typedef
struct
_
VA_
DRIQueryVersion
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIQueryVersion */
CARD16
length
B16
;
}
x
XF86
DRIQueryVersionReq
;
#define sz_x
XF86
DRIQueryVersionReq 4
}
x
VA_
DRIQueryVersionReq
;
#define sz_x
VA_
DRIQueryVersionReq 4
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -74,16 +75,16 @@ typedef struct {
CARD32
pad4
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRIQueryVersionReply
;
#define sz_x
XF86
DRIQueryVersionReply 32
}
x
VA_
DRIQueryVersionReply
;
#define sz_x
VA_
DRIQueryVersionReply 32
typedef
struct
_
XF86
DRIQueryDirectRenderingCapable
{
typedef
struct
_
VA_
DRIQueryDirectRenderingCapable
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* X_DRIQueryDirectRenderingCapable */
CARD16
length
B16
;
CARD32
screen
B32
;
}
x
XF86
DRIQueryDirectRenderingCapableReq
;
#define sz_x
XF86
DRIQueryDirectRenderingCapableReq 8
}
x
VA_
DRIQueryDirectRenderingCapableReq
;
#define sz_x
VA_
DRIQueryDirectRenderingCapableReq 8
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -99,16 +100,16 @@ typedef struct {
CARD32
pad7
B32
;
CARD32
pad8
B32
;
CARD32
pad9
B32
;
}
x
XF86
DRIQueryDirectRenderingCapableReply
;
#define sz_x
XF86
DRIQueryDirectRenderingCapableReply 32
}
x
VA_
DRIQueryDirectRenderingCapableReply
;
#define sz_x
VA_
DRIQueryDirectRenderingCapableReply 32
typedef
struct
_
XF86
DRIOpenConnection
{
typedef
struct
_
VA_
DRIOpenConnection
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIOpenConnection */
CARD16
length
B16
;
CARD32
screen
B32
;
}
x
XF86
DRIOpenConnectionReq
;
#define sz_x
XF86
DRIOpenConnectionReq 8
}
x
VA_
DRIOpenConnectionReq
;
#define sz_x
VA_
DRIOpenConnectionReq 8
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -121,17 +122,17 @@ typedef struct {
CARD32
pad6
B32
;
CARD32
pad7
B32
;
CARD32
pad8
B32
;
}
x
XF86
DRIOpenConnectionReply
;
#define sz_x
XF86
DRIOpenConnectionReply 32
}
x
VA_
DRIOpenConnectionReply
;
#define sz_x
VA_
DRIOpenConnectionReply 32
typedef
struct
_
XF86
DRIAuthConnection
{
typedef
struct
_
VA_
DRIAuthConnection
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRICloseConnection */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
magic
B32
;
}
x
XF86
DRIAuthConnectionReq
;
#define sz_x
XF86
DRIAuthConnectionReq 12
}
x
VA_
DRIAuthConnectionReq
;
#define sz_x
VA_
DRIAuthConnectionReq 12
typedef
struct
{
BYTE
type
;
...
...
@@ -144,24 +145,24 @@ typedef struct {
CARD32
pad4
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRIAuthConnectionReply
;
#define zx_x
XF86
DRIAuthConnectionReply 32
}
x
VA_
DRIAuthConnectionReply
;
#define zx_x
VA_
DRIAuthConnectionReply 32
typedef
struct
_
XF86
DRICloseConnection
{
typedef
struct
_
VA_
DRICloseConnection
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRICloseConnection */
CARD16
length
B16
;
CARD32
screen
B32
;
}
x
XF86
DRICloseConnectionReq
;
#define sz_x
XF86
DRICloseConnectionReq 8
}
x
VA_
DRICloseConnectionReq
;
#define sz_x
VA_
DRICloseConnectionReq 8
typedef
struct
_
XF86
DRIGetClientDriverName
{
typedef
struct
_
VA_
DRIGetClientDriverName
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIGetClientDriverName */
CARD16
length
B16
;
CARD32
screen
B32
;
}
x
XF86
DRIGetClientDriverNameReq
;
#define sz_x
XF86
DRIGetClientDriverNameReq 8
}
x
VA_
DRIGetClientDriverNameReq
;
#define sz_x
VA_
DRIGetClientDriverNameReq 8
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -174,18 +175,18 @@ typedef struct {
CARD32
clientDriverNameLength
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRIGetClientDriverNameReply
;
#define sz_x
XF86
DRIGetClientDriverNameReply 32
}
x
VA_
DRIGetClientDriverNameReply
;
#define sz_x
VA_
DRIGetClientDriverNameReply 32
typedef
struct
_
XF86
DRICreateContext
{
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
;
}
x
XF86
DRICreateContextReq
;
#define sz_x
XF86
DRICreateContextReq 16
}
x
VA_
DRICreateContextReq
;
#define sz_x
VA_
DRICreateContextReq 16
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -198,26 +199,26 @@ typedef struct {
CARD32
pad4
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRICreateContextReply
;
#define sz_x
XF86
DRICreateContextReply 32
}
x
VA_
DRICreateContextReply
;
#define sz_x
VA_
DRICreateContextReply 32
typedef
struct
_
XF86
DRIDestroyContext
{
typedef
struct
_
VA_
DRIDestroyContext
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIDestroyContext */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
context
B32
;
}
x
XF86
DRIDestroyContextReq
;
#define sz_x
XF86
DRIDestroyContextReq 12
}
x
VA_
DRIDestroyContextReq
;
#define sz_x
VA_
DRIDestroyContextReq 12
typedef
struct
_
XF86
DRICreateDrawable
{
typedef
struct
_
VA_
DRICreateDrawable
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRICreateDrawable */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
drawable
B32
;
}
x
XF86
DRICreateDrawableReq
;
#define sz_x
XF86
DRICreateDrawableReq 12
}
x
VA_
DRICreateDrawableReq
;
#define sz_x
VA_
DRICreateDrawableReq 12
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -230,26 +231,26 @@ typedef struct {
CARD32
pad4
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRICreateDrawableReply
;
#define sz_x
XF86
DRICreateDrawableReply 32
}
x
VA_
DRICreateDrawableReply
;
#define sz_x
VA_
DRICreateDrawableReply 32
typedef
struct
_
XF86
DRIDestroyDrawable
{
typedef
struct
_
VA_
DRIDestroyDrawable
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIDestroyDrawable */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
drawable
B32
;
}
x
XF86
DRIDestroyDrawableReq
;
#define sz_x
XF86
DRIDestroyDrawableReq 12
}
x
VA_
DRIDestroyDrawableReq
;
#define sz_x
VA_
DRIDestroyDrawableReq 12
typedef
struct
_
XF86
DRIGetDrawableInfo
{
typedef
struct
_
VA_
DRIGetDrawableInfo
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIGetDrawableInfo */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
drawable
B32
;
}
x
XF86
DRIGetDrawableInfoReq
;
#define sz_x
XF86
DRIGetDrawableInfoReq 12
}
x
VA_
DRIGetDrawableInfoReq
;
#define sz_x
VA_
DRIGetDrawableInfoReq 12
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -266,18 +267,18 @@ typedef struct {
INT16
backX
B16
;
INT16
backY
B16
;
CARD32
numBackClipRects
B32
;
}
x
XF86
DRIGetDrawableInfoReply
;
}
x
VA_
DRIGetDrawableInfoReply
;
#define sz_x
XF86
DRIGetDrawableInfoReply 36
#define sz_x
VA_
DRIGetDrawableInfoReply 36
typedef
struct
_
XF86
DRIGetDeviceInfo
{
typedef
struct
_
VA_
DRIGetDeviceInfo
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIGetDeviceInfo */
CARD16
length
B16
;
CARD32
screen
B32
;
}
x
XF86
DRIGetDeviceInfoReq
;
#define sz_x
XF86
DRIGetDeviceInfoReq 8
}
x
VA_
DRIGetDeviceInfoReq
;
#define sz_x
VA_
DRIGetDeviceInfoReq 8
typedef
struct
{
BYTE
type
;
/* X_Reply */
...
...
@@ -290,17 +291,17 @@ typedef struct {
CARD32
framebufferSize
B32
;
CARD32
framebufferStride
B32
;
CARD32
devPrivateSize
B32
;
}
x
XF86
DRIGetDeviceInfoReply
;
#define sz_x
XF86
DRIGetDeviceInfoReply 32
}
x
VA_
DRIGetDeviceInfoReply
;
#define sz_x
VA_
DRIGetDeviceInfoReply 32
typedef
struct
_
XF86
DRIOpenFullScreen
{
typedef
struct
_
VA_
DRIOpenFullScreen
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRIOpenFullScreen */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
drawable
B32
;
}
x
XF86
DRIOpenFullScreenReq
;
#define sz_x
XF86
DRIOpenFullScreenReq 12
}
x
VA_
DRIOpenFullScreenReq
;
#define sz_x
VA_
DRIOpenFullScreenReq 12
typedef
struct
{
BYTE
type
;
...
...
@@ -313,17 +314,17 @@ typedef struct {
CARD32
pad4
B32
;
CARD32
pad5
B32
;
CARD32
pad6
B32
;
}
x
XF86
DRIOpenFullScreenReply
;
#define sz_x
XF86
DRIOpenFullScreenReply 32
}
x
VA_
DRIOpenFullScreenReply
;
#define sz_x
VA_
DRIOpenFullScreenReply 32
typedef
struct
_
XF86
DRICloseFullScreen
{
typedef
struct
_
VA_
DRICloseFullScreen
{
CARD8
reqType
;
/* always DRIReqCode */
CARD8
driReqType
;
/* always X_DRICloseFullScreen */
CARD16
length
B16
;
CARD32
screen
B32
;
CARD32
drawable
B32
;
}
x
XF86
DRICloseFullScreenReq
;
#define sz_x
XF86
DRICloseFullScreenReq 12
}
x
VA_
DRICloseFullScreenReq
;
#define sz_x
VA_
DRICloseFullScreenReq 12
typedef
struct
{
BYTE
type
;
...
...
@@ -336,8 +337,8 @@ typedef struct {
CARD32
pad5
B32
;
CARD32
pad6
B32
;
CARD32
pad7
B32
;
}
x
XF86
DRICloseFullScreenReply
;
#define sz_x
XF86
DRICloseFullScreenReply 32
}
x
VA_
DRICloseFullScreenReply
;
#define sz_x
VA_
DRICloseFullScreenReply 32
#endif
/* _
XF86
DRISTR_H_ */
#endif
/* _
VA_
DRISTR_H_ */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment