[pkg-nvidia-devel] r712 - in /packages/libvdpau/trunk: ./ doc/ include/vdpau/ src/ trace/
ceros-guest at users.alioth.debian.org
ceros-guest at users.alioth.debian.org
Tue Feb 9 20:11:26 UTC 2010
Author: ceros-guest
Date: Tue Feb 9 20:11:23 2010
New Revision: 712
URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=712
Log:
Merge branch 'upstream'
Conflicts:
COPYING
ChangeLog
Makefile.in
config.h.in
configure
configure.ac
doc/Makefile.in
include/vdpau/vdpau.h
src/Makefile.am
src/Makefile.in
src/vdpau_wrapper.c
trace/Makefile.in
trace/vdpau_trace.cpp
Added:
packages/libvdpau/trunk/src/mesa_dri2.c
packages/libvdpau/trunk/src/mesa_dri2.h
Modified:
packages/libvdpau/trunk/COPYING
packages/libvdpau/trunk/ChangeLog
packages/libvdpau/trunk/Makefile.in
packages/libvdpau/trunk/config.h.in
packages/libvdpau/trunk/configure
packages/libvdpau/trunk/configure.ac
packages/libvdpau/trunk/doc/Makefile.in
packages/libvdpau/trunk/include/vdpau/vdpau.h
packages/libvdpau/trunk/src/Makefile.am
packages/libvdpau/trunk/src/Makefile.in
packages/libvdpau/trunk/src/vdpau_wrapper.c
packages/libvdpau/trunk/trace/Makefile.in
packages/libvdpau/trunk/trace/vdpau_trace.cpp
Modified: packages/libvdpau/trunk/COPYING
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/COPYING?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/COPYING (original)
+++ packages/libvdpau/trunk/COPYING Tue Feb 9 20:11:23 2010
@@ -1,4 +1,5 @@
-Copyright (c) 2008 NVIDIA, Corporation
+Copyright © 2008-2010 NVIDIA Corporation
+Copyright © 2008 Red Hat, Inc.
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
Modified: packages/libvdpau/trunk/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/ChangeLog?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/ChangeLog (original)
+++ packages/libvdpau/trunk/ChangeLog Tue Feb 9 20:11:23 2010
@@ -1,3 +1,61 @@
+commit 76fdf83a7690ce366edbd4816b3c4b6728eeb9ee
+Author: Aaron Plattner <aplattner at nvidia.com>
+Date: Thu Jan 28 15:01:25 2010 -0800
+
+ Bump version to 0.4
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+
+commit 341c7e49b8c98f1a7b1a3ae719f15acd694719ca
+Author: Stephen Warren <swarren at nvidia.com>
+Date: Thu Jan 28 15:00:32 2010 -0800
+
+ trace: Fix a picture info bracket mismatch.
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+
+commit f3bbd295d310d6ea44f00fa6c787a7427f01cd05
+Author: Stephen Warren <swarren at nvidia.com>
+Date: Thu Jan 28 14:58:40 2010 -0800
+
+ YV12 documentation fix.
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+
+commit 4e2b6f38f640f341ec49336aaaccfb136decbdff
+Author: Stephen Warren <swarren at nvidia.com>
+Date: Thu Jan 28 14:56:59 2010 -0800
+
+ Documentation enhancements for Uoti from ffmpeg.
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+
+commit 97331f1c8ee7c83f0dd6dff0ecc5bc51bf78022b
+Author: Aaron Plattner <aplattner at nvidia.com>
+Date: Wed Jan 27 18:17:23 2010 -0800
+
+ Update the COPYING copyright date to include recent changes
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+
+commit 3c02e5c68ef9480a0f9e5c3af5b09e6b3dcd981d
+Author: Aaron Plattner <aplattner at nvidia.com>
+Date: Wed Jan 27 18:16:41 2010 -0800
+
+ Query DRI2 for the driver name.
+
+ If the VDPAU_DRIVER environment variable is not set, use DRI2Connect to query
+ the VDPAU driver name from the X server.
+
+ Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
+ Reviewed-by: Stephen Warren <swarren at nvidia.com>
+
+commit a9c69d294ae41fffadb432caa66917a4e7d107a8
+Author: Aaron Plattner <aplattner at nvidia.com>
+Date: Mon Dec 14 10:52:41 2009 -0800
+
+ $(docdir) apparently requires autoconf 2.60
+
commit 72c3ea0d5705ac5b21e5096742d9ec57573e543d
Author: Aaron Plattner <aplattner at nvidia.com>
Date: Fri Nov 20 11:54:36 2009 -0800
Modified: packages/libvdpau/trunk/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/Makefile.in?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/Makefile.in (original)
+++ packages/libvdpau/trunk/Makefile.in Tue Feb 9 20:11:23 2010
@@ -198,6 +198,8 @@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
+XEXT_CFLAGS = @XEXT_CFLAGS@
+XEXT_LIBS = @XEXT_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -221,6 +223,8 @@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
+dri2proto_CFLAGS = @dri2proto_CFLAGS@
+dri2proto_LIBS = @dri2proto_LIBS@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
Modified: packages/libvdpau/trunk/config.h.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/config.h.in?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/config.h.in (original)
+++ packages/libvdpau/trunk/config.h.in Tue Feb 9 20:11:23 2010
@@ -1,4 +1,7 @@
/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Request driver name from DRI2 */
+#undef DRI2
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
Modified: packages/libvdpau/trunk/configure
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/configure?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/configure (original)
+++ packages/libvdpau/trunk/configure Tue Feb 9 20:11:23 2010
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for libvdpau 0.3.
+# Generated by GNU Autoconf 2.64 for libvdpau 0.4.
#
# Report bugs to <xorg at lists.freedesktop.org>.
#
@@ -698,8 +698,8 @@
# Identity of this package.
PACKAGE_NAME='libvdpau'
PACKAGE_TARNAME='libvdpau'
-PACKAGE_VERSION='0.3'
-PACKAGE_STRING='libvdpau 0.3'
+PACKAGE_VERSION='0.4'
+PACKAGE_STRING='libvdpau 0.4'
PACKAGE_BUGREPORT='xorg at lists.freedesktop.org'
PACKAGE_URL=''
@@ -752,6 +752,12 @@
DOT
DOXYGEN
DLOPEN_LIBS
+DRI2_FALSE
+DRI2_TRUE
+XEXT_LIBS
+XEXT_CFLAGS
+dri2proto_LIBS
+dri2proto_CFLAGS
X11_LIBS
X11_CFLAGS
PKG_CONFIG
@@ -881,6 +887,7 @@
enable_fast_install
with_gnu_ld
enable_libtool_lock
+enable_dri2
enable_documentation
with_module_dir
'
@@ -899,7 +906,11 @@
CXXCPP
PKG_CONFIG
X11_CFLAGS
-X11_LIBS'
+X11_LIBS
+dri2proto_CFLAGS
+dri2proto_LIBS
+XEXT_CFLAGS
+XEXT_LIBS'
# Initialize some variables set by options.
@@ -1441,7 +1452,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libvdpau 0.3 to adapt to many kinds of systems.
+\`configure' configures libvdpau 0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1511,7 +1522,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libvdpau 0.3:";;
+ short | recursive ) echo "Configuration of libvdpau 0.4:";;
esac
cat <<\_ACEOF
@@ -1528,6 +1539,8 @@
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --disable-dri2 Disable driver name query through DRI2 (default:
+ auto)
--disable-documentation Disable Doxygen documentation (default: auto)
Optional Packages:
@@ -1553,6 +1566,12 @@
PKG_CONFIG path to pkg-config utility
X11_CFLAGS C compiler flags for X11, overriding pkg-config
X11_LIBS linker flags for X11, overriding pkg-config
+ dri2proto_CFLAGS
+ C compiler flags for dri2proto, overriding pkg-config
+ dri2proto_LIBS
+ linker flags for dri2proto, overriding pkg-config
+ XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config
+ XEXT_LIBS linker flags for XEXT, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1620,7 +1639,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libvdpau configure 0.3
+libvdpau configure 0.4
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
@@ -2019,7 +2038,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libvdpau $as_me 0.3, which was
+It was created by libvdpau $as_me 0.4, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ $0 $@
@@ -2827,7 +2846,7 @@
# Define the identity of the package.
PACKAGE='libvdpau'
- VERSION='0.3'
+ VERSION='0.4'
cat >>confdefs.h <<_ACEOF
@@ -4949,13 +4968,13 @@
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:4952: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:4971: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:4955: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:4974: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:4958: output\"" >&5)
+ (eval echo "\"\$as_me:4977: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6161,7 +6180,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6164 "configure"' > conftest.$ac_ext
+ echo '#line 6183 "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8184,11 +8203,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8187: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8206: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8191: \$? = $ac_status" >&5
+ echo "$as_me:8210: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8523,11 +8542,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8526: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8545: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8530: \$? = $ac_status" >&5
+ echo "$as_me:8549: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8628,11 +8647,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8631: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8650: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8635: \$? = $ac_status" >&5
+ echo "$as_me:8654: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8683,11 +8702,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8686: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8705: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8690: \$? = $ac_status" >&5
+ echo "$as_me:8709: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11066,7 +11085,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11069 "configure"
+#line 11088 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11162,7 +11181,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11165 "configure"
+#line 11184 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13118,11 +13137,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13121: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13140: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13125: \$? = $ac_status" >&5
+ echo "$as_me:13144: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13217,11 +13236,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13220: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13239: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13224: \$? = $ac_status" >&5
+ echo "$as_me:13243: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -13269,11 +13288,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13272: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13291: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13276: \$? = $ac_status" >&5
+ echo "$as_me:13295: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14447,6 +14466,197 @@
+# Check for optional dependencies.
+# Check whether --enable-dri2 was given.
+if test "${enable_dri2+set}" = set; then :
+ enableval=$enable_dri2; DRI2=$enableval
+else
+ DRI2=auto
+fi
+
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dri2proto" >&5
+$as_echo_n "checking for dri2proto... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$dri2proto_CFLAGS"; then
+ pkg_cv_dri2proto_CFLAGS="$dri2proto_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_dri2proto_CFLAGS=`$PKG_CONFIG --cflags "dri2proto >= 2.2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$dri2proto_LIBS"; then
+ pkg_cv_dri2proto_LIBS="$dri2proto_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 2.2\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "dri2proto >= 2.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_dri2proto_LIBS=`$PKG_CONFIG --libs "dri2proto >= 2.2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ dri2proto_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dri2proto >= 2.2"`
+ else
+ dri2proto_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dri2proto >= 2.2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$dri2proto_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ HAVE_DRI2PROTO=no
+elif test $pkg_failed = untried; then
+ HAVE_DRI2PROTO=no
+else
+ dri2proto_CFLAGS=$pkg_cv_dri2proto_CFLAGS
+ dri2proto_LIBS=$pkg_cv_dri2proto_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ HAVE_DRI2PROTO=yes
+fi
+case "$DRI2,$HAVE_DRI2PROTO" in
+ yes,no)
+ as_fn_error "DRI2 queries require dri2proto >= 2.2" "$LINENO" 5
+ ;;
+ yes,yes | auto,yes)
+
+$as_echo "#define DRI2 1" >>confdefs.h
+
+ DRI2=yes
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5
+$as_echo_n "checking for XEXT... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$XEXT_CFLAGS"; then
+ pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "xext") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xext" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$XEXT_LIBS"; then
+ pkg_cv_XEXT_LIBS="$XEXT_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xext\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "xext") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xext" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ XEXT_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext"`
+ else
+ XEXT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$XEXT_PKG_ERRORS" >&5
+
+ as_fn_error "Package requirements (xext) were not met:
+
+$XEXT_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables XEXT_CFLAGS
+and XEXT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+" "$LINENO" 5
+elif test $pkg_failed = untried; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables XEXT_CFLAGS
+and XEXT_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details." "$LINENO" 5; }
+else
+ XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS
+ XEXT_LIBS=$pkg_cv_XEXT_LIBS
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ :
+fi
+
+
+ ;;
+esac
+ if test "x$DRI2" = xyes; then
+ DRI2_TRUE=
+ DRI2_FALSE='#'
+else
+ DRI2_TRUE='#'
+ DRI2_FALSE=
+fi
+
+
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = x""yes; then :
@@ -14951,6 +15161,10 @@
fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DRI2_TRUE}" && test -z "${DRI2_FALSE}"; then
+ as_fn_error "conditional \"DRI2\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then
@@ -15365,7 +15579,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libvdpau $as_me 0.3, which was
+This file was extended by libvdpau $as_me 0.4, which was
generated by GNU Autoconf 2.64. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15429,7 +15643,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-libvdpau config.status 0.3
+libvdpau config.status 0.4
configured by $0, generated by GNU Autoconf 2.64,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Modified: packages/libvdpau/trunk/configure.ac
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/configure.ac?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/configure.ac (original)
+++ packages/libvdpau/trunk/configure.ac Tue Feb 9 20:11:23 2010
@@ -1,6 +1,6 @@
-AC_PREREQ(2.57)
+AC_PREREQ(2.60)
-AC_INIT(libvdpau, 0.3, [xorg at lists.freedesktop.org], libvdpau)
+AC_INIT(libvdpau, 0.4, [xorg at lists.freedesktop.org], libvdpau)
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE
@@ -19,6 +19,23 @@
PKG_CHECK_MODULES(X11, x11)
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)
+
+# Check for optional dependencies.
+AC_ARG_ENABLE(dri2, AS_HELP_STRING([--disable-dri2], [Disable driver name query through DRI2 (default: auto)]), [DRI2=$enableval], [DRI2=auto])
+PKG_CHECK_MODULES(dri2proto, dri2proto >= 2.2, [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no])
+case "$DRI2,$HAVE_DRI2PROTO" in
+ yes,no)
+ AC_MSG_ERROR([DRI2 queries require dri2proto >= 2.2])
+ ;;
+ yes,yes | auto,yes)
+ AC_DEFINE(DRI2, 1, [Request driver name from DRI2])
+ DRI2=yes
+ PKG_CHECK_MODULES(XEXT, xext)
+ AC_SUBST([XEXT_CFLAGS])
+ AC_SUBST([XEXT_LIBS])
+ ;;
+esac
+AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
dnl Check to see if dlopen is in default libraries (like Solaris, which
dnl has it in libc), or if libdl is needed to get it.
Modified: packages/libvdpau/trunk/doc/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/doc/Makefile.in?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/doc/Makefile.in (original)
+++ packages/libvdpau/trunk/doc/Makefile.in Tue Feb 9 20:11:23 2010
@@ -119,6 +119,8 @@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
+XEXT_CFLAGS = @XEXT_CFLAGS@
+XEXT_LIBS = @XEXT_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -142,6 +144,8 @@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
+dri2proto_CFLAGS = @dri2proto_CFLAGS@
+dri2proto_LIBS = @dri2proto_LIBS@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
Modified: packages/libvdpau/trunk/include/vdpau/vdpau.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/include/vdpau/vdpau.h?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/include/vdpau/vdpau.h (original)
+++ packages/libvdpau/trunk/include/vdpau/vdpau.h Tue Feb 9 20:11:23 2010
@@ -828,7 +828,7 @@
* \hideinitializer
* \brief The "YV12" YCbCr surface format.
*
- * This format has a three planes, a Y plane, a U plane, and a V
+ * This format has a three planes, a Y plane, a V plane, and a U
* plane.
*
* Each of the planes is an array of byte-sized components.
@@ -2144,6 +2144,22 @@
/**
* \brief Complete blending operation definition.
+ *
+ * A "blend state" operation controls the math behind certain rendering
+ * operations.
+ *
+ * The blend math is the familiar OpenGL blend math:
+ * \f[
+ * dst.a = equation(blendFactorDstAlpha*dst.a,
+ * blendFactorSrcAlpha*src.a);
+ * \f]
+ * \f[
+ * dst.rgb = equation(blendFactorDstColor*dst.rgb,
+ * blendFactorSrcColor*src.rgb);
+ * \f]
+ *
+ * Note that when equation is MIN or MAX, the blend factors and constants
+ * are ignored, and are treated as if they were 1.0.
*/
typedef struct {
/**
@@ -2237,16 +2253,9 @@
* blend state will be used for the composite operation. If
* NULL, blending is effectively disabled, which is
* equivalent to a blend equation of ADD, source blend
- * factors of ONE and destination blend factors of ZERO. The
- * blend math is the familiar OpenGL blend math:
- * \f[
- * dst.a = equation(blendFactorDstAlpha*dst.a,
- * blendFactorSrcAlpha*src.a);
- * \f]
- * \f[
- * dst.rgb = equation(blendFactorDstColor*dst.rgb,
- * blendFactorSrcColor*src.rgb);
- * \f]
+ * factors of ONE and destination blend factors of ZERO.
+ * See \ref VdpOutputSurfaceRenderBlendState for details
+ * regarding the mathematics of the blending operation.
* \param[in] flags A set of flags influencing how the
* compositing operation works.
* \arg \ref VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
@@ -2324,16 +2333,9 @@
* blend state will be used for the composite operation. If
* NULL, blending is effectively disabled, which is
* equivalent to a blend equation of ADD, source blend
- * factors of ONE and destination blend factors of ZERO. The
- * blend math is the familiar OpenGL blend math:
- * \f[
- * dst.a = equation(blendFactorDstAlpha*dst.a,
- * blendFactorSrcAlpha*src.a);
- * \f]
- * \f[
- * dst.rgb = equation(blendFactorDstColor*dst.rgb,
- * blendFactorSrcColor*src.rgb);
- * \f]
+ * factors of ONE and destination blend factors of ZERO.
+ * See \ref VdpOutputSurfaceRenderBlendState for details
+ * regarding the mathematics of the blending operation.
* \param[in] flags A set of flags influencing how the
* compositing operation works.
* \arg \ref VDP_OUTPUT_SURFACE_RENDER_ROTATE_0
@@ -3990,6 +3992,14 @@
* Using this technique, an application's response to window resizing may
* simply be to render to, and display, a different region of the surface,
* rather than de-/re-allocation of surfaces to match the updated window size.
+ *
+ * Implementations may impose an upper bound on the number of entries
+ * contained by the presentation queue at a given time. This limit is likely
+ * different to the number of \ref VdpOutputSurface "VdpOutputSurface"s that
+ * may be allocated at a given time. This limit applies to entries in the
+ * QUEUED or VISIBLE state only. In other words, entries that have
+ * transitioned from a QUEUED or VISIBLE state to an IDLE state do not count
+ * toward this limit.
*/
typedef VdpStatus VdpPresentationQueueDisplay(
VdpPresentationQueue presentation_queue,
@@ -4008,10 +4018,11 @@
* that 0 means the surface was never displayed.
* \return VdpStatus The completion status of the operation.
*
- * Note that this API will block indefinitely if queried about
- * the surface most recently added to a presentation queue,
- * since there is no other surface that could possibly replace
- * the queried surface.
+ * Note that this API would block forever if queried about the surface most
+ * recently added to a presentation queue. That is because there would be no
+ * other surface that could possibly replace that surface as the currently
+ * displayed surface, and hence that surface would never become idle. For
+ * that reason, this function will return an error in that case.
*/
typedef VdpStatus VdpPresentationQueueBlockUntilSurfaceIdle(
VdpPresentationQueue presentation_queue,
Modified: packages/libvdpau/trunk/src/Makefile.am
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/Makefile.am?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/src/Makefile.am (original)
+++ packages/libvdpau/trunk/src/Makefile.am Tue Feb 9 20:11:23 2010
@@ -1,15 +1,24 @@
AM_CFLAGS = \
-I$(top_srcdir)/include \
-DVDPAU_MODULEDIR="\"$(moduledir)\"" \
- $(X11_CFLAGS)
+ $(X11_CFLAGS) \
+ $(XEXT_CFLAGS)
lib_LTLIBRARIES = libvdpau.la
libvdpau_la_SOURCES = \
- vdpau_wrapper.c
+ vdpau_wrapper.c \
+ $(DRI2_SOURCES)
+
+if DRI2
+ DRI2_SOURCES = \
+ mesa_dri2.c \
+ mesa_dri2.h
+endif
libvdpau_la_LIBADD = \
- $(DLOPEN_LIBS)
+ $(DLOPEN_LIBS) \
+ $(XEXT_LIBS)
libvdpau_la_LDFLAGS = -version-info 1:0:0 -no-undefined
Modified: packages/libvdpau/trunk/src/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/Makefile.in?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/src/Makefile.in (original)
+++ packages/libvdpau/trunk/src/Makefile.in Tue Feb 9 20:11:23 2010
@@ -72,8 +72,10 @@
"$(DESTDIR)$(libvdpauincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
-libvdpau_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libvdpau_la_OBJECTS = vdpau_wrapper.lo
+libvdpau_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__libvdpau_la_SOURCES_DIST = vdpau_wrapper.c mesa_dri2.c mesa_dri2.h
+ at DRI2_TRUE@am__objects_1 = mesa_dri2.lo
+am_libvdpau_la_OBJECTS = vdpau_wrapper.lo $(am__objects_1)
libvdpau_la_OBJECTS = $(am_libvdpau_la_OBJECTS)
libvdpau_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -92,7 +94,7 @@
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libvdpau_la_SOURCES)
-DIST_SOURCES = $(libvdpau_la_SOURCES)
+DIST_SOURCES = $(am__libvdpau_la_SOURCES_DIST)
HEADERS = $(libvdpauinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
@@ -169,6 +171,8 @@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
+XEXT_CFLAGS = @XEXT_CFLAGS@
+XEXT_LIBS = @XEXT_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -192,6 +196,8 @@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
+dri2proto_CFLAGS = @dri2proto_CFLAGS@
+dri2proto_LIBS = @dri2proto_LIBS@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
@@ -227,14 +233,21 @@
AM_CFLAGS = \
-I$(top_srcdir)/include \
-DVDPAU_MODULEDIR="\"$(moduledir)\"" \
- $(X11_CFLAGS)
+ $(X11_CFLAGS) \
+ $(XEXT_CFLAGS)
lib_LTLIBRARIES = libvdpau.la
libvdpau_la_SOURCES = \
- vdpau_wrapper.c
+ vdpau_wrapper.c \
+ $(DRI2_SOURCES)
+
+ at DRI2_TRUE@DRI2_SOURCES = \
+ at DRI2_TRUE@ mesa_dri2.c \
+ at DRI2_TRUE@ mesa_dri2.h
libvdpau_la_LIBADD = \
- $(DLOPEN_LIBS)
+ $(DLOPEN_LIBS) \
+ $(XEXT_LIBS)
libvdpau_la_LDFLAGS = -version-info 1:0:0 -no-undefined
libvdpauincludedir = $(includedir)/vdpau
@@ -316,6 +329,7 @@
distclean-compile:
-rm -f *.tab.c
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mesa_dri2.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vdpau_wrapper.Plo at am__quote@
.c.o:
Added: packages/libvdpau/trunk/src/mesa_dri2.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/mesa_dri2.c?rev=712&op=file
==============================================================================
--- packages/libvdpau/trunk/src/mesa_dri2.c (added)
+++ packages/libvdpau/trunk/src/mesa_dri2.c Tue Feb 9 20:11:23 2010
@@ -1,0 +1,163 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ * Kristian Høgsberg (krh at redhat.com)
+ * Modified for VDPAU by Aaron Plattner (aplattner at nvidia.com)
+ */
+
+
+#define NEED_REPLIES
+#include <X11/Xlibint.h>
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/dri2proto.h>
+#include "mesa_dri2.h"
+
+static char dri2ExtensionName[] = DRI2_NAME;
+static XExtensionInfo *dri2Info;
+static XEXT_GENERATE_CLOSE_DISPLAY (DRI2CloseDisplay, dri2Info)
+
+static /* const */ XExtensionHooks dri2ExtensionHooks = {
+ NULL, /* create_gc */
+ NULL, /* copy_gc */
+ NULL, /* flush_gc */
+ NULL, /* free_gc */
+ NULL, /* create_font */
+ NULL, /* free_font */
+ DRI2CloseDisplay, /* close_display */
+ NULL, /* wire_to_event */
+ NULL, /* event_to_wire */
+ NULL, /* error */
+ NULL, /* error_string */
+};
+
+static XEXT_GENERATE_FIND_DISPLAY (DRI2FindDisplay,
+ dri2Info,
+ dri2ExtensionName,
+ &dri2ExtensionHooks,
+ 0, NULL)
+
+Bool
+_vdp_DRI2QueryExtension(Display * dpy, int *eventBase, int *errorBase)
+{
+ XExtDisplayInfo *info = DRI2FindDisplay(dpy);
+
+ if (XextHasExtension(info)) {
+ *eventBase = info->codes->first_event;
+ *errorBase = info->codes->first_error;
+ return True;
+ }
+
+ return False;
+}
+
+Bool
+_vdp_DRI2QueryVersion(Display * dpy, int *major, int *minor)
+{
+ XExtDisplayInfo *info = DRI2FindDisplay(dpy);
+ xDRI2QueryVersionReply rep;
+ xDRI2QueryVersionReq *req;
+
+ XextCheckExtension(dpy, info, dri2ExtensionName, False);
+
+ LockDisplay(dpy);
+ GetReq(DRI2QueryVersion, req);
+ req->reqType = info->codes->major_opcode;
+ req->dri2ReqType = X_DRI2QueryVersion;
+ req->majorVersion = DRI2_MAJOR;
+ req->minorVersion = DRI2_MINOR;
+ if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+ *major = rep.majorVersion;
+ *minor = rep.minorVersion;
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return True;
+}
+
+Bool
+_vdp_DRI2Connect(Display * dpy, XID window, char **driverName, char **deviceName)
+{
+ XExtDisplayInfo *info = DRI2FindDisplay(dpy);
+ xDRI2ConnectReply rep;
+ xDRI2ConnectReq *req;
+
+ XextCheckExtension(dpy, info, dri2ExtensionName, False);
+
+ LockDisplay(dpy);
+ GetReq(DRI2Connect, req);
+ req->reqType = info->codes->major_opcode;
+ req->dri2ReqType = X_DRI2Connect;
+ req->window = window;
+ req->driverType = DRI2DriverVDPAU;
+ if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+
+ if (rep.driverNameLength == 0 && rep.deviceNameLength == 0) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+
+ *driverName = Xmalloc(rep.driverNameLength + 1);
+ if (*driverName == NULL) {
+ _XEatData(dpy,
+ ((rep.driverNameLength + 3) & ~3) +
+ ((rep.deviceNameLength + 3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+ _XReadPad(dpy, *driverName, rep.driverNameLength);
+ (*driverName)[rep.driverNameLength] = '\0';
+
+ *deviceName = Xmalloc(rep.deviceNameLength + 1);
+ if (*deviceName == NULL) {
+ Xfree(*driverName);
+ _XEatData(dpy, ((rep.deviceNameLength + 3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+ _XReadPad(dpy, *deviceName, rep.deviceNameLength);
+ (*deviceName)[rep.deviceNameLength] = '\0';
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return True;
+}
Added: packages/libvdpau/trunk/src/mesa_dri2.h
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/mesa_dri2.h?rev=712&op=file
==============================================================================
--- packages/libvdpau/trunk/src/mesa_dri2.h (added)
+++ packages/libvdpau/trunk/src/mesa_dri2.h Tue Feb 9 20:11:23 2010
@@ -1,0 +1,50 @@
+/*
+ * Copyright © 2007,2008 Red Hat, Inc.
+ * Copyright © 2010 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Soft-
+ * ware"), to deal in the Software without restriction, including without
+ * limitation the rights to use, copy, modify, merge, publish, distribute,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, provided that the above copyright
+ * notice(s) and this permission notice appear in all copies of the Soft-
+ * ware and that both the above copyright notice(s) and this permission
+ * notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
+ * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
+ * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
+ * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
+ * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
+ * MANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder shall
+ * not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization of
+ * the copyright holder.
+ *
+ * Authors:
+ * Kristian Høgsberg (krh at redhat.com)
+ * Modified for VDPAU by Aaron Plattner (aplattner at nvidia.com)
+ */
+
+#ifndef _VDP_DRI2_H_
+#define _VDP_DRI2_H_
+
+#include <X11/extensions/dri2tokens.h>
+
+extern Bool
+_vdp_DRI2QueryExtension(Display * display, int *eventBase, int *errorBase);
+
+extern Bool
+_vdp_DRI2QueryVersion(Display * display, int *major, int *minor);
+
+extern Bool
+_vdp_DRI2Connect(Display * display, XID window, char **driverName,
+ char **deviceName);
+
+#endif
Modified: packages/libvdpau/trunk/src/vdpau_wrapper.c
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/src/vdpau_wrapper.c?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/src/vdpau_wrapper.c (original)
+++ packages/libvdpau/trunk/src/vdpau_wrapper.c Tue Feb 9 20:11:23 2010
@@ -21,12 +21,20 @@
* SOFTWARE.
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <dlfcn.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vdpau/vdpau_x11.h>
+#if DRI2
+#include "mesa_dri2.h"
+#include <X11/Xlib.h>
+#endif
typedef void SetDllHandle(
void * driver_dll_handle
@@ -49,6 +57,36 @@
#define DRIVER_LIB_FORMAT "%slibvdpau_%s.so%s"
+static char * _vdp_get_driver_name_from_dri2(
+ Display * display,
+ int screen
+)
+{
+ char * driver_name = NULL;
+#if DRI2
+ Window root = RootWindow(display, screen);
+ int event_base, error_base;
+ int major, minor;
+ char * device_name;
+
+ if (!_vdp_DRI2QueryExtension(display, &event_base, &error_base)) {
+ return NULL;
+ }
+
+ if (!_vdp_DRI2QueryVersion(display, &major, &minor) ||
+ (major < 1 || (major == 1 && minor < 2))) {
+ return NULL;
+ }
+
+ if (!_vdp_DRI2Connect(display, root, &driver_name, &device_name)) {
+ return NULL;
+ }
+
+ XFree(device_name);
+#endif /* DRI2 */
+ return driver_name;
+}
+
VdpStatus vdp_device_create_x11(
Display * display,
int screen,
@@ -58,6 +96,7 @@
)
{
char const * vdpau_driver;
+ char * vdpau_driver_dri2 = NULL;
char vdpau_driver_lib[PATH_MAX];
void * backend_dll;
char const * vdpau_trace;
@@ -65,8 +104,11 @@
VdpDeviceCreateX11 * vdp_imp_device_create_x11;
- /* FIXME: Determine driver name using an X extension */
vdpau_driver = getenv("VDPAU_DRIVER");
+ if (!vdpau_driver) {
+ vdpau_driver = vdpau_driver_dri2 =
+ _vdp_get_driver_name_from_dri2(display, screen);
+ }
if (!vdpau_driver) {
vdpau_driver = "nvidia";
}
@@ -75,6 +117,10 @@
VDPAU_MODULEDIR "/", vdpau_driver, ".1") >=
sizeof(vdpau_driver_lib)) {
fprintf(stderr, "Failed to construct driver path: path too long\n");
+ if (vdpau_driver_dri2) {
+ XFree(vdpau_driver_dri2);
+ vdpau_driver_dri2 = NULL;
+ }
_VDP_ERROR_BREAKPOINT();
return VDP_STATUS_NO_IMPLEMENTATION;
}
@@ -86,6 +132,11 @@
snprintf(vdpau_driver_lib, sizeof(vdpau_driver_lib), DRIVER_LIB_FORMAT,
"", vdpau_driver, "");
backend_dll = dlopen(vdpau_driver_lib, RTLD_NOW | RTLD_GLOBAL);
+ }
+
+ if (vdpau_driver_dri2) {
+ XFree(vdpau_driver_dri2);
+ vdpau_driver_dri2 = NULL;
}
if (!backend_dll) {
Modified: packages/libvdpau/trunk/trace/Makefile.in
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/trace/Makefile.in?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/trace/Makefile.in (original)
+++ packages/libvdpau/trunk/trace/Makefile.in Tue Feb 9 20:11:23 2010
@@ -169,6 +169,8 @@
VERSION = @VERSION@
X11_CFLAGS = @X11_CFLAGS@
X11_LIBS = @X11_LIBS@
+XEXT_CFLAGS = @XEXT_CFLAGS@
+XEXT_LIBS = @XEXT_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -192,6 +194,8 @@
datarootdir = @datarootdir@
distcleancheck_listfiles = @distcleancheck_listfiles@
docdir = @docdir@
+dri2proto_CFLAGS = @dri2proto_CFLAGS@
+dri2proto_LIBS = @dri2proto_LIBS@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
Modified: packages/libvdpau/trunk/trace/vdpau_trace.cpp
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/libvdpau/trunk/trace/vdpau_trace.cpp?rev=712&op=diff
==============================================================================
--- packages/libvdpau/trunk/trace/vdpau_trace.cpp (original)
+++ packages/libvdpau/trunk/trace/vdpau_trace.cpp Tue Feb 9 20:11:23 2010
@@ -397,7 +397,7 @@
(uint32_t)rf->frame_idx
);
}
- fputs("}", _vdp_cap_data.fp);
+ fputs("}}", _vdp_cap_data.fp);
}
break;
case VDP_DECODER_PROFILE_VC1_SIMPLE:
More information about the Pkg-nvidia-devel
mailing list