xf86-video-nouveau-1.0.18/0000755000175000017500000000000014713424677010740 5xf86-video-nouveau-1.0.18/missing0000755000175000017500000001533614713424671012261 #! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: xf86-video-nouveau-1.0.18/Makefile.am0000644000175000017500000000245114713424663012711 # Copyright 2005 Adam Jackson. # # 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 # ADAM JACKSON 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. ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) EXTRA_DIST = ChangeLog INSTALL xf86-video-nouveau-1.0.18/depcomp0000755000175000017500000005602014713424671012232 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: xf86-video-nouveau-1.0.18/install-sh0000755000175000017500000003577614713424671012700 #!/bin/sh # install - install a program, script, or datafile scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 the # rights to use, copy, modify, merge, publish, distribute, sublicense, 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 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 NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Email bug reports to bug-automake@gnu.org. Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: xf86-video-nouveau-1.0.18/aclocal.m40000644000175000017500000037511514713424670012525 # generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. dnl dnl If pkg-config is not found or older than specified, it will result dnl in an empty PKG_CONFIG variable. To avoid widespread issues with dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting. dnl You can specify [PKG_CONFIG=false] as an action instead, which would dnl result in pkg-config tests failing, but no bogus error messages. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [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. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. # XORG_MACROS_VERSION(required-version) # ------------------------------------- # Minimum version: 1.1.0 # # If you're using a macro added in Version 1.1 or newer, include this in # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # # To ensure that this macro is defined, also add: # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ m4_define([vers_have], [1.20.1]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) m4_if(m4_version_compare(vers_have, [$1]), -1, [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) m4_undefine([vers_have]) m4_undefine([maj_have]) m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() # ------------------ # Minimum version: 1.0.0 # # Find cpp program and necessary flags for use in pre-processing text files # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. AC_MSG_CHECKING([if $RAWCPP requires -undef]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef AC_MSG_RESULT([yes]) # under Cygwin unix is still defined even with -undef elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS="-undef -ansi" AC_MSG_RESULT([yes, with -ansi]) else AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then TRADITIONALCPPFLAGS="-traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" AC_MSG_RESULT([yes]) else AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_SUBST(RAWCPPFLAGS) AC_SUBST(TRADITIONALCPPFLAGS) ]) # XORG_PROG_RAWCPP # XORG_MANPAGE_SECTIONS() # ----------------------- # Minimum version: 1.0.0 # # Determine which sections man pages go in for the different man page types # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. # Not sure if there's any better way than just hardcoding by OS name. # Override default settings by setting environment variables # Added MAN_SUBSTS in version 1.8 # Added AC_PROG_SED in version 1.8 AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) case $host_os in solaris*) # Solaris 2.0 - 11.3 use SysV man page section numbers, so we # check for a man page file found in later versions that use # traditional section numbers instead AC_CHECK_FILE([/usr/share/man/man7/attributes.7], [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) ;; *) SYSV_MAN_SECTIONS=false ;; esac if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi AC_SUBST([APP_MAN_SUFFIX]) AC_SUBST([LIB_MAN_SUFFIX]) AC_SUBST([FILE_MAN_SUFFIX]) AC_SUBST([MISC_MAN_SUFFIX]) AC_SUBST([DRIVER_MAN_SUFFIX]) AC_SUBST([ADMIN_MAN_SUFFIX]) AC_SUBST([APP_MAN_DIR]) AC_SUBST([LIB_MAN_DIR]) AC_SUBST([FILE_MAN_DIR]) AC_SUBST([MISC_MAN_DIR]) AC_SUBST([DRIVER_MAN_DIR]) AC_SUBST([ADMIN_MAN_DIR]) XORG_MAN_PAGE="X Version 11" AC_SUBST([XORG_MAN_PAGE]) MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" AC_SUBST([MAN_SUBSTS]) ]) # XORG_MANPAGE_SECTIONS # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) # ------------------------ # Minimum version: 1.7.0 # # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent # provided by xorg-sgml-doctools, if installed. AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) XORG_SGML_PATH= PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], [m4_ifval([$1],[:], [if test x"$cross_compiling" != x"yes" ; then AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], [XORG_SGML_PATH=$prefix/share/sgml]) fi]) ]) # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing # the path and the name of the doc stylesheet if test "x$XORG_SGML_PATH" != "x" ; then AC_MSG_RESULT([$XORG_SGML_PATH]) STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl else AC_MSG_RESULT([no]) fi AC_SUBST(XORG_SGML_PATH) AC_SUBST(STYLESHEET_SRCDIR) AC_SUBST(XSL_STYLESHEET) AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) ]) # XORG_CHECK_SGML_DOCTOOLS # XORG_CHECK_LINUXDOC # ------------------- # Minimum version: 1.0.0 # # Defines the variable MAKE_TEXT if the necessary tools and # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) AC_REQUIRE([XORG_WITH_PS2PDF]) AC_PATH_PROG(LINUXDOC, linuxdoc) AC_MSG_CHECKING([whether to build documentation]) if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no fi AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) AC_MSG_RESULT([$BUILDDOC]) AC_MSG_CHECKING([whether to build pdf documentation]) if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes else BUILDPDFDOC=no fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" MAKE_PDF="$PS2PDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_LINUXDOC # XORG_CHECK_DOCBOOK # ------------------- # Minimum version: 1.0.0 # # Checks for the ability to build output formats from SGML DocBook source. # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) BUILDTXTDOC=no BUILDPDFDOC=no BUILDPSDOC=no BUILDHTMLDOC=no AC_PATH_PROG(DOCBOOKPS, docbook2ps) AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) AC_PATH_PROG(DOCBOOKHTML, docbook2html) AC_PATH_PROG(DOCBOOKTXT, docbook2txt) AC_MSG_CHECKING([whether to build text documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && test x$BUILD_TXTDOC != xno; then BUILDTXTDOC=yes fi AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) AC_MSG_RESULT([$BUILDTXTDOC]) AC_MSG_CHECKING([whether to build PDF documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) AC_MSG_CHECKING([whether to build PostScript documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && test x$BUILD_PSDOC != xno; then BUILDPSDOC=yes fi AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) AC_MSG_RESULT([$BUILDPSDOC]) AC_MSG_CHECKING([whether to build HTML documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && test x$BUILD_HTMLDOC != xno; then BUILDHTMLDOC=yes fi AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) AC_MSG_RESULT([$BUILDHTMLDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-xmlto option, it allows maximum flexibility in making decisions # as whether or not to use the xmlto package. When DEFAULT is not specified, # --with-xmlto assumes 'auto'. # # Interface to module: # HAVE_XMLTO: used in makefiles to conditionally generate documentation # XMLTO: returns the path of the xmlto program found # returns the path set by the user in the environment # --with-xmlto: 'yes' user instructs the module to use xmlto # 'no' user instructs the module not to use xmlto # # Added in version 1.10.0 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation # xmlto for text output requires either lynx, links, or w3m browsers # # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XMLTO],[ AC_ARG_VAR([XMLTO], [Path to xmlto command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xmlto, AS_HELP_STRING([--with-xmlto], [Use xmlto to regenerate documentation (default: ]_defopt[)]), [use_xmlto=$withval], [use_xmlto=]_defopt) m4_undefine([_defopt]) if test "x$use_xmlto" = x"auto"; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) have_xmlto=no else have_xmlto=yes fi elif test "x$use_xmlto" = x"yes" ; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) fi have_xmlto=yes elif test "x$use_xmlto" = x"no" ; then if test "x$XMLTO" != "x"; then AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) fi have_xmlto=no else AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) fi # Test for a minimum version of xmlto, if provided. m4_ifval([$1], [if test "$have_xmlto" = yes; then # scrape the xmlto version AC_MSG_CHECKING([the xmlto version]) xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$xmlto_version]) AS_VERSION_COMPARE([$xmlto_version], [$1], [if test "x$use_xmlto" = xauto; then AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) have_xmlto=no else AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) fi]) fi]) # Test for the ability of xmlto to generate a text target # # NOTE: xmlto 0.0.27 or higher return a non-zero return code in the # following test for empty XML docbook files. # For compatibility reasons use the following empty XML docbook file and if # it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], [# Try it again with a non-empty XML file. cat > conftest.xml << "EOF" EOF AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) ]) # XORG_WITH_XMLTO # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) # -------------------------------------------- # Minimum version: 1.12.0 # Minimum version for optional DEFAULT argument: 1.12.0 # # XSLT (Extensible Stylesheet Language Transformations) is a declarative, # XML-based language used for the transformation of XML documents. # The xsltproc command line tool is for applying XSLT stylesheets to XML documents. # It is used under the cover by xmlto to generate html files from DocBook/XML. # The XSLT processor is often used as a standalone tool for transformations. # It should not be assumed that this tool is used only to work with documnetation. # When DEFAULT is not specified, --with-xsltproc assumes 'auto'. # # Interface to module: # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation # XSLTPROC: returns the path of the xsltproc program found # returns the path set by the user in the environment # --with-xsltproc: 'yes' user instructs the module to use xsltproc # 'no' user instructs the module not to use xsltproc # have_xsltproc: returns yes if xsltproc found in PATH or no # # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XSLTPROC],[ AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xsltproc, AS_HELP_STRING([--with-xsltproc], [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), [use_xsltproc=$withval], [use_xsltproc=]_defopt) m4_undefine([_defopt]) if test "x$use_xsltproc" = x"auto"; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) have_xsltproc=no else have_xsltproc=yes fi elif test "x$use_xsltproc" = x"yes" ; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) fi have_xsltproc=yes elif test "x$use_xsltproc" = x"no" ; then if test "x$XSLTPROC" != "x"; then AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) fi have_xsltproc=no else AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) ]) # XORG_WITH_XSLTPROC # XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.15.0 # # PERL (Practical Extraction and Report Language) is a language optimized for # scanning arbitrary text files, extracting information from those text files, # and printing reports based on that information. # # When DEFAULT is not specified, --with-perl assumes 'auto'. # # Interface to module: # HAVE_PERL: used in makefiles to conditionally scan text files # PERL: returns the path of the perl program found # returns the path set by the user in the environment # --with-perl: 'yes' user instructs the module to use perl # 'no' user instructs the module not to use perl # have_perl: returns yes if perl found in PATH or no # # If the user sets the value of PERL, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PERL],[ AC_ARG_VAR([PERL], [Path to perl command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(perl, AS_HELP_STRING([--with-perl], [Use perl for extracting information from files (default: ]_defopt[)]), [use_perl=$withval], [use_perl=]_defopt) m4_undefine([_defopt]) if test "x$use_perl" = x"auto"; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_WARN([perl not found - cannot extract information and report]) have_perl=no else have_perl=yes fi elif test "x$use_perl" = x"yes" ; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) fi have_perl=yes elif test "x$use_perl" = x"no" ; then if test "x$PERL" != "x"; then AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) fi have_perl=no else AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) ]) # XORG_WITH_PERL # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-asciidoc option, it allows maximum flexibility in making decisions # as whether or not to use the asciidoc package. When DEFAULT is not specified, # --with-asciidoc assumes 'auto'. # # Interface to module: # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation # ASCIIDOC: returns the path of the asciidoc program found # returns the path set by the user in the environment # --with-asciidoc: 'yes' user instructs the module to use asciidoc # 'no' user instructs the module not to use asciidoc # # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_ASCIIDOC],[ AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(asciidoc, AS_HELP_STRING([--with-asciidoc], [Use asciidoc to regenerate documentation (default: ]_defopt[)]), [use_asciidoc=$withval], [use_asciidoc=]_defopt) m4_undefine([_defopt]) if test "x$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) have_asciidoc=no else have_asciidoc=yes fi elif test "x$use_asciidoc" = x"yes" ; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) fi have_asciidoc=yes elif test "x$use_asciidoc" = x"no" ; then if test "x$ASCIIDOC" != "x"; then AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) fi have_asciidoc=no else AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_asciidoc" = yes; then # scrape the asciidoc version AC_MSG_CHECKING([the asciidoc version]) asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` AC_MSG_RESULT([$asciidoc_version]) AS_VERSION_COMPARE([$asciidoc_version], [$1], [if test "x$use_asciidoc" = xauto; then AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) have_asciidoc=no else AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) ]) # XORG_WITH_ASCIIDOC # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) # ------------------------------------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional DOT checking: 1.18.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-doxygen option, it allows maximum flexibility in making decisions # as whether or not to use the doxygen package. When DEFAULT is not specified, # --with-doxygen assumes 'auto'. # # Interface to module: # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation # DOXYGEN: returns the path of the doxygen program found # returns the path set by the user in the environment # --with-doxygen: 'yes' user instructs the module to use doxygen # 'no' user instructs the module not to use doxygen # # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_DOXYGEN],[ AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) AC_ARG_VAR([DOT], [Path to the dot graphics utility]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(doxygen, AS_HELP_STRING([--with-doxygen], [Use doxygen to regenerate documentation (default: ]_defopt[)]), [use_doxygen=$withval], [use_doxygen=]_defopt) m4_undefine([_defopt]) if test "x$use_doxygen" = x"auto"; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) have_doxygen=no else have_doxygen=yes fi elif test "x$use_doxygen" = x"yes" ; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) fi have_doxygen=yes elif test "x$use_doxygen" = x"no" ; then if test "x$DOXYGEN" != "x"; then AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) fi have_doxygen=no else AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_doxygen" = yes; then # scrape the doxygen version AC_MSG_CHECKING([the doxygen version]) doxygen_version=`$DOXYGEN --version 2>/dev/null` AC_MSG_RESULT([$doxygen_version]) AS_VERSION_COMPARE([$doxygen_version], [$1], [if test "x$use_doxygen" = xauto; then AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) have_doxygen=no else AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) fi]) fi]) dnl Check for DOT if we have doxygen. The caller decides if it is mandatory dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: dnl HAVE_DOT = @HAVE_DOT@ HAVE_DOT=no if test "x$have_doxygen" = "xyes"; then AC_PATH_PROG([DOT], [dot]) if test "x$DOT" != "x"; then HAVE_DOT=yes fi fi AC_SUBST([HAVE_DOT]) AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) ]) # XORG_WITH_DOXYGEN # XORG_WITH_GROFF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-groff option, it allows maximum flexibility in making decisions # as whether or not to use the groff package. When DEFAULT is not specified, # --with-groff assumes 'auto'. # # Interface to module: # HAVE_GROFF: used in makefiles to conditionally generate documentation # HAVE_GROFF_MM: the memorandum macros (-mm) package # HAVE_GROFF_MS: the -ms macros package # GROFF: returns the path of the groff program found # returns the path set by the user in the environment # --with-groff: 'yes' user instructs the module to use groff # 'no' user instructs the module not to use groff # # Added in version 1.9.0: # HAVE_GROFF_HTML: groff has dependencies to output HTML format: # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. # psselect from the psutils package. # the ghostcript package. Refer to the grohtml man pages # # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. # # OS and distros often splits groff in a basic and full package, the former # having the groff program and the later having devices, fonts and macros # Checking for the groff executable is not enough. # # If macros are missing, we cannot assume that groff is useless, so we don't # unset HAVE_GROFF or GROFF env variables. # HAVE_GROFF_?? can never be true while HAVE_GROFF is false. # AC_DEFUN([XORG_WITH_GROFF],[ AC_ARG_VAR([GROFF], [Path to groff command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(groff, AS_HELP_STRING([--with-groff], [Use groff to regenerate documentation (default: ]_defopt[)]), [use_groff=$withval], [use_groff=]_defopt) m4_undefine([_defopt]) if test "x$use_groff" = x"auto"; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_WARN([groff not found - documentation targets will be skipped]) have_groff=no else have_groff=yes fi elif test "x$use_groff" = x"yes" ; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) fi have_groff=yes elif test "x$use_groff" = x"no" ; then if test "x$GROFF" != "x"; then AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) fi have_groff=no else AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) fi # We have groff, test for the presence of the macro packages if test "x$have_groff" = x"yes"; then AC_MSG_CHECKING([for ${GROFF} -ms macros]) if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then groff_ms_works=yes else groff_ms_works=no fi AC_MSG_RESULT([$groff_ms_works]) AC_MSG_CHECKING([for ${GROFF} -mm macros]) if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then groff_mm_works=yes else groff_mm_works=no fi AC_MSG_RESULT([$groff_mm_works]) fi # We have groff, test for HTML dependencies, one command per package if test "x$have_groff" = x"yes"; then AC_PATH_PROGS(GS_PATH, [gs gswin32c]) AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) AC_PATH_PROG(PSSELECT_PATH, [psselect]) if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then have_groff_html=yes else have_groff_html=no AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) fi fi # Set Automake conditionals for Makefiles AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF # XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) # --------------------------------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional MIN-VERSION argument: 1.15.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-fop option, it allows maximum flexibility in making decisions # as whether or not to use the fop package. When DEFAULT is not specified, # --with-fop assumes 'auto'. # # Interface to module: # HAVE_FOP: used in makefiles to conditionally generate documentation # FOP: returns the path of the fop program found # returns the path set by the user in the environment # --with-fop: 'yes' user instructs the module to use fop # 'no' user instructs the module not to use fop # # If the user sets the value of FOP, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], [Use fop to regenerate documentation (default: ]_defopt[)]), [use_fop=$withval], [use_fop=]_defopt) m4_undefine([_defopt]) if test "x$use_fop" = x"auto"; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_WARN([fop not found - documentation targets will be skipped]) have_fop=no else have_fop=yes fi elif test "x$use_fop" = x"yes" ; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) fi have_fop=yes elif test "x$use_fop" = x"no" ; then if test "x$FOP" != "x"; then AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) fi have_fop=no else AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) fi # Test for a minimum version of fop, if provided. m4_ifval([$1], [if test "$have_fop" = yes; then # scrape the fop version AC_MSG_CHECKING([for fop minimum version]) fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$fop_version]) AS_VERSION_COMPARE([$fop_version], [$1], [if test "x$use_fop" = xauto; then AC_MSG_WARN([fop version $fop_version found, but $1 needed]) have_fop=no else AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP # XORG_WITH_M4([MIN-VERSION]) # --------------------------- # Minimum version: 1.19.0 # # This macro attempts to locate an m4 macro processor which supports # -I option and is only useful for modules relying on M4 in order to # expand macros in source code files. # # Interface to module: # M4: returns the path of the m4 program found # returns the path set by the user in the environment # AC_DEFUN([XORG_WITH_M4], [ AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], [AC_MSG_ERROR([could not find m4 that supports -I option])], [$PATH:/usr/gnu/bin])]) AC_SUBST([M4], [$ac_cv_path_M4]) ]) # XORG_WITH_M4 # XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-ps2pdf option, it allows maximum flexibility in making decisions # as whether or not to use the ps2pdf package. When DEFAULT is not specified, # --with-ps2pdf assumes 'auto'. # # Interface to module: # HAVE_PS2PDF: used in makefiles to conditionally generate documentation # PS2PDF: returns the path of the ps2pdf program found # returns the path set by the user in the environment # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf # 'no' user instructs the module not to use ps2pdf # # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PS2PDF],[ AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(ps2pdf, AS_HELP_STRING([--with-ps2pdf], [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) m4_undefine([_defopt]) if test "x$use_ps2pdf" = x"auto"; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) have_ps2pdf=no else have_ps2pdf=yes fi elif test "x$use_ps2pdf" = x"yes" ; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) fi have_ps2pdf=yes elif test "x$use_ps2pdf" = x"no" ; then if test "x$PS2PDF" != "x"; then AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) fi have_ps2pdf=no else AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) ]) # XORG_WITH_PS2PDF # XORG_ENABLE_DOCS (enable_docs=yes) # ---------------- # Minimum version: 1.6.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a builder to skip all # documentation targets except traditional man pages. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DOCS: used in makefiles to conditionally generate documentation # --enable-docs: 'yes' user instructs the module to generate docs # 'no' user instructs the module not to generate docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ m4_define([docs_default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], [Enable building the documentation (default: ]docs_default[)]), [build_docs=$enableval], [build_docs=]docs_default) m4_undefine([docs_default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) ]) # XORG_ENABLE_DOCS # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all developer documentation. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs # --enable-devel-docs: 'yes' user instructs the module to generate developer docs # 'no' user instructs the module not to generate developer docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ m4_define([devel_default], m4_default([$1], [yes])) AC_ARG_ENABLE(devel-docs, AS_HELP_STRING([--enable-devel-docs], [Enable building the developer documentation (default: ]devel_default[)]), [build_devel_docs=$enableval], [build_devel_docs=]devel_default) m4_undefine([devel_default]) AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) AC_MSG_CHECKING([whether to build developer documentation]) AC_MSG_RESULT([$build_devel_docs]) ]) # XORG_ENABLE_DEVEL_DOCS # XORG_ENABLE_SPECS (enable_specs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all functional specification targets. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_SPECS: used in makefiles to conditionally generate specs # --enable-specs: 'yes' user instructs the module to generate specs # 'no' user instructs the module not to generate specs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_SPECS],[ m4_define([spec_default], m4_default([$1], [yes])) AC_ARG_ENABLE(specs, AS_HELP_STRING([--enable-specs], [Enable building the specs (default: ]spec_default[)]), [build_specs=$enableval], [build_specs=]spec_default) m4_undefine([spec_default]) AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) ]) # XORG_ENABLE_SPECS # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) # ---------------------------------------------- # Minimum version: 1.13.0 # # This macro enables a builder to enable/disable unit testing # It makes no assumption about the test cases implementation # Test cases may or may not use Automake "Support for test suites" # They may or may not use the software utility library GLib # # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. # The variable enable_unit_tests is used by other macros in this file. # # Interface to module: # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests # enable_unit_tests: used in configure.ac for additional configuration # --enable-unit-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ AC_BEFORE([$0], [XORG_WITH_GLIB]) AC_BEFORE([$0], [XORG_LD_WRAP]) AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [Enable building unit test cases (default: ]_defopt[)]), [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_unit_tests]) ]) # XORG_ENABLE_UNIT_TESTS # XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) # ------------------------------------------------------ # Minimum version: 1.17.0 # # This macro enables a builder to enable/disable integration testing # It makes no assumption about the test cases' implementation # Test cases may or may not use Automake "Support for test suites" # # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support # usually requires less dependencies and may be built and run under less # stringent environments than integration tests. # # Interface to module: # ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests # enable_integration_tests: used in configure.ac for additional configuration # --enable-integration-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], [Enable building integration test cases (default: ]_defopt[)]), [enable_integration_tests=$enableval], [enable_integration_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], [test "x$enable_integration_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_integration_tests]) ]) # XORG_ENABLE_INTEGRATION_TESTS # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.13.0 # # GLib is a library which provides advanced data structures and functions. # This macro enables a module to test for the presence of Glib. # # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit # test support usually requires less dependencies and may be built and run under # less stringent environments than integration tests. # # Interface to module: # HAVE_GLIB: used in makefiles to conditionally build targets # with_glib: used in configure.ac to know if GLib has been found # --with-glib: 'yes' user instructs the module to use glib # 'no' user instructs the module not to use glib # AC_DEFUN([XORG_WITH_GLIB],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], [Use GLib library for unit testing (default: ]_defopt[)]), [with_glib=$withval], [with_glib=]_defopt) m4_undefine([_defopt]) have_glib=no # Do not probe GLib if user explicitly disabled unit testing if test "x$enable_unit_tests" != x"no"; then # Do not probe GLib if user explicitly disabled it if test "x$with_glib" != x"no"; then m4_ifval( [$1], [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] ) fi fi # Not having GLib when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Having unit testing disabled when GLib has been explicitly requested is an error if test "x$enable_unit_tests" = x"no"; then if test "x$with_glib" = x"yes"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Not having GLib when it has been explicitly requested is an error if test "x$with_glib" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) fi fi AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) ]) # XORG_WITH_GLIB # XORG_LD_WRAP([required|optional]) # --------------------------------- # Minimum version: 1.13.0 # # Check if linker supports -wrap, passed via compiler flags # # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Argument added in 1.16.0 - default is "required", to match existing behavior # of returning an error if enable_unit_tests is yes, and ld -wrap is not # available, an argument of "optional" allows use when some unit tests require # ld -wrap and others do not. # AC_DEFUN([XORG_LD_WRAP],[ XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], [AC_LANG_PROGRAM([#include void __wrap_exit(int status) { return; }], [exit(0);])]) # Not having ld wrap when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then if test "x$have_ld_wrap" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) fi fi AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) # ]) # XORG_LD_WRAP # XORG_CHECK_LINKER_FLAGS # ----------------------- # SYNOPSIS # # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) # # DESCRIPTION # # Check whether the given linker FLAGS work with the current language's # linker, or whether they give an error. # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # PROGRAM-SOURCE is the program source to link with, if needed # # NOTE: Based on AX_CHECK_COMPILER_FLAGS. # # LICENSE # # Copyright (c) 2009 Mike Frysinger # Copyright (c) 2009 Steven G. Johnson # Copyright (c) 2009 Matteo Frigo # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well.# AC_DEFUN([XORG_CHECK_LINKER_FLAGS], [AC_MSG_CHECKING([whether the linker accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS]) eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) AC_MSG_RESULT($xorg_check_linker_flags) if test "x$xorg_check_linker_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ]) # XORG_CHECK_LINKER_FLAGS # XORG_MEMORY_CHECK_FLAGS # ----------------------- # Minimum version: 1.16.0 # # This macro attempts to find appropriate memory checking functionality # for various platforms which unit testing code may use to catch various # forms of memory allocation and access errors in testing. # # Interface to module: # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging # Usually added to TESTS_ENVIRONMENT in Makefile.am # # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. # AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], [Environment variables to enable memory checking in tests]) # Check for different types of support on different platforms case $host_os in solaris*) AC_CHECK_LIB([umem], [umem_alloc], [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) ;; *-gnu*) # GNU libc - Value is used as a single byte bit pattern, # both directly and inverted, so should not be 0 or 255. malloc_debug_env='MALLOC_PERTURB_=15' ;; darwin*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' ;; *bsd*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1' ;; esac # User supplied flags override default flags if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" fi AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) ]) # XORG_WITH_LINT # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 # # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if # malloc(0) returns NULL. Packages should add one of these cflags to # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) AC_MSG_CHECKING([whether malloc(0) returns NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then AC_CACHE_VAL([xorg_cv_malloc0_returns_null], [AC_RUN_IFELSE([AC_LANG_PROGRAM([ #include ],[ char *m0, *r0, *c0, *p; m0 = malloc(0); p = malloc(10); r0 = realloc(p,0); c0 = calloc(0,10); exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); ])], [xorg_cv_malloc0_returns_null=yes], [xorg_cv_malloc0_returns_null=no])]) MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null fi AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" else MALLOC_ZERO_CFLAGS="" XMALLOC_ZERO_CFLAGS="" XTMALLOC_ZERO_CFLAGS="" fi AC_SUBST([MALLOC_ZERO_CFLAGS]) AC_SUBST([XMALLOC_ZERO_CFLAGS]) AC_SUBST([XTMALLOC_ZERO_CFLAGS]) ]) # XORG_CHECK_MALLOC_ZERO # XORG_WITH_LINT() # ---------------- # Minimum version: 1.1.0 # # This macro enables the use of a tool that flags some suspicious and # non-portable constructs (likely to be bugs) in C language source code. # It will attempt to locate the tool and use appropriate options. # There are various lint type tools on different platforms. # # Interface to module: # LINT: returns the path to the tool found on the platform # or the value set to LINT on the configure cmd line # also an Automake conditional # LINT_FLAGS: an Automake variable with appropriate flags # # --with-lint: 'yes' user instructs the module to use lint # 'no' user instructs the module not to use lint (default) # # If the user sets the value of LINT, AC_PATH_PROG skips testing the path. # If the user sets the value of LINT_FLAGS, they are used verbatim. # AC_DEFUN([XORG_WITH_LINT],[ AC_ARG_VAR([LINT], [Path to a lint-style command]) AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) # Obtain platform specific info like program name and options # The lint program on FreeBSD and NetBSD is different from the one on Solaris case $host_os in *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) lint_name=splint lint_options="-badflag" ;; *freebsd* | *netbsd*) lint_name=lint lint_options="-u -b" ;; *solaris*) lint_name=lint lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" ;; esac # Test for the presence of the program (either guessed by the code or spelled out by the user) if test "x$use_lint" = x"yes" ; then AC_PATH_PROG([LINT], [$lint_name]) if test "x$LINT" = "x"; then AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) fi elif test "x$use_lint" = x"no" ; then if test "x$LINT" != "x"; then AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) fi else AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) fi # User supplied flags override default flags if test "x$LINT_FLAGS" != "x"; then lint_options=$LINT_FLAGS fi AC_SUBST([LINT_FLAGS],[$lint_options]) AM_CONDITIONAL(LINT, [test "x$LINT" != x]) ]) # XORG_WITH_LINT # XORG_LINT_LIBRARY(LIBNAME) # -------------------------- # Minimum version: 1.1.0 # # Sets up flags for building lint libraries for checking programs that call # functions in the library. # # Interface to module: # LINTLIB - Automake variable with the name of lint library file to make # MAKE_LINT_LIB - Automake conditional # # --enable-lint-library: - 'yes' user instructs the module to created a lint library # - 'no' user instructs the module not to create a lint library (default) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" = x"yes" ; then LINTLIB=llib-l$1.ln if test "x$LINT" = "x"; then AC_MSG_ERROR([Cannot make lint library without --with-lint]) fi elif test "x$make_lint_lib" != x"no" ; then AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) fi AC_SUBST(LINTLIB) AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY # XORG_COMPILER_BRAND # ------------------- # Minimum version: 1.14.0 # # Checks for various brands of compilers and sets flags as appropriate: # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" # clang compiler - sets CLANGCC to "yes" # Intel compiler - sets INTELCC to "yes" # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" # AC_DEFUN([XORG_COMPILER_BRAND], [ AC_LANG_CASE( [C], [ dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC dnl and complains that AC_PROG_CC_C99 is obsolete m4_version_prereq([2.70], [AC_REQUIRE([AC_PROG_CC])], [AC_REQUIRE([AC_PROG_CC_C99])]) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) ] ) AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) ]) # XORG_COMPILER_BRAND # XORG_TESTSET_CFLAG(, , [, ...]) # --------------- # Minimum version: 1.16.0 # # Test if the compiler works when passed the given flag as a command line argument. # If it succeeds, the flag is appended to the given variable. If not, it tries the # next flag in the list until there are no more options. # # Note that this does not guarantee that the compiler supports the flag as some # compilers will simply ignore arguments that they do not understand, but we do # attempt to weed out false positives by using -Werror=unknown-warning-option and # -Werror=unused-command-line-argument # AC_DEFUN([XORG_TESTSET_CFLAG], [ m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) AC_LANG_COMPILER_REQUIRE AC_LANG_CASE( [C], [ dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC dnl and complains that AC_PROG_CC_C99 is obsolete m4_version_prereq([2.70], [AC_REQUIRE([AC_PROG_CC])], [AC_REQUIRE([AC_PROG_CC_C99])]) define([PREFIX], [C]) define([CACHE_PREFIX], [cc]) define([COMPILER], [$CC]) ], [C++], [ define([PREFIX], [CXX]) define([CACHE_PREFIX], [cxx]) define([COMPILER], [$CXX]) ] ) [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], [eval $cacheid=yes], [eval $cacheid=no])]) PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" eval supported=\$$cacheid AC_MSG_RESULT([$supported]) if test "$supported" = "yes" ; then $1="$$1 ]flag[" found="yes" fi fi ]) ]) # XORG_TESTSET_CFLAG # XORG_COMPILER_FLAGS # --------------- # Minimum version: 1.16.0 # # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line # arguments supported by the selected compiler which do NOT alter the generated # code. These arguments will cause the compiler to print various warnings # during compilation AND turn a conservative set of warnings into errors. # # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in # future versions of util-macros as options are added to new compilers. # AC_DEFUN([XORG_COMPILER_FLAGS], [ AC_REQUIRE([XORG_COMPILER_BRAND]) AC_ARG_ENABLE(selective-werror, AS_HELP_STRING([--disable-selective-werror], [Turn off selective compiler errors. (default: enabled)]), [SELECTIVE_WERROR=$enableval], [SELECTIVE_WERROR=yes]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then [BASE_]PREFIX[FLAGS]="-v" else [BASE_]PREFIX[FLAGS]="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) AC_LANG_CASE( [C], [ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) ] ) # This chunk adds additional warnings that could catch undesired effects. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidentally get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION else AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) fi AC_SUBST([BASE_]PREFIX[FLAGS]) ]) # XORG_COMPILER_FLAGS # XORG_CWARNFLAGS # --------------- # Minimum version: 1.2.0 # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) # # Defines CWARNFLAGS to enable C compiler warnings. # # This function is deprecated because it defines -fno-strict-aliasing # which alters the code generated by the compiler. If -fno-strict-aliasing # is needed, then it should be added explicitly in the module when # it is updated to use BASE_CFLAGS. # AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_REQUIRE([XORG_COMPILER_BRAND]) AC_LANG_CASE( [C], [ CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi AC_SUBST(CWARNFLAGS) ] ) ]) # XORG_CWARNFLAGS # XORG_STRICT_OPTION # ----------------------- # Minimum version: 1.3.0 # # Add configure option to enable strict compilation flags, such as treating # warnings as fatal errors. # If --enable-strict-compilation is passed to configure, adds strict flags to # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. # # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or # when strict compilation is unconditionally desired. AC_DEFUN([XORG_STRICT_OPTION], [ AC_REQUIRE([XORG_CWARNFLAGS]) AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_ARG_ENABLE(strict-compilation, AS_HELP_STRING([--enable-strict-compilation], [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) [STRICT_]PREFIX[FLAGS]="" XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) if test "x$STRICT_COMPILE" = "xyes"; then [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) fi AC_SUBST([STRICT_]PREFIX[FLAGS]) AC_SUBST([BASE_]PREFIX[FLAGS]) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) ]) # XORG_STRICT_OPTION # XORG_DEFAULT_NOCODE_OPTIONS # --------------------------- # Minimum version: 1.20.0 # # Defines default options for X.Org modules which don't compile code, # such as fonts, bitmaps, cursors, and docs. # AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_RELEASE_VERSION XORG_CHANGELOG XORG_INSTALL XORG_MANPAGE_SECTIONS m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) ]) # XORG_DEFAULT_NOCODE_OPTIONS # XORG_DEFAULT_OPTIONS # -------------------- # Minimum version: 1.3.0 # # Defines default options for X.Org modules which compile code. # AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_COMPILER_FLAGS XORG_CWARNFLAGS XORG_STRICT_OPTION XORG_DEFAULT_NOCODE_OPTIONS ]) # XORG_DEFAULT_OPTIONS # XORG_INSTALL() # ---------------- # Minimum version: 1.4.0 # # Defines the variable INSTALL_CMD as the command to copy # INSTALL from $prefix/share/util-macros. # AC_DEFUN([XORG_INSTALL], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ touch \$(top_srcdir)/INSTALL; \ echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], [Major version of this package]) PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], [$PVM], [Minor version of this package]) PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], [$PVP], [Patch version of this package]) ]) # XORG_CHANGELOG() # ---------------- # Minimum version: 1.2.0 # # Defines the variable CHANGELOG_CMD as the command to generate # ChangeLog from git. # # AC_DEFUN([XORG_CHANGELOG], [ CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ touch \$(top_srcdir)/ChangeLog; \ echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_DRIVER_CHECK_EXT(MACRO, PROTO) # -------------------------- # Checks for the MACRO define in xorg-server.h (from the sdk). If it # is defined, then add the given PROTO to $REQUIRED_MODULES. AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "xorg-server.h" #if !defined $1 #error $1 not defined #endif ]])], [_EXT_CHECK=yes], [_EXT_CHECK=no]) CFLAGS="$SAVE_CFLAGS" AC_MSG_CHECKING([if $1 is defined]) AC_MSG_RESULT([$_EXT_CHECK]) if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES $2" fi ]) # Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) xf86-video-nouveau-1.0.18/src/0000755000175000017500000000000014713424677011527 5xf86-video-nouveau-1.0.18/src/nouveau_sync.c0000644000175000017500000000707614713424663014336 /* * Copyright © 2013-2014 Intel Corporation * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that copyright * notice and this permission notice appear in supporting documentation, and * that the name of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL 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 PERFORMANCE * OF THIS SOFTWARE. */ #include "nouveau_sync.h" #ifdef DRI3 #include "nv_include.h" static DevPrivateKeyRec nouveau_syncobj_key; struct nouveau_syncobj { SyncFenceSetTriggeredFunc SetTriggered; }; #define nouveau_syncobj(fence) \ dixLookupPrivate(&(fence)->devPrivates, &nouveau_syncobj_key) struct nouveau_syncctx { SyncScreenCreateFenceFunc CreateFence; }; #define nouveau_syncctx(screen) ({ \ ScrnInfoPtr scrn = xf86ScreenToScrn(screen); \ NVPtr pNv = NVPTR(scrn); \ pNv->sync; \ }) static void nouveau_syncobj_flush(SyncFence *fence) { struct nouveau_syncobj *pobj = nouveau_syncobj(fence); ScrnInfoPtr scrn = xf86ScreenToScrn(fence->pScreen); NVPtr pNv = NVPTR(scrn); SyncFenceFuncsPtr func = &fence->funcs; if (pNv->Flush) pNv->Flush(scrn); swap(pobj, func, SetTriggered); func->SetTriggered(fence); swap(pobj, func, SetTriggered); } static void nouveau_syncobj_new(ScreenPtr screen, SyncFence *fence, Bool triggered) { struct nouveau_syncctx *priv = nouveau_syncctx(screen); struct nouveau_syncobj *pobj = nouveau_syncobj(fence); SyncScreenFuncsPtr sync = miSyncGetScreenFuncs(screen); SyncFenceFuncsPtr func = &fence->funcs; swap(priv, sync, CreateFence); sync->CreateFence(screen, fence, triggered); swap(priv, sync, CreateFence); wrap(pobj, func, SetTriggered, nouveau_syncobj_flush); } void nouveau_sync_fini(ScreenPtr screen) { struct nouveau_syncctx *priv = nouveau_syncctx(screen); SyncScreenFuncsPtr sync = miSyncGetScreenFuncs(screen); ScrnInfoPtr scrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(scrn); unwrap(priv, sync, CreateFence); pNv->sync = NULL; free(priv); } Bool nouveau_sync_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(scrn); struct nouveau_syncctx *priv; SyncScreenFuncsPtr sync; priv = pNv->sync = calloc(1, sizeof(*priv)); if (!priv) return FALSE; if (!miSyncShmScreenInit(screen)) return FALSE; if (!dixPrivateKeyRegistered(&nouveau_syncobj_key)) { if (!dixRegisterPrivateKey(&nouveau_syncobj_key, PRIVATE_SYNC_FENCE, sizeof(struct nouveau_syncobj))) return FALSE; } sync = miSyncGetScreenFuncs(screen); wrap(priv, sync, CreateFence, nouveau_syncobj_new); return TRUE; } #endif xf86-video-nouveau-1.0.18/src/vl_hwmc.c0000644000175000017500000000720014713424663013244 #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "vl_hwmc.h" #include #include #include #include #include #include "compat-api.h" #define FOURCC_RGB 0x0000003 #define XVIMAGE_RGB \ { \ FOURCC_RGB, \ XvRGB, \ LSBFirst, \ { \ 'R', 'G', 'B', 0x00, \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71 \ }, \ 32, \ XvPacked, \ 1, \ 24, 0x00FF0000, 0x0000FF00, 0x000000FF, \ 0, 0, 0, \ 0, 0, 0, \ 0, 0, 0, \ { \ 'B','G','R','X', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 \ }, \ XvTopToBottom \ } static int subpicture_index_list[] = { FOURCC_RGB, FOURCC_IA44, FOURCC_AI44 }; static XF86MCImageIDList subpicture_list = { 3, subpicture_index_list }; static XF86MCSurfaceInfoRec yv12_mpeg2_surface = { FOURCC_YV12, XVMC_CHROMA_FORMAT_420, 0, 2048, 2048, 2048, 2048, XVMC_IDCT | XVMC_MOCOMP | XVMC_MPEG_2, XVMC_SUBPICTURE_INDEPENDENT_SCALING | XVMC_BACKEND_SUBPICTURE, &subpicture_list }; static XF86MCSurfaceInfoRec uyvy_mpeg2_surface = { FOURCC_UYVY, XVMC_CHROMA_FORMAT_422, 0, 2048, 2048, 2048, 2048, XVMC_IDCT | XVMC_MOCOMP | XVMC_MPEG_2, XVMC_SUBPICTURE_INDEPENDENT_SCALING | XVMC_BACKEND_SUBPICTURE, &subpicture_list }; static XF86MCSurfaceInfoPtr surfaces[] = { (XF86MCSurfaceInfoPtr)&yv12_mpeg2_surface, (XF86MCSurfaceInfoPtr)&uyvy_mpeg2_surface }; static XF86ImageRec rgb_subpicture = XVIMAGE_RGB; static XF86ImageRec ia44_subpicture = XVIMAGE_IA44; static XF86ImageRec ai44_subpicture = XVIMAGE_AI44; static XF86ImagePtr subpictures[] = { (XF86ImagePtr)&rgb_subpicture, (XF86ImagePtr)&ia44_subpicture, (XF86ImagePtr)&ai44_subpicture }; static XF86MCAdaptorRec adaptor_template = { "", 2, surfaces, 3, subpictures, (xf86XvMCCreateContextProcPtr)NULL, (xf86XvMCDestroyContextProcPtr)NULL, (xf86XvMCCreateSurfaceProcPtr)NULL, (xf86XvMCDestroySurfaceProcPtr)NULL, (xf86XvMCCreateSubpictureProcPtr)NULL, (xf86XvMCDestroySubpictureProcPtr)NULL }; XF86MCAdaptorPtr vlCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name) { XF86MCAdaptorPtr adaptor; ScrnInfoPtr pScrn; assert(pScreen); assert(xv_adaptor_name); pScrn = xf86ScreenToScrn(pScreen); adaptor = xf86XvMCCreateAdaptorRec(); if (!adaptor) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[XvMC] Memory allocation failed.\n"); return NULL; } *adaptor = adaptor_template; adaptor->name = xv_adaptor_name; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[XvMC] Associated with %s.\n", xv_adaptor_name); return adaptor; } void vlDestroyAdaptorXvMC(XF86MCAdaptorPtr adaptor) { assert(adaptor); xf86XvMCDestroyAdaptorRec(adaptor); } /* TODO: Manage adaptor list and adaptor rec memory internally */ void vlInitXvMC(ScreenPtr pScreen, unsigned int num_adaptors, XF86MCAdaptorPtr *adaptors) { ScrnInfoPtr pScrn; int i; assert(pScreen); assert(adaptors); for (i = 0; i < num_adaptors; ++i) assert(adaptors[i]); pScrn = xf86ScreenToScrn(pScreen); if (!xf86XvMCScreenInit(pScreen, num_adaptors, adaptors)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[XvMC] Failed to initialize extension.\n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[XvMC] Extension initialized.\n"); #if (XvMCVersion > 1) || (XvMCRevision > 0) /* if (xf86XvMCRegisterDRInfo(pScreen, "XvMCg3dvl", "0:0.0", -1, -1, -1) != Success) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "[XvMC] Failed to register client library, using XvMCConfig.\n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[XvMC] Registered client library.\n"); */ #endif } xf86-video-nouveau-1.0.18/src/nouveau_present.h0000644000175000017500000000070314713424663015035 #ifndef __NOUVEAU_PRESENT_H__ #define __NOUVEAU_PRESENT_H__ #include "xorg-server.h" #include "scrnintstr.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif #if defined(DRI3) #include "present.h" Bool nouveau_present_init(ScreenPtr pScreen); void nouveau_present_fini(ScreenPtr pScreen); #else static inline Bool nouveau_present_init(ScreenPtr pScreen) { return FALSE; } static inline void nouveau_present_fini(ScreenPtr pScreen) { } #endif #endif xf86-video-nouveau-1.0.18/src/nv_accel_common.c0000644000175000017500000004740714713424663014744 /* * Copyright 2007 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv_m2mf.xml.h" #include "hwdefs/nv01_2d.xml.h" #include "hwdefs/nv50_2d.xml.h" #include "nv04_accel.h" Bool nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, int usage_hint, int *pitch, struct nouveau_bo **bo) { NVPtr pNv = NVPTR(scrn); Bool scanout = (usage_hint & NOUVEAU_CREATE_PIXMAP_SCANOUT); Bool tiled = (usage_hint & NOUVEAU_CREATE_PIXMAP_TILED); Bool shared = FALSE; union nouveau_bo_config cfg = {}; int flags = NOUVEAU_BO_MAP | (bpp >= 8 ? NOUVEAU_BO_VRAM : 0); int cpp = bpp / 8, ret; #ifdef NOUVEAU_PIXMAP_SHARING shared = ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED); #endif flags = NOUVEAU_BO_MAP; if (bpp >= 8) flags |= shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM; if (scanout && pNv->tiled_scanout) tiled = TRUE; if (pNv->Architecture >= NV_TESLA) { if (!scanout && bpp >= 8 && !shared) tiled = TRUE; *pitch = NOUVEAU_ALIGN(width * cpp, !tiled ? 256 : 64); } else { *pitch = NOUVEAU_ALIGN(width * cpp, 64); } if (tiled) { if (pNv->Architecture >= NV_FERMI) { if (height > 64) cfg.nvc0.tile_mode = 0x040; else if (height > 32) cfg.nvc0.tile_mode = 0x030; else if (height > 16) cfg.nvc0.tile_mode = 0x020; else if (height > 8) cfg.nvc0.tile_mode = 0x010; else cfg.nvc0.tile_mode = 0x000; if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA) cfg.nvc0.memtype = (bpp == 16) ? 0x01 : 0x11; else cfg.nvc0.memtype = 0xfe; height = NOUVEAU_ALIGN(height, NVC0_TILE_HEIGHT(cfg.nvc0.tile_mode)); } else if (pNv->Architecture >= NV_TESLA) { if (height > 32) cfg.nv50.tile_mode = 0x040; else if (height > 16) cfg.nv50.tile_mode = 0x030; else if (height > 8) cfg.nv50.tile_mode = 0x020; else if (height > 4) cfg.nv50.tile_mode = 0x010; else cfg.nv50.tile_mode = 0x000; if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA) cfg.nv50.memtype = (bpp == 16) ? 0x16c : 0x128; else if (usage_hint & NOUVEAU_CREATE_PIXMAP_SCANOUT) cfg.nv50.memtype = (bpp == 16) ? 0x070 : 0x07a; else cfg.nv50.memtype = 0x070; height = NOUVEAU_ALIGN(height, NV50_TILE_HEIGHT(cfg.nv50.tile_mode)); } else { int pitch_align = max( pNv->dev->chipset >= 0x40 ? 1024 : 256, round_down_pow2(*pitch / 4)); *pitch = NOUVEAU_ALIGN(*pitch, pitch_align); cfg.nv04.surf_pitch = *pitch; } } if (pNv->Architecture < NV_TESLA) { if (bpp == 16) cfg.nv04.surf_flags |= NV04_BO_16BPP; if (bpp == 32) cfg.nv04.surf_flags |= NV04_BO_32BPP; if (usage_hint & NOUVEAU_CREATE_PIXMAP_ZETA) cfg.nv04.surf_flags |= NV04_BO_ZETA; } if (usage_hint & NOUVEAU_CREATE_PIXMAP_SCANOUT) flags |= NOUVEAU_BO_CONTIG; ret = nouveau_bo_new(pNv->dev, flags, 0, *pitch * height, &cfg, bo); if (ret) { ErrorF("failure to allocate surface %dx%d@%d (pitch %d): %d\n", width, height, bpp, *pitch, ret); return FALSE; } return TRUE; } void NV11SyncToVBlank(PixmapPtr ppix, BoxPtr box) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int head; xf86CrtcPtr crtc; if (!nouveau_exa_pixmap_is_onscreen(ppix)) return; crtc = nouveau_pick_best_crtc(pScrn, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1); if (!crtc) return; if (!PUSH_SPACE(push, 8)) return; head = drmmode_head(crtc); BEGIN_NV04(push, NV15_BLIT(FLIP_INCR_WRITE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV15_BLIT(FLIP_CRTC_INCR_READ), 1); PUSH_DATA (push, head); BEGIN_NV04(push, SUBC_BLIT(0x00000100), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV15_BLIT(FLIP_WAIT), 1); PUSH_DATA (push, 0); } static Bool NVAccelInitDmaNotifier0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_object *chan = pNv->channel; struct nv04_notify ntfy = { .length = 32 }; if (nouveau_object_new(chan, NvDmaNotifier0, NOUVEAU_NOTIFIER_CLASS, &ntfy, sizeof(ntfy), &pNv->notify0)) return FALSE; return TRUE; } static Bool NVAccelInitNull(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); if (nouveau_object_new(pNv->channel, NvNullObject, NV01_NULL_CLASS, NULL, 0, &pNv->NvNull)) return FALSE; return TRUE; } static Bool NVAccelInitContextSurfaces(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; uint32_t class; class = (pNv->Architecture >= NV_ARCH_10) ? NV10_SURFACE_2D_CLASS : NV04_SURFACE_2D_CLASS; if (nouveau_object_new(pNv->channel, NvContextSurfaces, class, NULL, 0, &pNv->NvContextSurfaces)) return FALSE; if (!PUSH_SPACE(push, 8)) return FALSE; BEGIN_NV04(push, NV01_SUBC(SF2D, OBJECT), 1); PUSH_DATA (push, pNv->NvContextSurfaces->handle); BEGIN_NV04(push, NV04_SF2D(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV04_SF2D(DMA_IMAGE_SOURCE), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); return TRUE; } static Bool NVAccelInitContextBeta1(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvContextBeta1, NV01_BETA_CLASS, NULL, 0, &pNv->NvContextBeta1)) return FALSE; if (!PUSH_SPACE(push, 4)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvContextBeta1->handle); BEGIN_NV04(push, NV01_BETA(BETA_1D31), 1); /*alpha factor*/ PUSH_DATA (push, 0xff << 23); return TRUE; } static Bool NVAccelInitContextBeta4(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvContextBeta4, NV04_BETA4_CLASS, NULL, 0, &pNv->NvContextBeta4)) return FALSE; if (!PUSH_SPACE(push, 4)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvContextBeta4->handle); BEGIN_NV04(push, NV04_BETA4(BETA_FACTOR), 1); /*RGBA factor*/ PUSH_DATA (push, 0xffff0000); return TRUE; } Bool NVAccelGetCtxSurf2DFormatFromPixmap(PixmapPtr pPix, int *fmt_ret) { switch (pPix->drawable.bitsPerPixel) { case 32: *fmt_ret = NV04_SURFACE_2D_FORMAT_A8R8G8B8; break; case 24: *fmt_ret = NV04_SURFACE_2D_FORMAT_X8R8G8B8_Z8R8G8B8; break; case 16: if (pPix->drawable.depth == 16) *fmt_ret = NV04_SURFACE_2D_FORMAT_R5G6B5; else *fmt_ret = NV04_SURFACE_2D_FORMAT_X1R5G5B5_Z1R5G5B5; break; case 8: *fmt_ret = NV04_SURFACE_2D_FORMAT_Y8; break; default: return FALSE; } return TRUE; } Bool NVAccelGetCtxSurf2DFormatFromPicture(PicturePtr pPict, int *fmt_ret) { switch (pPict->format) { case PICT_a8r8g8b8: *fmt_ret = NV04_SURFACE_2D_FORMAT_A8R8G8B8; break; case PICT_x8r8g8b8: *fmt_ret = NV04_SURFACE_2D_FORMAT_X8R8G8B8_Z8R8G8B8; break; case PICT_r5g6b5: *fmt_ret = NV04_SURFACE_2D_FORMAT_R5G6B5; break; case PICT_a8: *fmt_ret = NV04_SURFACE_2D_FORMAT_Y8; break; default: return FALSE; } return TRUE; } /* A copy of exaGetOffscreenPixmap(), since it's private. */ PixmapPtr NVGetDrawablePixmap(DrawablePtr pDraw) { if (pDraw->type == DRAWABLE_WINDOW) return pDraw->pScreen->GetWindowPixmap ((WindowPtr) pDraw); else return (PixmapPtr) pDraw; } static Bool NVAccelInitImagePattern(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvImagePattern, NV04_PATTERN_CLASS, NULL, 0, &pNv->NvImagePattern)) return FALSE; if (!PUSH_SPACE(push, 8)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvImagePattern->handle); BEGIN_NV04(push, NV01_PATT(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV01_PATT(MONOCHROME_FORMAT), 3); #if X_BYTE_ORDER == X_BIG_ENDIAN PUSH_DATA (push, NV01_PATTERN_MONOCHROME_FORMAT_LE); #else PUSH_DATA (push, NV01_PATTERN_MONOCHROME_FORMAT_CGA6); #endif PUSH_DATA (push, NV01_PATTERN_MONOCHROME_SHAPE_8X8); PUSH_DATA (push, NV04_PATTERN_PATTERN_SELECT_MONO); return TRUE; } static Bool NVAccelInitRasterOp(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvRop, NV03_ROP_CLASS, NULL, 0, &pNv->NvRop)) return FALSE; if (!PUSH_SPACE(push, 4)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvRop->handle); BEGIN_NV04(push, NV01_ROP(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); pNv->currentRop = ~0; return TRUE; } static Bool NVAccelInitRectangle(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvRectangle, NV04_GDI_CLASS, NULL, 0, &pNv->NvRectangle)) return FALSE; if (!PUSH_SPACE(push, 16)) return FALSE; BEGIN_NV04(push, NV01_SUBC(RECT, OBJECT), 1); PUSH_DATA (push, pNv->NvRectangle->handle); BEGIN_NV04(push, NV04_RECT(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); BEGIN_NV04(push, NV04_RECT(DMA_FONTS), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV04_RECT(SURFACE), 1); PUSH_DATA (push, pNv->NvContextSurfaces->handle); BEGIN_NV04(push, NV04_RECT(ROP), 1); PUSH_DATA (push, pNv->NvRop->handle); BEGIN_NV04(push, NV04_RECT(PATTERN), 1); PUSH_DATA (push, pNv->NvImagePattern->handle); BEGIN_NV04(push, NV04_RECT(OPERATION), 1); PUSH_DATA (push, NV04_GDI_OPERATION_ROP_AND); BEGIN_NV04(push, NV04_RECT(MONOCHROME_FORMAT), 1); /* XXX why putting 1 like renouveau dump, swap the text */ #if 1 || X_BYTE_ORDER == X_BIG_ENDIAN PUSH_DATA (push, NV04_GDI_MONOCHROME_FORMAT_LE); #else PUSH_DATA (push, NV04_GDI_MONOCHROME_FORMAT_CGA6); #endif return TRUE; } static Bool NVAccelInitImageBlit(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t class; class = (pNv->dev->chipset >= 0x11) ? NV15_BLIT_CLASS : NV04_BLIT_CLASS; if (nouveau_object_new(pNv->channel, NvImageBlit, class, NULL, 0, &pNv->NvImageBlit)) return FALSE; if (!PUSH_SPACE(push, 16)) return FALSE; BEGIN_NV04(push, NV01_SUBC(BLIT, OBJECT), 1); PUSH_DATA (push, pNv->NvImageBlit->handle); BEGIN_NV04(push, NV01_BLIT(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); BEGIN_NV04(push, NV01_BLIT(COLOR_KEY), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV04_BLIT(SURFACES), 1); PUSH_DATA (push, pNv->NvContextSurfaces->handle); BEGIN_NV04(push, NV01_BLIT(CLIP), 3); PUSH_DATA (push, pNv->NvNull->handle); PUSH_DATA (push, pNv->NvImagePattern->handle); PUSH_DATA (push, pNv->NvRop->handle); BEGIN_NV04(push, NV01_BLIT(OPERATION), 1); PUSH_DATA (push, NV01_BLIT_OPERATION_ROP_AND); if (pNv->NvImageBlit->oclass == NV15_BLIT_CLASS) { BEGIN_NV04(push, NV15_BLIT(FLIP_SET_READ), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 2); } return TRUE; } static Bool NVAccelInitScaledImage(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; uint32_t class; switch (pNv->Architecture) { case NV_ARCH_04: class = NV04_SIFM_CLASS; break; case NV_ARCH_10: case NV_ARCH_20: case NV_ARCH_30: class = NV10_SIFM_CLASS; break; case NV_ARCH_40: default: class = NV40_SIFM_CLASS; break; } if (nouveau_object_new(pNv->channel, NvScaledImage, class, NULL, 0, &pNv->NvScaledImage)) return FALSE; if (!PUSH_SPACE(push, 16)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvScaledImage->handle); BEGIN_NV04(push, NV03_SIFM(DMA_NOTIFY), 7); PUSH_DATA (push, pNv->notify0->handle); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, pNv->NvNull->handle); PUSH_DATA (push, pNv->NvNull->handle); PUSH_DATA (push, pNv->NvContextBeta1->handle); PUSH_DATA (push, pNv->NvContextBeta4->handle); PUSH_DATA (push, pNv->NvContextSurfaces->handle); if (pNv->Architecture>=NV_ARCH_10) { BEGIN_NV04(push, NV05_SIFM(COLOR_CONVERSION), 1); PUSH_DATA (push, NV05_SIFM_COLOR_CONVERSION_DITHER); } BEGIN_NV04(push, NV03_SIFM(OPERATION), 1); PUSH_DATA (push, NV03_SIFM_OPERATION_SRCCOPY); return TRUE; } static Bool NVAccelInitClipRectangle(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvClipRectangle, NV01_CLIP_CLASS, NULL, 0, &pNv->NvClipRectangle)) return FALSE; if (!PUSH_SPACE(push, 4)) return FALSE; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvClipRectangle->handle); BEGIN_NV04(push, NV01_CLIP(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); return TRUE; } static Bool NVAccelInitMemFormat(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_object_new(pNv->channel, NvMemFormat, NV03_M2MF_CLASS, NULL, 0, &pNv->NvMemFormat)) return FALSE; if (!PUSH_SPACE(push, 4)) return FALSE; BEGIN_NV04(push, NV01_SUBC(M2MF, OBJECT), 1); PUSH_DATA (push, pNv->NvMemFormat->handle); BEGIN_NV04(push, NV03_M2MF(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); return TRUE; } static Bool NVAccelInitImageFromCpu(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t class; switch (pNv->Architecture) { case NV_ARCH_04: class = NV04_IFC_CLASS; break; case NV_ARCH_10: case NV_ARCH_20: case NV_ARCH_30: case NV_ARCH_40: default: class = NV10_IFC_CLASS; break; } if (nouveau_object_new(pNv->channel, NvImageFromCpu, class, NULL, 0, &pNv->NvImageFromCpu)) return FALSE; if (!PUSH_SPACE(push, 16)) return FALSE; BEGIN_NV04(push, NV01_SUBC(IFC, OBJECT), 1); PUSH_DATA (push, pNv->NvImageFromCpu->handle); BEGIN_NV04(push, NV01_IFC(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); BEGIN_NV04(push, NV01_IFC(CLIP), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV01_IFC(PATTERN), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV01_IFC(ROP), 1); PUSH_DATA (push, pNv->NvNull->handle); if (pNv->Architecture >= NV_ARCH_10) { BEGIN_NV04(push, NV01_IFC(BETA), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV04_IFC(BETA4), 1); PUSH_DATA (push, pNv->NvNull->handle); } BEGIN_NV04(push, NV04_IFC(SURFACE), 1); PUSH_DATA (push, pNv->NvContextSurfaces->handle); BEGIN_NV04(push, NV01_IFC(OPERATION), 1); PUSH_DATA (push, NV01_IFC_OPERATION_SRCCOPY); return TRUE; } #define INIT_CONTEXT_OBJECT(name) do { \ ret = NVAccelInit##name(pScrn); \ if (!ret) { \ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, \ "Failed to initialise context object: "#name \ " (%d)\n", ret); \ return FALSE; \ } \ } while(0) void NVAccelCommonFini(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); nouveau_object_del(&pNv->notify0); nouveau_object_del(&pNv->vblank_sem); nouveau_object_del(&pNv->NvContextSurfaces); nouveau_object_del(&pNv->NvContextBeta1); nouveau_object_del(&pNv->NvContextBeta4); nouveau_object_del(&pNv->NvImagePattern); nouveau_object_del(&pNv->NvRop); nouveau_object_del(&pNv->NvRectangle); nouveau_object_del(&pNv->NvImageBlit); nouveau_object_del(&pNv->NvScaledImage); nouveau_object_del(&pNv->NvClipRectangle); nouveau_object_del(&pNv->NvImageFromCpu); nouveau_object_del(&pNv->Nv2D); nouveau_object_del(&pNv->NvMemFormat); nouveau_object_del(&pNv->NvSW); nouveau_object_del(&pNv->Nv3D); nouveau_object_del(&pNv->NvCOPY); nouveau_bo_ref(NULL, &pNv->scratch); nouveau_bufctx_del(&pNv->bufctx); nouveau_pushbuf_del(&pNv->pushbuf); nouveau_object_del(&pNv->channel); } Bool NVAccelCommonInit(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nv04_fifo nv04_data = { .vram = NvDmaFB, .gart = NvDmaTT }; struct nvc0_fifo nvc0_data = { }; struct nouveau_object *device = &pNv->dev->object; int size, ret; void *data; if (pNv->dev->drm_version < 0x01000000 && pNv->dev->chipset >= 0xc0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Fermi acceleration not supported on old kernel\n"); return FALSE; } if (pNv->Architecture < NV_FERMI) { data = &nv04_data; size = sizeof(nv04_data); } else { data = &nvc0_data; size = sizeof(nvc0_data); } ret = nouveau_object_new(device, 0, NOUVEAU_FIFO_CHANNEL_CLASS, data, size, &pNv->channel); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Error creating GPU channel: %d\n", ret); return FALSE; } ret = nouveau_pushbuf_new(pNv->client, pNv->channel, 4, 32 * 1024, true, &pNv->pushbuf); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Error allocating DMA push buffer: %d\n",ret); NVAccelCommonFini(pScrn); return FALSE; } ret = nouveau_bufctx_new(pNv->client, 1, &pNv->bufctx); if (ret) { NVAccelCommonFini(pScrn); return FALSE; } pNv->pushbuf->user_priv = pNv->bufctx; /* Scratch buffer */ ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_VRAM | NOUVEAU_BO_MAP, 128 * 1024, 128 * 1024, NULL, &pNv->scratch); if (!ret) ret = nouveau_bo_map(pNv->scratch, 0, pNv->client); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate scratch buffer: %d\n", ret); return FALSE; } /* General engine objects */ if (pNv->Architecture < NV_FERMI) { INIT_CONTEXT_OBJECT(DmaNotifier0); INIT_CONTEXT_OBJECT(Null); } /* 2D engine */ if (pNv->Architecture < NV_TESLA) { INIT_CONTEXT_OBJECT(ContextSurfaces); INIT_CONTEXT_OBJECT(ContextBeta1); INIT_CONTEXT_OBJECT(ContextBeta4); INIT_CONTEXT_OBJECT(ImagePattern); INIT_CONTEXT_OBJECT(RasterOp); INIT_CONTEXT_OBJECT(Rectangle); INIT_CONTEXT_OBJECT(ImageBlit); INIT_CONTEXT_OBJECT(ScaledImage); INIT_CONTEXT_OBJECT(ClipRectangle); INIT_CONTEXT_OBJECT(ImageFromCpu); } else if (pNv->Architecture < NV_FERMI) { INIT_CONTEXT_OBJECT(2D_NV50); } else { INIT_CONTEXT_OBJECT(2D_NVC0); } if (pNv->Architecture < NV_TESLA) INIT_CONTEXT_OBJECT(MemFormat); else if (pNv->Architecture < NV_FERMI) INIT_CONTEXT_OBJECT(M2MF_NV50); else if (pNv->Architecture < NV_KEPLER) INIT_CONTEXT_OBJECT(M2MF_NVC0); else { INIT_CONTEXT_OBJECT(P2MF_NVE0); INIT_CONTEXT_OBJECT(COPY_NVE0); } /* 3D init */ switch (pNv->Architecture) { case NV_FERMI: case NV_KEPLER: case NV_MAXWELL: case NV_PASCAL: INIT_CONTEXT_OBJECT(3D_NVC0); break; case NV_TESLA: INIT_CONTEXT_OBJECT(NV50TCL); break; case NV_ARCH_40: INIT_CONTEXT_OBJECT(NV40TCL); break; case NV_ARCH_30: INIT_CONTEXT_OBJECT(NV30TCL); break; case NV_ARCH_20: case NV_ARCH_10: INIT_CONTEXT_OBJECT(NV10TCL); break; default: break; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Channel setup complete.\n"); return TRUE; } xf86-video-nouveau-1.0.18/src/nv04_xv_ovl.c0000644000175000017500000001567214713424663014005 /* * Copyright 2007 Arthur Huillet * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" extern Atom xvBrightness, xvColorKey, xvAutopaintColorKey, xvSetDefaults; void NV04PutOverlayImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, int id, int dstPitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, short width, short height, short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); #if NVOVL_SUPPORT xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc = xf86_config->crtc[pPriv->overlayCRTC]; /*This may not work with NV04 overlay according to rivatv source*/ if (crtc->mode.Flags & V_DBLSCAN) { dstBox->y1 <<= 1; dstBox->y2 <<= 1; drw_h <<= 1; } /* paint the color key */ if(pPriv->autopaintColorKey && (pPriv->grabbedByV4L || !REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes))) { /* we always paint V4L's color key */ if (!pPriv->grabbedByV4L) REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes); { xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } } nvWriteVIDEO(pNv, NV_PVIDEO_OE_STATE, 0); nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, 0); nvWriteVIDEO(pNv, NV_PVIDEO_RM_STATE, 0); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_START_ADDRESS, src->offset + offset); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_START_ADDRESS + 4, src->offset + offset); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_PITCH_LENGTH, dstPitch); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_PITCH_LENGTH + 4, dstPitch); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_OFFSET, 0); nvWriteVIDEO(pNv, NV_PVIDEO_BUFF0_OFFSET + 4, 0); nvWriteVIDEO(pNv, NV_PVIDEO_WINDOW_START, (dstBox->y1 << 16) | dstBox->x1); nvWriteVIDEO(pNv, NV_PVIDEO_WINDOW_SIZE, ((dstBox->y2 - dstBox->y1) << 16) | (dstBox->x2 - dstBox->x1)); nvWriteVIDEO(pNv, NV_PVIDEO_STEP_SIZE, (uint32_t)(((src_h - 1) << 11) / (drw_h - 1)) << 16 | (uint32_t)(((src_w - 1) << 11) / (drw_w - 1))); nvWriteVIDEO(pNv, NV_PVIDEO_RED_CSC_OFFSET, (0x69 - (pPriv->brightness * 62 / 512))); nvWriteVIDEO(pNv, NV_PVIDEO_GREEN_CSC_OFFSET, (0x3e + (pPriv->brightness * 62 / 512))); nvWriteVIDEO(pNv, NV_PVIDEO_BLUE_CSC_OFFSET, (0x89 - (pPriv->brightness * 62 / 512))); nvWriteVIDEO(pNv, NV_PVIDEO_CSC_ADJUST, 0x0); nvWriteVIDEO(pNv, NV_PVIDEO_CONTROL_Y, 0x001); /* (BLUR_ON, LINE_HALF) */ nvWriteVIDEO(pNv, NV_PVIDEO_CONTROL_X, 0x111); /* (WEIGHT_HEAVY, SHARPENING_ON, SMOOTHING_ON) */ nvWriteVIDEO(pNv, NV_PVIDEO_FIFO_BURST_LENGTH, 0x03); nvWriteVIDEO(pNv, NV_PVIDEO_FIFO_THRES_SIZE, 0x38); nvWriteVIDEO(pNv, NV_PVIDEO_KEY, pPriv->colorKey); /* 0x1 Video on 0x10 Use colorkey 0x100 Format YUY2 */ nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, 0x111); nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, (nvReadVIDEO(pNv, NV_PVIDEO_SU_STATE) ^ (1 << 16))); #endif pPriv->videoStatus = CLIENT_VIDEO_ON; } /** * NV04SetOverlayPortAttribute * sets the attribute "attribute" of port "data" to value "value" * calls NVResetVideo(pScrn) to apply changes to hardware * * @param pScrenInfo * @param attribute attribute to set * @param value value to which attribute is to be set * @param data port from which the attribute is to be set * * @return Success, if setting is successful * BadValue/BadMatch, if value/attribute are invalid * @see NVResetVideo(ScrnInfoPtr pScrn) */ int NV04SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvBrightness) { if ((value < -512) || (value > 512)) return BadValue; pPriv->brightness = value; } else if (attribute == xvColorKey) { pPriv->colorKey = value; REGION_EMPTY(pScrn->pScreen, &pPriv->clip); } else if (attribute == xvAutopaintColorKey) { if ((value < 0) || (value > 1)) return BadValue; pPriv->autopaintColorKey = value; } else if (attribute == xvSetDefaults) { NVSetPortDefaults(pScrn, pPriv); } else return BadMatch; return Success; } /** * NV04GetOverlayPortAttribute * * @param pScrn unused * @param attribute attribute to be read * @param value value of attribute will be stored in this pointer * @param data port from which attribute will be read * @return Success, if queried attribute exists */ int NV04GetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvBrightness) *value = pPriv->brightness; else if (attribute == xvColorKey) *value = pPriv->colorKey; else if (attribute == xvAutopaintColorKey) *value = (pPriv->autopaintColorKey) ? 1 : 0; else return BadMatch; return Success; } /** * NV04StopOverlay * Tell the hardware to stop the overlay */ void NV04StopOverlay (ScrnInfoPtr pScrn) { #ifdef NVOVL_SUPPORT NVPtr pNv = NVPTR(pScrn); nvWriteVIDEO(pNv, NV_PVIDEO_OVERLAY, nvReadVIDEO(pNv, NV_PVIDEO_OVERLAY) &~ 0x1); nvWriteVIDEO(pNv, NV_PVIDEO_OE_STATE, 0); nvWriteVIDEO(pNv, NV_PVIDEO_SU_STATE, 0); nvWriteVIDEO(pNv, NV_PVIDEO_RM_STATE, 0); #endif } xf86-video-nouveau-1.0.18/src/nouveau_wfb.c0000644000175000017500000001176514713424663014140 /* * Copyright © 2009 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Authors: * Ben Skeggs */ #include "nv_include.h" struct wfb_pixmap { PixmapPtr ppix; unsigned long base; unsigned long end; unsigned pitch; unsigned tile_height; unsigned horiz_tiles; uint64_t multiply_factor; }; static struct wfb_pixmap wfb_pixmap[6]; static inline FbBits nouveau_wfb_rd_linear(const void *src, int size) { FbBits bits = 0; memcpy(&bits, src, size); return bits; } static inline void nouveau_wfb_wr_linear(void *dst, FbBits value, int size) { memcpy(dst, &value, size); } #define TP 6 #define TH wfb->tile_height #define TPM ((1 << TP) - 1) #define THM ((1 << TH) - 1) static FbBits nouveau_wfb_rd_tiled(const void *ptr, int size) { unsigned long offset = (unsigned long)ptr; struct wfb_pixmap *wfb = NULL; FbBits bits = 0; int x, y, i; for (i = 0; i < 6; i++) { if (offset >= wfb_pixmap[i].base && offset < wfb_pixmap[i].end) { wfb = &wfb_pixmap[i]; break; } } if (!wfb || !wfb->pitch) return nouveau_wfb_rd_linear(ptr, size); offset -= wfb->base; y = (offset * wfb->multiply_factor) >> 36; x = offset - y * wfb->pitch; offset = (x >> TP) + ((y >> TH) * wfb->horiz_tiles); offset *= (1 << (TH + TP)); offset += ((y & THM) * (1 << TP)) + (x & TPM); memcpy(&bits, (void *)wfb->base + offset, size); return bits; } static void nouveau_wfb_wr_tiled(void *ptr, FbBits value, int size) { unsigned long offset = (unsigned long)ptr; struct wfb_pixmap *wfb = NULL; int x, y, i; for (i = 0; i < 6; i++) { if (offset >= wfb_pixmap[i].base && offset < wfb_pixmap[i].end) { wfb = &wfb_pixmap[i]; break; } } if (!wfb || !wfb->pitch) { nouveau_wfb_wr_linear(ptr, value, size); return; } offset -= wfb->base; y = (offset * wfb->multiply_factor) >> 36; x = offset - y * wfb->pitch; offset = (x >> TP) + ((y >> TH) * wfb->horiz_tiles); offset *= (1 << (TH + TP)); offset += ((y & THM) * (1 << TP)) + (x & TPM); memcpy((void *)wfb->base + offset, &value, size); } void nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, DrawablePtr pDraw) { struct nouveau_bo *bo = NULL; struct wfb_pixmap *wfb; PixmapPtr ppix = NULL; int i, j, have_tiled = 0; if (!pRead || !pWrite) return; ppix = NVGetDrawablePixmap(pDraw); if (ppix) { struct nouveau_pixmap *priv = nouveau_pixmap(ppix); bo = priv ? priv->bo : NULL; } if (!ppix || !bo) { for (i = 0; i < 6; i++) if (wfb_pixmap[i].ppix && wfb_pixmap[i].pitch) have_tiled = 1; if (have_tiled) { *pRead = nouveau_wfb_rd_tiled; *pWrite = nouveau_wfb_wr_tiled; } else { *pRead = nouveau_wfb_rd_linear; *pWrite = nouveau_wfb_wr_linear; } return; } j = -1; for (i = 0; i < 6; i++) { if (!wfb_pixmap[i].ppix && j < 0) j = i; if (wfb_pixmap[i].ppix && wfb_pixmap[i].pitch) have_tiled = 1; } if (j == -1) { ErrorF("We ran out of wfb indices, this is not good.\n"); goto out; } wfb = &wfb_pixmap[j]; wfb->ppix = ppix; wfb->base = (unsigned long)ppix->devPrivate.ptr; wfb->end = wfb->base + bo->size; if (!nv50_style_tiled_pixmap(ppix)) { wfb->pitch = 0; } else { wfb->pitch = ppix->devKind; /* 8192x8192x4 is 28 bits max, 64 - 28 == 36. */ wfb->multiply_factor = (((1ULL << 36) - 1) / wfb->pitch) + 1; if (bo->device->chipset < 0xc0) wfb->tile_height = (bo->config.nv50.tile_mode >> 4) + 2; else wfb->tile_height = (bo->config.nv50.tile_mode >> 4) + 3; wfb->horiz_tiles = wfb->pitch / 64; have_tiled = 1; } out: if (have_tiled) { *pRead = nouveau_wfb_rd_tiled; *pWrite = nouveau_wfb_wr_tiled; } else { *pRead = nouveau_wfb_rd_linear; *pWrite = nouveau_wfb_wr_linear; } } void nouveau_wfb_finish_wrap(DrawablePtr pDraw) { PixmapPtr ppix; int i; ppix = NVGetDrawablePixmap(pDraw); if (!ppix) return; for (i = 0; i < 6; i++) { if (wfb_pixmap[i].ppix == ppix) { wfb_pixmap[i].ppix = NULL; wfb_pixmap[i].base = ~0UL; break; } } } xf86-video-nouveau-1.0.18/src/nv50_exa.c0000644000175000017500000006624214713424663013245 /* * Copyright 2007 NVIDIA, Corporation * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nv_rop.h" #include "nv50_accel.h" #define NV50EXA_LOCALS(p) \ ScrnInfoPtr pScrn = xf86ScreenToScrn((p)->drawable.pScreen); \ NVPtr pNv = NVPTR(pScrn); \ struct nouveau_pushbuf *push = pNv->pushbuf; (void)push; #define BF(f) NV50_BLEND_FACTOR_##f struct nv50_blend_op { unsigned src_alpha; unsigned dst_alpha; unsigned src_blend; unsigned dst_blend; }; static struct nv50_blend_op NV50EXABlendOp[] = { /* Clear */ { 0, 0, BF( ZERO), BF( ZERO) }, /* Src */ { 0, 0, BF( ONE), BF( ZERO) }, /* Dst */ { 0, 0, BF( ZERO), BF( ONE) }, /* Over */ { 1, 0, BF( ONE), BF(ONE_MINUS_SRC_ALPHA) }, /* OverReverse */ { 0, 1, BF(ONE_MINUS_DST_ALPHA), BF( ONE) }, /* In */ { 0, 1, BF( DST_ALPHA), BF( ZERO) }, /* InReverse */ { 1, 0, BF( ZERO), BF( SRC_ALPHA) }, /* Out */ { 0, 1, BF(ONE_MINUS_DST_ALPHA), BF( ZERO) }, /* OutReverse */ { 1, 0, BF( ZERO), BF(ONE_MINUS_SRC_ALPHA) }, /* Atop */ { 1, 1, BF( DST_ALPHA), BF(ONE_MINUS_SRC_ALPHA) }, /* AtopReverse */ { 1, 1, BF(ONE_MINUS_DST_ALPHA), BF( SRC_ALPHA) }, /* Xor */ { 1, 1, BF(ONE_MINUS_DST_ALPHA), BF(ONE_MINUS_SRC_ALPHA) }, /* Add */ { 0, 0, BF( ONE), BF( ONE) }, }; static Bool NV50EXA2DSurfaceFormat(PixmapPtr ppix, uint32_t *fmt) { NV50EXA_LOCALS(ppix); switch (ppix->drawable.bitsPerPixel) { case 8 : *fmt = NV50_SURFACE_FORMAT_R8_UNORM; break; case 15: *fmt = NV50_SURFACE_FORMAT_BGR5_X1_UNORM; break; case 16: *fmt = NV50_SURFACE_FORMAT_B5G6R5_UNORM; break; case 24: *fmt = NV50_SURFACE_FORMAT_BGRX8_UNORM; break; case 30: *fmt = NV50_SURFACE_FORMAT_RGB10_A2_UNORM; break; case 32: *fmt = NV50_SURFACE_FORMAT_BGRA8_UNORM; break; default: NOUVEAU_FALLBACK("Unknown surface format for bpp=%d\n", ppix->drawable.bitsPerPixel); return FALSE; } return TRUE; } static void NV50EXASetClip(PixmapPtr ppix, int x, int y, int w, int h) { NV50EXA_LOCALS(ppix); BEGIN_NV04(push, NV50_2D(CLIP_X), 4); PUSH_DATA (push, x); PUSH_DATA (push, y); PUSH_DATA (push, w); PUSH_DATA (push, h); } static void NV50EXAAcquireSurface2D(PixmapPtr ppix, int is_src, uint32_t fmt) { NV50EXA_LOCALS(ppix); struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix); int mthd = is_src ? NV50_2D_SRC_FORMAT : NV50_2D_DST_FORMAT; uint32_t bo_flags; bo_flags = nvpix->shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM; bo_flags |= is_src ? NOUVEAU_BO_RD : NOUVEAU_BO_WR; if (!nv50_style_tiled_pixmap(ppix)) { BEGIN_NV04(push, SUBC_2D(mthd), 2); PUSH_DATA (push, fmt); PUSH_DATA (push, 1); BEGIN_NV04(push, SUBC_2D(mthd + 0x14), 1); PUSH_DATA (push, (uint32_t)exaGetPixmapPitch(ppix)); } else { BEGIN_NV04(push, SUBC_2D(mthd), 5); PUSH_DATA (push, fmt); PUSH_DATA (push, 0); PUSH_DATA (push, bo->config.nv50.tile_mode); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } BEGIN_NV04(push, SUBC_2D(mthd + 0x18), 4); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); PUSH_DATA (push, bo->offset >> 32); PUSH_DATA (push, bo->offset); if (is_src == 0) NV50EXASetClip(ppix, 0, 0, ppix->drawable.width, ppix->drawable.height); PUSH_REFN (push, bo, bo_flags); } static void NV50EXASetPattern(PixmapPtr pdpix, int col0, int col1, int pat0, int pat1) { NV50EXA_LOCALS(pdpix); BEGIN_NV04(push, NV50_2D(PATTERN_COLOR(0)), 4); PUSH_DATA (push, col0); PUSH_DATA (push, col1); PUSH_DATA (push, pat0); PUSH_DATA (push, pat1); } static void NV50EXASetROP(PixmapPtr pdpix, int alu, Pixel planemask) { NV50EXA_LOCALS(pdpix); int rop; if (planemask != ~0) rop = NVROP[alu].copy_planemask; else rop = NVROP[alu].copy; BEGIN_NV04(push, NV50_2D(OPERATION), 1); if (alu == GXcopy && EXA_PM_IS_SOLID(&pdpix->drawable, planemask)) { PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY); return; } else { PUSH_DATA (push, NV50_2D_OPERATION_ROP); } BEGIN_NV04(push, NV50_2D(PATTERN_COLOR_FORMAT), 2); switch (pdpix->drawable.bitsPerPixel) { case 8: PUSH_DATA (push, 3); break; case 15: PUSH_DATA (push, 1); break; case 16: PUSH_DATA (push, 0); break; case 24: case 32: default: PUSH_DATA (push, 2); break; } PUSH_DATA (push, 1); /* There are 16 alu's. * 0-15: copy * 16-31: copy_planemask */ if (!EXA_PM_IS_SOLID(&pdpix->drawable, planemask)) { alu += 16; NV50EXASetPattern(pdpix, 0, planemask, ~0, ~0); } else { if (pNv->currentRop > 15) NV50EXASetPattern(pdpix, ~0, ~0, ~0, ~0); } if (pNv->currentRop != alu) { BEGIN_NV04(push, NV50_2D(ROP), 1); PUSH_DATA (push, rop); pNv->currentRop = alu; } } Bool NV50EXAPrepareSolid(PixmapPtr pdpix, int alu, Pixel planemask, Pixel fg) { NV50EXA_LOCALS(pdpix); uint32_t fmt; if (!NV50EXA2DSurfaceFormat(pdpix, &fmt)) NOUVEAU_FALLBACK("rect format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NV50EXAAcquireSurface2D(pdpix, 0, fmt); NV50EXASetROP(pdpix, alu, planemask); BEGIN_NV04(push, NV50_2D(DRAW_SHAPE), 3); PUSH_DATA (push, NV50_2D_DRAW_SHAPE_RECTANGLES); PUSH_DATA (push, fmt); PUSH_DATA (push, fg); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NV50EXASolid(PixmapPtr pdpix, int x1, int y1, int x2, int y2) { NV50EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 8)) return; BEGIN_NV04(push, NV50_2D(DRAW_POINT32_X(0)), 4); PUSH_DATA (push, x1); PUSH_DATA (push, y1); PUSH_DATA (push, x2); PUSH_DATA (push, y2); if ((x2 - x1) * (y2 - y1) >= 512) PUSH_KICK(push); } void NV50EXADoneSolid(PixmapPtr pdpix) { NV50EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NV50EXAPrepareCopy(PixmapPtr pspix, PixmapPtr pdpix, int dx, int dy, int alu, Pixel planemask) { NV50EXA_LOCALS(pdpix); uint32_t src, dst; if (!NV50EXA2DSurfaceFormat(pspix, &src)) NOUVEAU_FALLBACK("src format\n"); if (!NV50EXA2DSurfaceFormat(pdpix, &dst)) NOUVEAU_FALLBACK("dst format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NV50EXAAcquireSurface2D(pspix, 1, src); NV50EXAAcquireSurface2D(pdpix, 0, dst); NV50EXASetROP(pdpix, alu, planemask); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NV50EXACopy(PixmapPtr pdpix, int srcX , int srcY, int dstX , int dstY, int width, int height) { NV50EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 32)) return; BEGIN_NV04(push, SUBC_2D(NV50_GRAPH_SERIALIZE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_2D(BLIT_CONTROL), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_2D(BLIT_DST_X), 12); PUSH_DATA (push, dstX); PUSH_DATA (push, dstY); PUSH_DATA (push, width); PUSH_DATA (push, height); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, srcX); PUSH_DATA (push, 0); PUSH_DATA (push, srcY); if (width * height >= 512) PUSH_KICK(push); } void NV50EXADoneCopy(PixmapPtr pdpix) { NV50EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NV50EXAUploadSIFC(const char *src, int src_pitch, PixmapPtr pdpix, int x, int y, int w, int h, int cpp) { NV50EXA_LOCALS(pdpix); ScreenPtr pScreen = pdpix->drawable.pScreen; int line_dwords = (w * cpp + 3) / 4; uint32_t sifc_fmt; Bool ret = FALSE; if (!NV50EXA2DSurfaceFormat(pdpix, &sifc_fmt)) NOUVEAU_FALLBACK("hostdata format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NV50EXAAcquireSurface2D(pdpix, 0, sifc_fmt); NV50EXASetClip(pdpix, x, y, w, h); BEGIN_NV04(push, NV50_2D(OPERATION), 1); PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY); BEGIN_NV04(push, NV50_2D(SIFC_BITMAP_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, sifc_fmt); BEGIN_NV04(push, NV50_2D(SIFC_WIDTH), 10); PUSH_DATA (push, (line_dwords * 4) / cpp); PUSH_DATA (push, h); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, x); PUSH_DATA (push, 0); PUSH_DATA (push, y); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) goto out; while (h--) { int count = line_dwords; const char *p = src; while(count) { int size = count > 1792 ? 1792 : count; if (!PUSH_SPACE(push, size + 1)) goto out; BEGIN_NI04(push, NV50_2D(SIFC_DATA), size); PUSH_DATAp(push, p, size); p += size * 4; count -= size; } src += src_pitch; } ret = TRUE; out: nouveau_pushbuf_bufctx(push, NULL); if (pdpix == pScreen->GetScreenPixmap(pScreen)) PUSH_KICK(push); return ret; } static Bool NV50EXACheckRenderTarget(PicturePtr ppict) { if (ppict->pDrawable->width > 8192 || ppict->pDrawable->height > 8192) NOUVEAU_FALLBACK("render target dimensions exceeded %dx%d\n", ppict->pDrawable->width, ppict->pDrawable->height); switch (ppict->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_r5g6b5: case PICT_a8: case PICT_x1r5g5b5: case PICT_a1r5g5b5: case PICT_x8b8g8r8: case PICT_a2b10g10r10: case PICT_x2b10g10r10: case PICT_a2r10g10b10: case PICT_x2r10g10b10: break; default: NOUVEAU_FALLBACK("picture format 0x%08x\n", ppict->format); } return TRUE; } static Bool NV50EXARenderTarget(PixmapPtr ppix, PicturePtr ppict) { NV50EXA_LOCALS(ppix); struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); unsigned format; /*XXX: Scanout buffer not tiled, someone needs to figure it out */ if (!nv50_style_tiled_pixmap(ppix)) NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); switch (ppict->format) { case PICT_a8r8g8b8: format = NV50_SURFACE_FORMAT_BGRA8_UNORM; break; case PICT_x8r8g8b8: format = NV50_SURFACE_FORMAT_BGRX8_UNORM; break; case PICT_r5g6b5 : format = NV50_SURFACE_FORMAT_B5G6R5_UNORM; break; case PICT_a8 : format = NV50_SURFACE_FORMAT_A8_UNORM; break; case PICT_x1r5g5b5: case PICT_a1r5g5b5: format = NV50_SURFACE_FORMAT_BGR5_A1_UNORM; break; case PICT_x8b8g8r8: format = NV50_SURFACE_FORMAT_RGBX8_UNORM; break; case PICT_a2b10g10r10: case PICT_x2b10g10r10: format = NV50_SURFACE_FORMAT_RGB10_A2_UNORM; break; case PICT_a2r10g10b10: case PICT_x2r10g10b10: format = NV50_SURFACE_FORMAT_BGR10_A2_UNORM; break; default: NOUVEAU_FALLBACK("invalid picture format\n"); } PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(0)), 5); PUSH_DATA (push, bo->offset >> 32); PUSH_DATA (push, bo->offset); PUSH_DATA (push, format); PUSH_DATA (push, bo->config.nv50.tile_mode); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV50_3D(RT_HORIZ(0)), 2); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); BEGIN_NV04(push, NV50_3D(RT_ARRAY_MODE), 1); PUSH_DATA (push, 0x00000001); return TRUE; } static Bool NV50EXACheckTexture(PicturePtr ppict, PicturePtr pdpict, int op) { if (ppict->pDrawable) { if (ppict->pDrawable->width > 8192 || ppict->pDrawable->height > 8192) NOUVEAU_FALLBACK("texture too large\n"); } else { switch (ppict->pSourcePict->type) { case SourcePictTypeSolidFill: break; default: NOUVEAU_FALLBACK("pict %d\n", ppict->pSourcePict->type); break; } } switch (ppict->format) { case PICT_a8r8g8b8: case PICT_a8b8g8r8: case PICT_x8r8g8b8: case PICT_x8b8g8r8: case PICT_r5g6b5: case PICT_a8: case PICT_x1r5g5b5: case PICT_x1b5g5r5: case PICT_a1r5g5b5: case PICT_a1b5g5r5: case PICT_b5g6r5: case PICT_b8g8r8a8: case PICT_b8g8r8x8: case PICT_a2b10g10r10: case PICT_x2b10g10r10: case PICT_x2r10g10b10: case PICT_a2r10g10b10: case PICT_x4r4g4b4: case PICT_x4b4g4r4: case PICT_a4r4g4b4: case PICT_a4b4g4r4: break; default: NOUVEAU_FALLBACK("picture format 0x%08x\n", ppict->format); } switch (ppict->filter) { case PictFilterNearest: case PictFilterBilinear: break; default: NOUVEAU_FALLBACK("picture filter %d\n", ppict->filter); } /* Opengl and Render disagree on what should be sampled outside an XRGB * texture (with no repeating). Opengl has a hardcoded alpha value of * 1.0, while render expects 0.0. We assume that clipping is done for * untranformed sources. */ if (NV50EXABlendOp[op].src_alpha && !ppict->repeat && ppict->transform && (PICT_FORMAT_A(ppict->format) == 0) && (PICT_FORMAT_A(pdpict->format) != 0)) NOUVEAU_FALLBACK("REPEAT_NONE unsupported for XRGB source\n"); return TRUE; } #define _(X1,X2,X3,X4,FMT) (NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_TYPEA_UNORM | \ NV50TIC_0_0_MAP##X1 | NV50TIC_0_0_MAP##X2 | NV50TIC_0_0_MAP##X3 | NV50TIC_0_0_MAP##X4 | \ NV50TIC_0_0_FMT_##FMT) static Bool NV50EXAPictSolid(NVPtr pNv, PicturePtr ppict, unsigned unit) { uint64_t offset = pNv->scratch->offset + SOLID(unit); struct nouveau_pushbuf *push = pNv->pushbuf; PUSH_DATAu(push, pNv->scratch, SOLID(unit), 1); PUSH_DATA (push, ppict->pSourcePict->solidFill.color); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); PUSH_DATA (push, _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8)); PUSH_DATA (push, offset); PUSH_DATA (push, (offset >> 32) | 0xd005d000); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, 0x00000001); PUSH_DATA (push, 0x00010001); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); PUSH_DATAu(push, pNv->scratch, TSC_OFFSET + (unit * 32), 8); PUSH_DATA (push, NV50TSC_1_0_WRAPS_REPEAT | NV50TSC_1_0_WRAPT_REPEAT | NV50TSC_1_0_WRAPR_REPEAT | 0x00024000); PUSH_DATA (push, NV50TSC_1_1_MAGF_NEAREST | NV50TSC_1_1_MINF_NEAREST | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); return TRUE; } static Bool NV50EXAPictGradient(NVPtr pNv, PicturePtr ppict, unsigned unit) { return FALSE; } static Bool NV50EXAPictTexture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, unsigned unit) { struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t format; /*XXX: Scanout buffer not tiled, someone needs to figure it out */ if (!nv50_style_tiled_pixmap(ppix)) NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); switch (ppict->format) { case PICT_a8r8g8b8: format = _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8); break; case PICT_a8b8g8r8: format = _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8); break; case PICT_x8r8g8b8: format = _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8); break; case PICT_x8b8g8r8: format = _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8); break; case PICT_r5g6b5: format = _(B_C0, G_C1, R_C2, A_ONE, 5_6_5); break; case PICT_a8: format = _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8); break; case PICT_x1r5g5b5: format = _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5); break; case PICT_x1b5g5r5: format = _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5); break; case PICT_a1r5g5b5: format = _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5); break; case PICT_a1b5g5r5: format = _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5); break; case PICT_b5g6r5: format = _(R_C0, G_C1, B_C2, A_ONE, 5_6_5); break; case PICT_b8g8r8x8: format = _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8); break; case PICT_b8g8r8a8: format = _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8); break; case PICT_a2b10g10r10: format = _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10); break; case PICT_x2b10g10r10: format = _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10); break; case PICT_x2r10g10b10: format = _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10); break; case PICT_a2r10g10b10: format = _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10); break; case PICT_x4r4g4b4: format = _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4); break; case PICT_x4b4g4r4: format = _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4); break; case PICT_a4r4g4b4: format = _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4); break; case PICT_a4b4g4r4: format = _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4); break; default: NOUVEAU_FALLBACK("invalid picture format, this SHOULD NOT HAPPEN. Expect trouble.\n"); } #undef _ PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); PUSH_DATA (push, format); PUSH_DATA (push, bo->offset); PUSH_DATA (push, (bo->offset >> 32) | (bo->config.nv50.tile_mode << 18) | 0xd0005000); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, (1 << NV50TIC_0_5_DEPTH_SHIFT) | ppix->drawable.height); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); PUSH_DATAu(push, pNv->scratch, TSC_OFFSET + (unit * 32), 8); if (ppict->repeat) { switch (ppict->repeatType) { case RepeatPad: PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE | 0x00024000); break; case RepeatReflect: PUSH_DATA (push, NV50TSC_1_0_WRAPS_MIRROR_REPEAT | NV50TSC_1_0_WRAPT_MIRROR_REPEAT | NV50TSC_1_0_WRAPR_MIRROR_REPEAT | 0x00024000); break; case RepeatNormal: default: PUSH_DATA (push, NV50TSC_1_0_WRAPS_REPEAT | NV50TSC_1_0_WRAPT_REPEAT | NV50TSC_1_0_WRAPR_REPEAT | 0x00024000); break; } } else { PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_BORDER | NV50TSC_1_0_WRAPT_CLAMP_TO_BORDER | NV50TSC_1_0_WRAPR_CLAMP_TO_BORDER | 0x00024000); } if (ppict->filter == PictFilterBilinear) { PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); } else { PUSH_DATA (push, NV50TSC_1_1_MAGF_NEAREST | NV50TSC_1_1_MINF_NEAREST | NV50TSC_1_1_MIPF_NONE); } PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATAu(push, pNv->scratch, PVP_DATA + (unit * 11 * 4), 11); if (ppict->transform) { PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][2])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][2])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][2])); } else { PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); } PUSH_DATAf(push, 1.0 / ppix->drawable.width); PUSH_DATAf(push, 1.0 / ppix->drawable.height); return TRUE; } static Bool NV50EXAPicture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, int unit) { if (ppict->pDrawable) return NV50EXAPictTexture(pNv, ppix, ppict, unit); switch (ppict->pSourcePict->type) { case SourcePictTypeSolidFill: return NV50EXAPictSolid(pNv, ppict, unit); case SourcePictTypeLinear: return NV50EXAPictGradient(pNv, ppict, unit); default: break; } return FALSE; } static Bool NV50EXACheckBlend(int op) { if (op > PictOpAdd) NOUVEAU_FALLBACK("unsupported blend op %d\n", op); return TRUE; } static void NV50EXABlend(PixmapPtr ppix, PicturePtr ppict, int op, int component_alpha) { NV50EXA_LOCALS(ppix); struct nv50_blend_op *b = &NV50EXABlendOp[op]; unsigned sblend = b->src_blend; unsigned dblend = b->dst_blend; if (b->dst_alpha) { if (!PICT_FORMAT_A(ppict->format)) { if (sblend == BF(DST_ALPHA)) sblend = BF(ONE); else if (sblend == BF(ONE_MINUS_DST_ALPHA)) sblend = BF(ZERO); } } if (b->src_alpha && component_alpha) { if (dblend == BF(SRC_ALPHA)) dblend = BF(SRC_COLOR); else if (dblend == BF(ONE_MINUS_SRC_ALPHA)) dblend = BF(ONE_MINUS_SRC_COLOR); } if (sblend == BF(ONE) && dblend == BF(ZERO)) { BEGIN_NV04(push, NV50_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 0); } else { BEGIN_NV04(push, NV50_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(BLEND_EQUATION_RGB), 5); PUSH_DATA (push, NV50_3D_BLEND_EQUATION_RGB_FUNC_ADD); PUSH_DATA (push, sblend); PUSH_DATA (push, dblend); PUSH_DATA (push, NV50_3D_BLEND_EQUATION_ALPHA_FUNC_ADD); PUSH_DATA (push, sblend); BEGIN_NV04(push, NV50_3D(BLEND_FUNC_DST_ALPHA), 1); PUSH_DATA (push, dblend); } } Bool NV50EXACheckComposite(int op, PicturePtr pspict, PicturePtr pmpict, PicturePtr pdpict) { if (!NV50EXACheckBlend(op)) NOUVEAU_FALLBACK("blend not supported\n"); if (!NV50EXACheckRenderTarget(pdpict)) NOUVEAU_FALLBACK("render target invalid\n"); if (!NV50EXACheckTexture(pspict, pdpict, op)) NOUVEAU_FALLBACK("src picture invalid\n"); if (pmpict) { if (pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format) && NV50EXABlendOp[op].src_alpha && NV50EXABlendOp[op].src_blend != BF(ZERO)) NOUVEAU_FALLBACK("component-alpha not supported\n"); if (!NV50EXACheckTexture(pmpict, pdpict, op)) NOUVEAU_FALLBACK("mask picture invalid\n"); } return TRUE; } Bool NV50EXAPrepareComposite(int op, PicturePtr pspict, PicturePtr pmpict, PicturePtr pdpict, PixmapPtr pspix, PixmapPtr pmpix, PixmapPtr pdpix) { NV50EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 256)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); PUSH_REFN (push, pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR); BEGIN_NV04(push, SUBC_2D(NV50_GRAPH_SERIALIZE), 1); PUSH_DATA (push, 0); if (!NV50EXARenderTarget(pdpix, pdpict)) NOUVEAU_FALLBACK("render target invalid\n"); NV50EXABlend(pdpix, pdpict, op, pmpict && pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format)); if (!NV50EXAPicture(pNv, pspix, pspict, 0)) NOUVEAU_FALLBACK("src picture invalid\n"); if (pmpict) { if (!NV50EXAPicture(pNv, pmpix, pmpict, 1)) NOUVEAU_FALLBACK("mask picture invalid\n"); BEGIN_NV04(push, NV50_3D(FP_START_ID), 1); if (pdpict->format == PICT_a8) { PUSH_DATA (push, PFP_C_A8); } else { if (pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format)) { if (NV50EXABlendOp[op].src_alpha) PUSH_DATA (push, PFP_CCASA); else PUSH_DATA (push, PFP_CCA); } else { PUSH_DATA (push, PFP_C); } } } else { BEGIN_NV04(push, NV50_3D(FP_START_ID), 1); if (pdpict->format == PICT_a8) PUSH_DATA (push, PFP_S_A8); else PUSH_DATA (push, PFP_S); } BEGIN_NV04(push, NV50_3D(TIC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_3D(BIND_TIC(2)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(BIND_TIC(2)), 1); PUSH_DATA (push, 0x203); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NV50EXAComposite(PixmapPtr pdpix, int sx, int sy, int mx, int my, int dx, int dy, int w, int h) { NV50EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 64)) return; BEGIN_NV04(push, NV50_3D(SCISSOR_HORIZ(0)), 2); PUSH_DATA (push, (dx + w) << 16 | dx); PUSH_DATA (push, (dy + h) << 16 | dy); BEGIN_NV04(push, NV50_3D(VERTEX_BEGIN_GL), 1); PUSH_DATA (push, NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES); PUSH_VTX2s(push, sx, sy + (h * 2), mx, my + (h * 2), dx, dy + (h * 2)); PUSH_VTX2s(push, sx, sy, mx, my, dx, dy); PUSH_VTX2s(push, sx + (w * 2), sy, mx + (w * 2), my, dx + (w * 2), dy); BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1); PUSH_DATA (push, 0); } void NV50EXADoneComposite(PixmapPtr pdpix) { NV50EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NV50EXARectM2MF(NVPtr pNv, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; if (!PUSH_SPACE(push, 64)) return FALSE; if (src->config.nv50.memtype) { BEGIN_NV04(push, NV50_M2MF(LINEAR_IN), 6); PUSH_DATA (push, 0); PUSH_DATA (push, src->config.nv50.tile_mode); PUSH_DATA (push, src_pitch); PUSH_DATA (push, src_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } else { BEGIN_NV04(push, NV50_M2MF(LINEAR_IN), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV03_M2MF(PITCH_IN), 1); PUSH_DATA (push, src_pitch); src_off += src_y * src_pitch + src_x * cpp; } if (dst->config.nv50.memtype) { BEGIN_NV04(push, NV50_M2MF(LINEAR_OUT), 6); PUSH_DATA (push, 0); PUSH_DATA (push, dst->config.nv50.tile_mode); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, dst_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } else { BEGIN_NV04(push, NV50_M2MF(LINEAR_OUT), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV03_M2MF(PITCH_OUT), 1); PUSH_DATA (push, dst_pitch); dst_off += dst_y * dst_pitch + dst_x * cpp; } while (h) { int line_count = h; if (line_count > 2047) line_count = 2047; if (nouveau_pushbuf_space(push, 32, 0, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; BEGIN_NV04(push, NV50_M2MF(OFFSET_IN_HIGH), 2); PUSH_DATA (push, (src->offset + src_off) >> 32); PUSH_DATA (push, (dst->offset + dst_off) >> 32); BEGIN_NV04(push, NV03_M2MF(OFFSET_IN), 2); PUSH_DATA (push, (src->offset + src_off)); PUSH_DATA (push, (dst->offset + dst_off)); if (src->config.nv50.memtype) { BEGIN_NV04(push, NV50_M2MF(TILING_POSITION_IN), 1); PUSH_DATA (push, (src_y << 16) | (src_x * cpp)); } else { src_off += line_count * src_pitch; } if (dst->config.nv50.memtype) { BEGIN_NV04(push, NV50_M2MF(TILING_POSITION_OUT), 1); PUSH_DATA (push, (dst_y << 16) | (dst_x * cpp)); } else { dst_off += line_count * dst_pitch; } BEGIN_NV04(push, NV03_M2MF(LINE_LENGTH_IN), 4); PUSH_DATA (push, w * cpp); PUSH_DATA (push, line_count); PUSH_DATA (push, 0x00000101); PUSH_DATA (push, 0x00000000); src_y += line_count; dst_y += line_count; h -= line_count; } return TRUE; } xf86-video-nouveau-1.0.18/src/nouveau_copy90b5.c0000644000175000017500000000632214713424663014725 /* * Copyright 2014 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Ben Skeggs */ #include "nouveau_copy.h" #include "hwdefs/nv_object.xml.h" #include "nvc0_accel.h" static Bool nouveau_copy90b5_rect(struct nouveau_pushbuf *push, struct nouveau_object *copy, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; unsigned exec; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; exec = 0x00000000; if (!src->config.nvc0.memtype) { src_off += src_y * src_pitch + src_x * cpp; exec |= 0x00000010; } if (!dst->config.nvc0.memtype) { dst_off += dst_y * dst_pitch + dst_x * cpp; exec |= 0x00000100; } BEGIN_NVC0(push, SUBC_COPY(0x0200), 7); PUSH_DATA (push, src->config.nvc0.tile_mode); PUSH_DATA (push, src_pitch); PUSH_DATA (push, src_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, src_x * cpp); PUSH_DATA (push, src_y); BEGIN_NVC0(push, SUBC_COPY(0x0220), 7); PUSH_DATA (push, dst->config.nvc0.tile_mode); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, dst_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, dst_x * cpp); PUSH_DATA (push, dst_y); BEGIN_NVC0(push, SUBC_COPY(0x030c), 8); PUSH_DATA (push, (src->offset + src_off) >> 32); PUSH_DATA (push, (src->offset + src_off)); PUSH_DATA (push, (dst->offset + dst_off) >> 32); PUSH_DATA (push, (dst->offset + dst_off)); PUSH_DATA (push, src_pitch); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, w * cpp); PUSH_DATA (push, h); BEGIN_NVC0(push, SUBC_COPY(0x0300), 1); PUSH_DATA (push, exec); return TRUE; } Bool nouveau_copy90b5_init(NVPtr pNv) { struct nouveau_pushbuf *push = pNv->ce_pushbuf; if (PUSH_SPACE(push, 8)) { BEGIN_NVC0(push, NV01_SUBC(COPY, OBJECT), 1); PUSH_DATA (push, pNv->NvCopy->handle); pNv->ce_rect = nouveau_copy90b5_rect; return TRUE; } return FALSE; } xf86-video-nouveau-1.0.18/src/nvc0_xv.c0000644000175000017500000002341514713424663013176 /* * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nvc0_accel.h" extern Atom xvSyncToVBlank, xvSetDefaults; static Bool nvc0_xv_check_image_put(PixmapPtr ppix) { switch (ppix->drawable.bitsPerPixel) { case 32: case 24: case 16: case 15: break; default: return FALSE; } if (!nv50_style_tiled_pixmap(ppix)) return FALSE; return TRUE; } int nvc0_xv_image_put(ScrnInfoPtr pScrn, struct nouveau_bo *src, int packed_y, int uv, int id, int src_pitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, uint16_t width, uint16_t height, uint16_t src_w, uint16_t src_h, uint16_t drw_w, uint16_t drw_h, RegionPtr clipBoxes, PixmapPtr ppix, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); struct nouveau_bo *dst = nouveau_pixmap_bo(ppix); struct nouveau_pushbuf_refn refs[] = { { pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR }, { src, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, { dst, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR }, }; struct nouveau_pushbuf *push = pNv->pushbuf; float X1, X2, Y1, Y2; BoxPtr pbox; int nbox; if (!nvc0_xv_check_image_put(ppix)) return BadMatch; if (!PUSH_SPACE(push, 256)) return BadImplementation; BEGIN_NVC0(push, NVC0_3D(RT_ADDRESS_HIGH(0)), 8); PUSH_DATA (push, dst->offset >> 32); PUSH_DATA (push, dst->offset); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); switch (ppix->drawable.depth) { case 32: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGRA8_UNORM); break; case 30: PUSH_DATA (push, NV50_SURFACE_FORMAT_RGB10_A2_UNORM); break; case 24: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGRX8_UNORM); break; case 16: PUSH_DATA (push, NV50_SURFACE_FORMAT_B5G6R5_UNORM); break; case 15: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGR5_X1_UNORM); break; } PUSH_DATA (push, dst->config.nvc0.tile_mode); PUSH_DATA (push, 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 0); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET, 16); if (id == FOURCC_YV12 || id == FOURCC_I420) { PUSH_TIC(push, src, packed_y, width, height, 0, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8); PUSH_TIC(push, src, uv, width >> 1, height >> 1, 0, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8); } else { unsigned format; if (id == FOURCC_UYVY) { format = NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8; } else { format = NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8; } PUSH_TIC(push, src, packed_y, width, height, 0, format); if (id == FOURCC_UYVY) { format = NV50TIC_0_0_MAPA_C2 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8_8_8; } else { format = NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C1 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8_8_8; } PUSH_TIC(push, src, packed_y, width >> 1, height, 0, format); } PUSH_DATAu(push, pNv->scratch, TSC_OFFSET, 16); PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE); PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE); PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); BEGIN_NVC0(push, NVC0_3D(SP_START_ID(5)), 1); PUSH_DATA (push, PFP_NV12); BEGIN_NVC0(push, NVC0_3D(TSC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(TIC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 0); PUSH_DATAu(push, pNv->scratch, PVP_DATA, 11); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0 / width); PUSH_DATAf(push, 1.0 / height); if (pPriv->SyncToVBlank) { NVC0SyncToVBlank(ppix, dstBox); } /* These are fixed point values in the 16.16 format. */ X1 = (float)(x1>>16)+(float)(x1&0xFFFF)/(float)0x10000; Y1 = (float)(y1>>16)+(float)(y1&0xFFFF)/(float)0x10000; X2 = (float)(x2>>16)+(float)(x2&0xFFFF)/(float)0x10000; Y2 = (float)(y2>>16)+(float)(y2&0xFFFF)/(float)0x10000; pbox = REGION_RECTS(clipBoxes); nbox = REGION_NUM_RECTS(clipBoxes); while(nbox--) { float tx1=X1+(float)(pbox->x1 - dstBox->x1)*(X2-X1)/(float)(drw_w); float tx2=X1+(float)(pbox->x2 - dstBox->x1)*(src_w)/(float)(drw_w); float ty1=Y1+(float)(pbox->y1 - dstBox->y1)*(Y2-Y1)/(float)(drw_h); float ty2=Y1+(float)(pbox->y2 - dstBox->y1)*(src_h)/(float)(drw_h); int sx1=pbox->x1; int sx2=pbox->x2; int sy1=pbox->y1; int sy2=pbox->y2; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, refs, 3)) return BadImplementation; if (pNv->dev->chipset >= 0x110) { BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3); PUSH_DATA (push, 256); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA)); BEGIN_1IC0(push, NVC0_3D(CB_POS), 24 + 1); PUSH_DATA (push, 0x80); PUSH_DATAf(push, sx1); PUSH_DATAf(push, sy1); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, tx1); PUSH_DATAf(push, ty1); PUSH_DATAf(push, 0); PUSH_DATAf(push, 0); PUSH_DATAf(push, sx2+(sx2-sx1)); PUSH_DATAf(push, sy1); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, tx2+(tx2-tx1)); PUSH_DATAf(push, ty1); PUSH_DATAf(push, 0); PUSH_DATAf(push, 0); PUSH_DATAf(push, sx1); PUSH_DATAf(push, sy2+(sy2-sy1)); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, tx1); PUSH_DATAf(push, ty2+(ty2-ty1)); PUSH_DATAf(push, 0); PUSH_DATAf(push, 0); } BEGIN_NVC0(push, NVC0_3D(SCISSOR_HORIZ(0)), 2); PUSH_DATA (push, sx2 << NVC0_3D_SCISSOR_HORIZ_MAX__SHIFT | sx1); PUSH_DATA (push, sy2 << NVC0_3D_SCISSOR_VERT_MAX__SHIFT | sy1 ); BEGIN_NVC0(push, NVC0_3D(VERTEX_BEGIN_GL), 1); PUSH_DATA (push, NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES); if (pNv->dev->chipset < 0x110) { PUSH_VTX1s(push, tx1, ty1, sx1, sy1); PUSH_VTX1s(push, tx2+(tx2-tx1), ty1, sx2+(sx2-sx1), sy1); PUSH_VTX1s(push, tx1, ty2+(ty2-ty1), sx1, sy2+(sy2-sy1)); } else { BEGIN_NVC0(push, NVC0_3D(VERTEX_BUFFER_FIRST), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 3); } BEGIN_NVC0(push, NVC0_3D(VERTEX_END_GL), 1); PUSH_DATA (push, 0); pbox++; } PUSH_KICK(push); return Success; } void nvc0_xv_csc_update(NVPtr pNv, float yco, float *off, float *uco, float *vco) { struct nouveau_pushbuf *push = pNv->pushbuf; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, &(struct nouveau_pushbuf_refn) { pNv->scratch, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM }, 1)) return; BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3); PUSH_DATA (push, 256); PUSH_DATA (push, (pNv->scratch->offset + PFP_DATA) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PFP_DATA)); BEGIN_NVC0(push, NVC0_3D(CB_POS), 11); PUSH_DATA (push, 0); PUSH_DATAf(push, yco); PUSH_DATAf(push, off[0]); PUSH_DATAf(push, off[1]); PUSH_DATAf(push, off[2]); PUSH_DATAf(push, uco[0]); PUSH_DATAf(push, uco[1]); PUSH_DATAf(push, uco[2]); PUSH_DATAf(push, vco[0]); PUSH_DATAf(push, vco[1]); PUSH_DATAf(push, vco[2]); } xf86-video-nouveau-1.0.18/src/nv50_accel.h0000644000175000017500000000565214713424663013542 #ifndef __NV50_ACCEL_H__ #define __NV50_ACCEL_H__ #include "hwdefs/nv50_2d.xml.h" #include "hwdefs/nv50_3d.xml.h" #include "hwdefs/nv50_defs.xml.h" #include "hwdefs/nv50_texture.h" #include "hwdefs/nv_3ddefs.xml.h" #include "hwdefs/nv_m2mf.xml.h" #include "hwdefs/nv_object.xml.h" /* subchannel assignments - graphics channel */ #define SUBC_M2MF(mthd) 0, (mthd) #define NV03_M2MF(mthd) SUBC_M2MF(NV03_M2MF_##mthd) #define NV50_M2MF(mthd) SUBC_M2MF(NV50_M2MF_##mthd) #define SUBC_NVSW(mthd) 1, (mthd) #define SUBC_2D(mthd) 2, (mthd) #define NV50_2D(mthd) SUBC_2D(NV50_2D_##mthd) #define NVC0_2D(mthd) SUBC_2D(NVC0_2D_##mthd) #define SUBC_3D(mthd) 7, (mthd) #define NV50_3D(mthd) SUBC_3D(NV50_3D_##mthd) /* subchannel assignments - copy engine channel */ #define SUBC_COPY(mthd) 2, (mthd) /* scratch buffer offsets */ #define PVP_OFFSET 0x00000000 /* Vertex program */ #define PFP_OFFSET 0x00001000 /* Fragment program */ #define TIC_OFFSET 0x00002000 /* Texture Image Control */ #define TSC_OFFSET 0x00003000 /* Texture Sampler Control */ #define PVP_DATA 0x00004000 /* VP constbuf */ #define PFP_DATA 0x00004100 /* FP constbuf */ #define SOLID(i) (0x00006000 + (i) * 0x100) /* Fragment programs */ #define PFP_S 0x0000 /* (src) */ #define PFP_C 0x0100 /* (src IN mask) */ #define PFP_CCA 0x0200 /* (src IN mask) component-alpha */ #define PFP_CCASA 0x0300 /* (src IN mask) component-alpha src-alpha */ #define PFP_S_A8 0x0400 /* (src) a8 rt */ #define PFP_C_A8 0x0500 /* (src IN mask) a8 rt - same for CA and CA_SA */ #define PFP_NV12 0x0600 /* NV12 YUV->RGB */ /* Constant buffer assignments */ #define CB_PSH 0 #define CB_PVP 1 #define CB_PFP 2 static __inline__ void PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float sy, int dx, int dy) { BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(8)), 2); PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1); PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(8)), 2); PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1); PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } static __inline__ void PUSH_DATAu(struct nouveau_pushbuf *push, struct nouveau_bo *bo, unsigned delta, unsigned dwords) { const unsigned idx = (delta & 0x000000fc) >> 2; const unsigned off = (delta & 0xffffff00); BEGIN_NV04(push, NV50_3D(CB_DEF_ADDRESS_HIGH), 3); PUSH_DATA (push, (bo->offset + off) >> 32); PUSH_DATA (push, (bo->offset + off)); PUSH_DATA (push, (CB_PSH << NV50_3D_CB_DEF_SET_BUFFER__SHIFT) | 0x2000); BEGIN_NV04(push, NV50_3D(CB_ADDR), 1); PUSH_DATA (push, CB_PSH | (idx << NV50_3D_CB_ADDR_ID__SHIFT)); BEGIN_NI04(push, NV50_3D(CB_DATA(0)), dwords); } #endif xf86-video-nouveau-1.0.18/src/nv04_exa.c0000644000175000017500000003042314713424663013234 /* * Copyright 2003 NVIDIA, Corporation * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nv_rop.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv_m2mf.xml.h" #include "hwdefs/nv01_2d.xml.h" #include "nv04_accel.h" static void NV04EXASetPattern(NVPtr pNv, CARD32 clr0, CARD32 clr1, CARD32 pat0, CARD32 pat1) { struct nouveau_pushbuf *push = pNv->pushbuf; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvImagePattern->handle); BEGIN_NV04(push, NV01_PATT(MONOCHROME_COLOR(0)), 4); PUSH_DATA (push, clr0); PUSH_DATA (push, clr1); PUSH_DATA (push, pat0); PUSH_DATA (push, pat1); } static Bool NV04EXASetROP(PixmapPtr ppix, int subc, int mthd, int alu, Pixel planemask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (ppix->drawable.bitsPerPixel < 32) planemask |= ~0 << ppix->drawable.bitsPerPixel; if (planemask != ~0 || alu != GXcopy) { if (ppix->drawable.bitsPerPixel == 32) return FALSE; if (planemask != ~0) { NV04EXASetPattern(pNv, 0, planemask, ~0, ~0); if (pNv->currentRop != (alu + 32)) { BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvRop->handle); BEGIN_NV04(push, NV01_ROP(ROP), 1); PUSH_DATA (push, NVROP[alu].copy_planemask); pNv->currentRop = alu + 32; } } else if (pNv->currentRop != alu) { if(pNv->currentRop >= 16) NV04EXASetPattern(pNv, ~0, ~0, ~0, ~0); BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvRop->handle); BEGIN_NV04(push, NV01_ROP(ROP), 1); PUSH_DATA (push, NVROP[alu].copy); pNv->currentRop = alu; } BEGIN_NV04(push, subc, mthd, 1); PUSH_DATA (push, 1); /* ROP_AND */ } else { BEGIN_NV04(push, subc, mthd, 1); PUSH_DATA (push, 3); /* SRCCOPY */ } return TRUE; } Bool NV04EXAPrepareSolid(PixmapPtr ppix, int alu, Pixel planemask, Pixel fg) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); unsigned pitch = exaGetPixmapPitch(ppix); unsigned surf_fmt, rect_fmt; /* When SURFACE_FORMAT_A8R8G8B8 is used with GDI_RECTANGLE_TEXT, the * alpha channel gets forced to 0xFF for some reason. We're using * SURFACE_FORMAT_Y32 as a workaround */ if (!NVAccelGetCtxSurf2DFormatFromPixmap(ppix, (int*)&surf_fmt)) return FALSE; if (surf_fmt == NV04_SURFACE_2D_FORMAT_A8R8G8B8) surf_fmt = NV04_SURFACE_2D_FORMAT_Y32; rect_fmt = NV04_GDI_COLOR_FORMAT_A8R8G8B8; if (ppix->drawable.bitsPerPixel == 16) { if (ppix->drawable.depth == 16) rect_fmt = NV04_GDI_COLOR_FORMAT_A16R5G6B5; else rect_fmt = NV04_GDI_COLOR_FORMAT_X16A1R5G5B5; } if (!PUSH_SPACE(push, 64)) return FALSE; PUSH_RESET(push); if (!NV04EXASetROP(ppix, NV04_RECT(OPERATION), alu, planemask)) return FALSE; BEGIN_NV04(push, NV04_SF2D(FORMAT), 4); PUSH_DATA (push, surf_fmt); PUSH_DATA (push, (pitch << 16) | pitch); PUSH_MTHDl(push, NV04_SF2D(OFFSET_SOURCE), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); PUSH_MTHDl(push, NV04_SF2D(OFFSET_DESTIN), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); BEGIN_NV04(push, NV04_RECT(COLOR_FORMAT), 1); PUSH_DATA (push, rect_fmt); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return FALSE; } pNv->fg_colour = fg; return TRUE; } void NV04EXASolid (PixmapPtr pPixmap, int x, int y, int x2, int y2) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int w = x2 - x; int h = y2 - y; if (!PUSH_SPACE(push, 5)) return; BEGIN_NV04(push, NV04_RECT(COLOR1_A), 1); PUSH_DATA (push, pNv->fg_colour); BEGIN_NV04(push, NV04_RECT(UNCLIPPED_RECTANGLE_POINT(0)), 2); PUSH_DATA (push, (x << 16) | y); PUSH_DATA (push, (w << 16) | h); if ((w * h) >= 512) PUSH_KICK(push); } void NV04EXADoneSolid (PixmapPtr pPixmap) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); nouveau_pushbuf_bufctx(NVPTR(pScrn)->pushbuf, NULL); } Bool NV04EXAPrepareCopy(PixmapPtr pspix, PixmapPtr pdpix, int dx, int dy, int alu, Pixel planemask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pspix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *src_bo = nouveau_pixmap_bo(pspix); struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix); int surf_fmt; if (pspix->drawable.bitsPerPixel != pdpix->drawable.bitsPerPixel) return FALSE; if (!NVAccelGetCtxSurf2DFormatFromPixmap(pdpix, &surf_fmt)) return FALSE; if (!PUSH_SPACE(push, 64)) return FALSE; PUSH_RESET(push); if (!NV04EXASetROP(pdpix, NV01_BLIT(OPERATION), alu, planemask)) return FALSE; BEGIN_NV04(push, NV04_SF2D(FORMAT), 4); PUSH_DATA (push, surf_fmt); PUSH_DATA (push, (exaGetPixmapPitch(pdpix) << 16) | exaGetPixmapPitch(pspix)); PUSH_MTHDl(push, NV04_SF2D(OFFSET_SOURCE), src_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); PUSH_MTHDl(push, NV04_SF2D(OFFSET_DESTIN), dst_bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return FALSE; } pNv->pspix = pspix; pNv->pmpix = NULL; pNv->pdpix = pdpix; return TRUE; } void NV04EXACopy(PixmapPtr pdpix, int srcX, int srcY, int dstX, int dstY, int width, int height) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdpix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int split_dstY = NOUVEAU_ALIGN(dstY + 1, 64); int split_height = split_dstY - dstY; if (nouveau_pushbuf_space(push, 16, 2, 0)) return; if ((width * height) >= 200000 && pNv->pspix != pNv->pdpix && (dstY > srcY || dstX > srcX) && split_height < height) { /* * KLUDGE - Split the destination rectangle in an * upper misaligned half and a lower tile-aligned * half, then get IMAGE_BLIT to blit the lower piece * downwards (required for sync-to-vblank if the area * to be blitted is large enough). The blob does a * different (not nicer) trick to achieve the same * effect. */ struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix); unsigned dst_pitch = exaGetPixmapPitch(pdpix); BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3); PUSH_DATA (push, (srcY << 16) | srcX); PUSH_DATA (push, (dstY << 16) | dstX); PUSH_DATA (push, (split_height << 16) | width); BEGIN_NV04(push, NV04_SF2D(OFFSET_DESTIN), 1); PUSH_RELOC(push, dst_bo, split_dstY * dst_pitch, NOUVEAU_BO_LOW, 0, 0); srcY += split_height; height -= split_height; dstY = 0; pNv->pmpix = pdpix; } BEGIN_NV04(push, NV01_BLIT(POINT_IN), 3); PUSH_DATA (push, (srcY << 16) | srcX); PUSH_DATA (push, (dstY << 16) | dstX); PUSH_DATA (push, (height << 16) | width); if (pNv->pmpix) { struct nouveau_bo *dst_bo = nouveau_pixmap_bo(pdpix); BEGIN_NV04(push, NV04_SF2D(OFFSET_DESTIN), 1); PUSH_RELOC(push, dst_bo, 0, NOUVEAU_BO_LOW, 0, 0); pNv->pmpix = NULL; } if ((width * height) >= 512) PUSH_KICK(push); } void NV04EXADoneCopy(PixmapPtr pdpix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdpix->drawable.pScreen); nouveau_pushbuf_bufctx(NVPTR(pScrn)->pushbuf, NULL); } Bool NV04EXAUploadIFC(ScrnInfoPtr pScrn, const char *src, int src_pitch, PixmapPtr pdpix, int x, int y, int w, int h, int cpp) { NVPtr pNv = NVPTR(pScrn); ScreenPtr pScreen = pdpix->drawable.pScreen; struct nouveau_bo *bo = nouveau_pixmap_bo(pdpix); struct nouveau_pushbuf *push = pNv->pushbuf; int line_len = w * cpp; int surf_fmt, ifc_fmt; int iw, id, py, ph; int padbytes; Bool ret = FALSE; if (pNv->Architecture >= NV_TESLA) return FALSE; if (h > 1024) return FALSE; if (line_len < 4) return FALSE; switch (cpp) { case 2: ifc_fmt = 1; break; case 4: ifc_fmt = 4; break; default: return FALSE; } if (!NVAccelGetCtxSurf2DFormatFromPixmap(pdpix, &surf_fmt)) return FALSE; /* Pad out input width to cover both COLORA() and COLORB() */ iw = (line_len + 7) & ~7; padbytes = iw - line_len; id = iw / 4; /* line push size */ iw /= cpp; /* Don't support lines longer than max push size yet.. */ if (id > 1792) return FALSE; if (!PUSH_SPACE(push, 16)) return FALSE; PUSH_RESET(push); BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvClipRectangle->handle); BEGIN_NV04(push, NV01_CLIP(POINT), 2); PUSH_DATA (push, (y << 16) | x); PUSH_DATA (push, (h << 16) | w); BEGIN_NV04(push, NV04_SF2D(FORMAT), 4); PUSH_DATA (push, surf_fmt); PUSH_DATA (push, (exaGetPixmapPitch(pdpix) << 16) | exaGetPixmapPitch(pdpix)); PUSH_MTHDl(push, NV04_SF2D(OFFSET_SOURCE), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); PUSH_MTHDl(push, NV04_SF2D(OFFSET_DESTIN), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) goto out; py = y; ph = h; while (ph--) { if (PUSH_AVAIL(push) < id + 1 || (py == y)) { if (!PUSH_SPACE(push, id + 8)) goto out; BEGIN_NV04(push, NV01_IFC(OPERATION), 2); PUSH_DATA (push, NV01_IFC_OPERATION_SRCCOPY); PUSH_DATA (push, ifc_fmt); BEGIN_NV04(push, NV01_IFC(POINT), 3); PUSH_DATA (push, (py << 16) | x); PUSH_DATA (push, (h << 16) | w); PUSH_DATA (push, (h << 16) | iw); } /* send a line */ if (ph > 0 || !padbytes) { BEGIN_NV04(push, NV01_IFC(COLOR(0)), id); PUSH_DATAp(push, src, id); } else { char padding[8]; int aux = (padbytes + 7) >> 2; memcpy(padding, src + (id - aux) * 4, padbytes); BEGIN_NV04(push, NV01_IFC(COLOR(0)), id); PUSH_DATAp(push, src, id - aux); PUSH_DATAp(push, padding, aux); } src += src_pitch; py++; } ret = TRUE; out: nouveau_pushbuf_bufctx(push, NULL); if (pdpix == pScreen->GetScreenPixmap(pScreen)) PUSH_KICK(push); return ret; } Bool NV04EXARectM2MF(NVPtr pNv, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nv04_fifo *fifo = pNv->channel->data; struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; src_off += src_y * src_pitch + src_x * cpp; dst_off += dst_y * dst_pitch + dst_x * cpp; while (h) { int line_count = h; if (line_count > 2047) line_count = 2047; h -= line_count; if (nouveau_pushbuf_space(push, 16, 4, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; BEGIN_NV04(push, NV03_M2MF(DMA_BUFFER_IN), 2); PUSH_RELOC(push, src, 0, NOUVEAU_BO_OR, fifo->vram, fifo->gart); PUSH_RELOC(push, dst, 0, NOUVEAU_BO_OR, fifo->vram, fifo->gart); BEGIN_NV04(push, NV03_M2MF(OFFSET_IN), 8); PUSH_RELOC(push, src, src_off, NOUVEAU_BO_LOW, 0, 0); PUSH_RELOC(push, dst, dst_off, NOUVEAU_BO_LOW, 0, 0); PUSH_DATA (push, src_pitch); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, w * cpp); PUSH_DATA (push, line_count); PUSH_DATA (push, 0x00000101); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV04_GRAPH(M2MF, NOP), 1); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV03_M2MF(OFFSET_OUT), 1); PUSH_DATA (push, 0x00000000); src_off += src_pitch * line_count; dst_off += dst_pitch * line_count; } return TRUE; } xf86-video-nouveau-1.0.18/src/Makefile.am0000644000175000017500000001143514713424663013502 # Copyright 2005 Adam Jackson. # # 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 # ADAM JACKSON 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. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@ @LIBDRM_CFLAGS@ nouveau_drv_la_LTLIBRARIES = nouveau_drv.la nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@ \ @LIBUDEV_LIBS@ @LIBDRM_LIBS@ nouveau_drv_ladir = @moduledir@/drivers nouveau_drv_la_SOURCES = \ nouveau_copy.c \ nouveau_copy85b5.c \ nouveau_copy90b5.c \ nouveau_copya0b5.c \ nouveau_exa.c nouveau_xv.c nouveau_dri2.c \ nouveau_present.c \ nouveau_sync.c \ nouveau_wfb.c \ nv_accel_common.c \ nv_driver.c \ nv_shadow.c \ nv04_exa.c \ nv04_xv_ovl.c \ nv04_xv_blit.c \ nv10_exa.c \ nv10_xv_ovl.c \ nv30_exa.c \ nv30_xv_tex.c \ nv40_exa.c \ nv40_xv_tex.c \ nv50_accel.c \ nv50_exa.c \ nv50_xv.c \ nvc0_accel.c \ nvc0_exa.c \ nvc0_xv.c \ drmmode_display.c \ vl_hwmc.c EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \ hwdefs/nv_m2mf.xml.h \ hwdefs/nv_object.xml.h \ hwdefs/nv01_2d.xml.h \ hwdefs/nv10_3d.xml.h \ hwdefs/nv30-40_3d.xml.h \ hwdefs/nv50_2d.xml.h \ hwdefs/nv50_3d.xml.h \ hwdefs/nv50_defs.xml.h \ hwdefs/nv50_texture.h \ hwdefs/nvc0_3d.xml.h \ hwdefs/nvc0_m2mf.xml.h \ hwdefs/gm107_texture.xml.h \ shader/exac8nvc0.fp \ shader/exac8nvc0.fpc \ shader/exac8nve0.fp \ shader/exac8nve0.fpc \ shader/exac8nvf0.fp \ shader/exac8nvf0.fpc \ shader/exac8nv110.fp \ shader/exac8nv110.fpc \ shader/exacanvc0.fp \ shader/exacanvc0.fpc \ shader/exacanve0.fp \ shader/exacanve0.fpc \ shader/exacanvf0.fp \ shader/exacanvf0.fpc \ shader/exacanv110.fp \ shader/exacanv110.fpc \ shader/exacmnvc0.fp \ shader/exacmnvc0.fpc \ shader/exacmnve0.fp \ shader/exacmnve0.fpc \ shader/exacmnvf0.fp \ shader/exacmnvf0.fpc \ shader/exacmnv110.fp \ shader/exacmnv110.fpc \ shader/exas8nvc0.fp \ shader/exas8nvc0.fpc \ shader/exas8nve0.fp \ shader/exas8nve0.fpc \ shader/exas8nvf0.fp \ shader/exas8nvf0.fpc \ shader/exas8nv110.fp \ shader/exas8nv110.fpc \ shader/exasanvc0.fp \ shader/exasanvc0.fpc \ shader/exasanve0.fp \ shader/exasanve0.fpc \ shader/exasanvf0.fp \ shader/exasanvf0.fpc \ shader/exasanv110.fp \ shader/exasanv110.fpc \ shader/exascnvc0.fp \ shader/exascnvc0.fpc \ shader/exascnve0.fp \ shader/exascnve0.fpc \ shader/exascnvf0.fp \ shader/exascnvf0.fpc \ shader/exascnv110.fp \ shader/exascnv110.fpc \ shader/videonvc0.fp \ shader/videonvc0.fpc \ shader/videonve0.fp \ shader/videonve0.fpc \ shader/videonvf0.fp \ shader/videonvf0.fpc \ shader/videonv110.fp \ shader/videonv110.fpc \ shader/xfrm2nvc0.vp \ shader/xfrm2nvc0.vpc \ shader/xfrm2nve0.vp \ shader/xfrm2nve0.vpc \ shader/xfrm2nvf0.vp \ shader/xfrm2nvf0.vpc \ shader/xfrm2nv110.vp \ shader/xfrm2nv110.vpc \ shader/Makefile \ nouveau_local.h \ nouveau_copy.h \ nouveau_present.h \ nouveau_sync.h \ nv_const.h \ nv_dma.h \ nv_include.h \ nv_proto.h \ nv_rop.h \ nv_type.h \ nv04_accel.h \ nv50_accel.h \ nvc0_accel.h \ compat-api.h \ vl_hwmc.c \ vl_hwmc.h xf86-video-nouveau-1.0.18/src/nouveau_copy.h0000644000175000017500000000077714713424663014342 #ifndef __NVDDX_COPY_H__ #define __NVDDX_COPY_H__ #include "nv_include.h" #include "nouveau_local.h" Bool nouveau_copy_init(ScreenPtr); void nouveau_copy_fini(ScreenPtr); Bool nouveau_copy85b5_init(NVPtr); Bool nouveau_copy90b5_init(NVPtr); Bool nouveau_copya0b5_init(NVPtr); Bool nouveau_copya0b5_rect(struct nouveau_pushbuf *, struct nouveau_object *, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); #endif xf86-video-nouveau-1.0.18/src/nv30_exa.c0000644000175000017500000007612714713424663013246 /* * Copyright 2007 Ben Skeggs * Copyright 2007 Stephane Marchesin * Copyright 2007 Jeremy Kolb * Copyright 2007 Patrice Mandin * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv30-40_3d.xml.h" #include "nv04_accel.h" typedef struct nv_pict_surface_format { int pict_fmt; uint32_t card_fmt; } nv_pict_surface_format_t; typedef struct nv_pict_texture_format { int pict_fmt; uint32_t card_fmt; uint32_t card_swz; } nv_pict_texture_format_t; typedef struct nv_pict_op { Bool src_alpha; Bool dst_alpha; uint32_t src_card_op; uint32_t dst_card_op; } nv_pict_op_t; static nv_pict_surface_format_t NV30SurfaceFormat[] = { { PICT_a8r8g8b8 , 0x148 }, { PICT_a8b8g8r8 , 0x150 }, { PICT_x8r8g8b8 , 0x145 }, { PICT_x8b8g8r8 , 0x14f }, { PICT_r5g6b5 , 0x143 }, { PICT_a8 , 0x149 }, { PICT_x1r5g5b5 , 0x142 }, }; static nv_pict_surface_format_t * NV30_GetPictSurfaceFormat(int format) { int i; for(i=0;i= PictOpSaturate) return NULL; #if 0 switch(op) { case 0:ErrorF("Op Clear\n");break; case 1:ErrorF("Op Src\n");break; case 2:ErrorF("Op Dst\n");break; case 3:ErrorF("Op Over\n");break; case 4:ErrorF("Op OverReverse\n");break; case 5:ErrorF("Op In\n");break; case 6:ErrorF("Op InReverse\n");break; case 7:ErrorF("Op Out\n");break; case 8:ErrorF("Op OutReverse\n");break; case 9:ErrorF("Op Atop\n");break; case 10:ErrorF("Op AtopReverse\n");break; case 11:ErrorF("Op Xor\n");break; case 12:ErrorF("Op Add\n");break; } #endif return &NV30PictOp[op]; } static void NV30_SetupBlend(ScrnInfoPtr pScrn, nv_pict_op_t *blend, PictFormatShort dest_format, Bool component_alpha) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t sblend, dblend; sblend = blend->src_card_op; dblend = blend->dst_card_op; if (blend->dst_alpha) { if (!PICT_FORMAT_A(dest_format)) { if (sblend == BF(DST_ALPHA)) { sblend = BF(ONE); } else if (sblend == BF(ONE_MINUS_DST_ALPHA)) { sblend = BF(ZERO); } } else if (dest_format == PICT_a8) { if (sblend == BF(DST_ALPHA)) { sblend = BF(DST_COLOR); } else if (sblend == BF(ONE_MINUS_DST_ALPHA)) { sblend = BF(ONE_MINUS_DST_COLOR); } } } if (blend->src_alpha && (component_alpha || dest_format == PICT_a8)) { if (dblend == BF(SRC_ALPHA)) { dblend = BF(SRC_COLOR); } else if (dblend == BF(ONE_MINUS_SRC_ALPHA)) { dblend = BF(ONE_MINUS_SRC_COLOR); } } if (sblend == BF(ONE) && dblend == BF(ZERO)) { BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); } else { BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 3); PUSH_DATA (push, 1); PUSH_DATA (push, (sblend << 16) | sblend); PUSH_DATA (push, (dblend << 16) | dblend); } } static Bool NV30EXATexture(ScrnInfoPtr pScrn, PixmapPtr pPix, PicturePtr pPict, int unit) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pPix); nv_pict_texture_format_t *fmt; unsigned reloc = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD; uint32_t pitch = exaGetPixmapPitch(pPix); uint32_t log2h = log2i(pPix->drawable.height); uint32_t log2w = log2i(pPix->drawable.width); uint32_t card_filter, card_repeat; fmt = NV30_GetPictTextureFormat(pPict->format); if (!fmt) return FALSE; card_repeat = 3; /* repeatNone */ if (pPict->filter == PictFilterBilinear) card_filter = 2; else card_filter = 1; BEGIN_NV04(push, NV30_3D(TEX_OFFSET(unit)), 8); PUSH_MTHDl(push, NV30_3D(TEX_OFFSET(unit)), bo, 0, reloc); PUSH_MTHDs(push, NV30_3D(TEX_FORMAT(unit)), bo, (1 << 16) | 8 | NV30_3D_TEX_FORMAT_DIMS_2D | (fmt->card_fmt << NV30_3D_TEX_FORMAT_FORMAT__SHIFT) | (log2w << NV30_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT) | (log2h << NV30_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT), reloc, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); PUSH_DATA (push, (card_repeat << NV30_3D_TEX_WRAP_S__SHIFT) | (card_repeat << NV30_3D_TEX_WRAP_T__SHIFT) | (card_repeat << NV30_3D_TEX_WRAP_R__SHIFT)); PUSH_DATA (push, NV30_3D_TEX_ENABLE_ENABLE); PUSH_DATA (push, (pitch << NV30_3D_TEX_SWIZZLE_RECT_PITCH__SHIFT ) | fmt->card_swz); PUSH_DATA (push, (card_filter << NV30_3D_TEX_FILTER_MIN__SHIFT) | (card_filter << NV30_3D_TEX_FILTER_MAG__SHIFT) | 0x2000 /* engine lock */); PUSH_DATA (push, (pPix->drawable.width << NV30_3D_TEX_NPOT_SIZE_W__SHIFT) | pPix->drawable.height); PUSH_DATA (push, 0x00000000); /* border ARGB */ if (pPict->transform) { BEGIN_NV04(push, NV30_3D(TEX_MATRIX_ENABLE(unit)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV30_3D(TEX_MATRIX(unit, 0)), 16); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][1])); PUSH_DATAf(push, 0.f); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][2])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][1])); PUSH_DATAf(push, 0.f); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][2])); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][1])); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][2])); } else { BEGIN_NV04(push, NV30_3D(TEX_MATRIX_ENABLE(unit)), 1); PUSH_DATA (push, 0); } return TRUE; } #define RCSRC_COL(i) (0x01 + (unit)) #define RCSRC_TEX(i) (0x08 + (unit)) /* fragprog register */ #define RCSEL_COLOR (0x00) #define RCSEL_ALPHA (0x10) #define RCINP_ZERO (0x00) #define RCINP_ONE (0x20) #define RCINP_A__SHIFT 24 #define RCINP_B__SHIFT 16 static Bool NV30EXAPicture(ScrnInfoPtr pScrn, PixmapPtr pPix, PicturePtr pPict, int unit, uint32_t *color, uint32_t *alpha, uint32_t *solid) { uint32_t shift, source; if (pPict && pPict->pDrawable) { if (!NV30EXATexture(pScrn, pPix, pPict, unit)) return FALSE; *solid = 0x00000000; source = RCSRC_TEX(unit); } else if (pPict) { *solid = pPict->pSourcePict->solidFill.color; source = RCSRC_COL(unit); } if (pPict && PICT_FORMAT_RGB(pPict->format)) *color = RCSEL_COLOR | source; else *color = RCSEL_ALPHA | RCINP_ZERO; if (pPict && PICT_FORMAT_A(pPict->format)) *alpha = RCSEL_ALPHA | source; else *alpha = RCSEL_ALPHA | RCINP_ONE; if (unit) shift = RCINP_B__SHIFT; else shift = RCINP_A__SHIFT; *color <<= shift; *alpha <<= shift; return TRUE; } static Bool NV30_SetupSurface(ScrnInfoPtr pScrn, PixmapPtr pPix, PicturePtr pPict) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pPix); uint32_t pitch = exaGetPixmapPitch(pPix); nv_pict_surface_format_t *fmt; fmt = NV30_GetPictSurfaceFormat(pPict->format); if (!fmt) { ErrorF("AIII no format\n"); return FALSE; } BEGIN_NV04(push, NV30_3D(RT_FORMAT), 3); PUSH_DATA (push, fmt->card_fmt); /* format */ PUSH_DATA (push, pitch << 16 | pitch); PUSH_MTHDl(push, NV30_3D(COLOR0_OFFSET), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR); return TRUE; } static Bool NV30EXACheckCompositeTexture(PicturePtr pPict, PicturePtr pdPict, int op) { nv_pict_texture_format_t *fmt; int w = 1, h = 1; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; } else { if (pPict->pSourcePict->type != SourcePictTypeSolidFill) NOUVEAU_FALLBACK("gradient pictures unsupported\n"); } if ((w > 4096) || (h > 4096)) NOUVEAU_FALLBACK("picture too large, %dx%d\n", w, h); fmt = NV30_GetPictTextureFormat(pPict->format); if (!fmt) NOUVEAU_FALLBACK("picture format 0x%08x not supported\n", pPict->format); if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) NOUVEAU_FALLBACK("filter 0x%x not supported\n", pPict->filter); if (!(w==1 && h==1) && pPict->repeat && pPict->repeatType != RepeatNone) NOUVEAU_FALLBACK("repeat 0x%x not supported (surface %dx%d)\n", pPict->repeatType,w,h); /* Opengl and Render disagree on what should be sampled outside an XRGB * texture (with no repeating). Opengl has a hardcoded alpha value of * 1.0, while render expects 0.0. We assume that clipping is done for * untranformed sources. */ if (NV30PictOp[op].src_alpha && !pPict->repeat && pPict->transform && (PICT_FORMAT_A(pPict->format) == 0) && (PICT_FORMAT_A(pdPict->format) != 0)) NOUVEAU_FALLBACK("REPEAT_NONE unsupported for XRGB source\n"); return TRUE; } Bool NV30EXACheckComposite(int op, PicturePtr psPict, PicturePtr pmPict, PicturePtr pdPict) { nv_pict_surface_format_t *fmt; nv_pict_op_t *opr; opr = NV30_GetPictOpRec(op); if (!opr) NOUVEAU_FALLBACK("unsupported blend op 0x%x\n", op); fmt = NV30_GetPictSurfaceFormat(pdPict->format); if (!fmt) NOUVEAU_FALLBACK("dst picture format 0x%08x not supported\n", pdPict->format); if (!NV30EXACheckCompositeTexture(psPict, pdPict, op)) NOUVEAU_FALLBACK("src picture\n"); if (pmPict) { if (pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format) && opr->src_alpha && opr->src_card_op != BF(ZERO)) NOUVEAU_FALLBACK("mask CA + SA\n"); if (!NV30EXACheckCompositeTexture(pmPict, pdPict, op)) NOUVEAU_FALLBACK("mask picture\n"); } return TRUE; } Bool NV30EXAPrepareComposite(int op, PicturePtr psPict, PicturePtr pmPict, PicturePtr pdPict, PixmapPtr psPix, PixmapPtr pmPix, PixmapPtr pdPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); nv_pict_op_t *blend = NV30_GetPictOpRec(op); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t sc, sa, mc, ma, solid[2]; if (!PUSH_SPACE(push, 128)) return FALSE; PUSH_RESET(push); /* setup render target and blending */ if (!NV30_SetupSurface(pScrn, pdPix, pdPict)) return FALSE; NV30_SetupBlend(pScrn, blend, pdPict->format, (pmPict && pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format))); /* select picture sources */ if (!NV30EXAPicture(pScrn, psPix, psPict, 0, &sc, &sa, &solid[0])) return FALSE; if (!NV30EXAPicture(pScrn, pmPix, pmPict, 1, &mc, &ma, &solid[1])) return FALSE; /* configure register combiners */ BEGIN_NV04(push, NV30_3D(RC_IN_ALPHA(0)), 6); PUSH_DATA (push, sa | ma); if (pmPict && pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format)) { if (blend->src_alpha) PUSH_DATA(push, sa | mc); else PUSH_DATA(push, sc | mc); } else { PUSH_DATA(push, sc | ma); } PUSH_DATA (push, solid[0]); PUSH_DATA (push, solid[1]); PUSH_DATA (push, 0x00000c00); PUSH_DATA (push, 0x00000c00); BEGIN_NV04(push, NV30_3D(RC_FINAL0), 3); if (pdPict->format != PICT_a8) PUSH_DATA (push, 0x0000000c); else PUSH_DATA (push, 0x0000001c); PUSH_DATA (push, 0x00001c00); PUSH_DATA (push, 0x01000101); /* select fragprog which just sources textures for combiners */ BEGIN_NV04(push, NV30_3D(FP_ACTIVE_PROGRAM), 1); PUSH_MTHD (push, NV30_3D(FP_ACTIVE_PROGRAM), pNv->scratch, PFP_PASS, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR, NV30_3D_FP_ACTIVE_PROGRAM_DMA0, NV30_3D_FP_ACTIVE_PROGRAM_DMA1); BEGIN_NV04(push, NV30_3D(FP_REG_CONTROL), 1); PUSH_DATA (push, 0x0001000f); BEGIN_NV04(push, NV30_3D(FP_CONTROL), 1); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV30_3D(TEX_UNITS_ENABLE), 1); PUSH_DATA (push, 3); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return FALSE; } return TRUE; } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2); PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } void NV30EXAComposite(PixmapPtr pdPix, int sx, int sy, int mx, int my, int dx, int dy, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (!PUSH_SPACE(push, 64)) return; /* We're drawing a triangle, we need to scissor it to a quad. */ /* The scissors are here for a good reason, we don't get the full * image, but just a part. */ /* Handling the cliprects is done for us already. */ BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, (w << 16) | dx); PUSH_DATA (push, (h << 16) | dy); BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_TRIANGLES); PUSH_VTX2s(push, sx, sy + (h * 2), mx, my + (h * 2), dx, dy + (h * 2)); PUSH_VTX2s(push, sx, sy, mx, my, dx, dy); PUSH_VTX2s(push, sx + (w * 2), sy, mx + (w * 2), my, dx + (w * 2), dy); BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_STOP); } void NV30EXADoneComposite(PixmapPtr pdPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); nouveau_pushbuf_bufctx(NVPTR(pScrn)->pushbuf, NULL); } Bool NVAccelInitNV30TCL(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; uint32_t class = 0, chipset; int i; NVXVComputeBicubicFilter(pNv->scratch, XV_TABLE, XV_TABLE_SIZE); #define NV30TCL_CHIPSET_3X_MASK 0x00000003 #define NV35TCL_CHIPSET_3X_MASK 0x000001e0 #define NV30_3D_CHIPSET_3X_MASK 0x00000010 chipset = pNv->dev->chipset; if ((chipset & 0xf0) != NV_ARCH_30) return TRUE; chipset &= 0xf; if (NV30TCL_CHIPSET_3X_MASK & (1<scrnIndex, X_ERROR, "NV30EXA: Unknown chipset NV3%1x\n", chipset); return FALSE; } if (nouveau_object_new(pNv->channel, Nv3D, class, NULL, 0, &pNv->Nv3D)) return FALSE; if (!PUSH_SPACE(push, 256)) return FALSE; BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, pNv->Nv3D->handle); BEGIN_NV04(push, NV30_3D(DMA_TEXTURE0), 3); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->gart); PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV30_3D(DMA_UNK1AC), 1); PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV30_3D(DMA_COLOR0), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV30_3D(DMA_UNK1B0), 1); PUSH_DATA (push, fifo->vram); for (i=1; i<8; i++) { BEGIN_NV04(push, NV30_3D(VIEWPORT_CLIP_HORIZ(i)), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); } BEGIN_NV04(push, NV30_3D(RT_ENABLE), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV40_3D(MIPMAP_ROUNDING), 1); PUSH_DATA (push, NV40_3D_MIPMAP_ROUNDING_MODE_DOWN); BEGIN_NV04(push, NV30_3D(FLATSHADE_FIRST), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, SUBC_3D(0x1d80), 1); PUSH_DATA (push, 3); BEGIN_NV04(push, NV30_3D(FP_REG_CONTROL), 1); PUSH_DATA (push, 0x00030004); /* NEW */ BEGIN_NV04(push, SUBC_3D(0x1e98), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, SUBC_3D(0x17e0), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0x3f800000); BEGIN_NV04(push, SUBC_3D(0x1f80), 16); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0x0000ffff); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(FLIP_SET_READ), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV15_BLIT(FLIP_SET_READ), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV30_3D(COORD_CONVENTIONS), 1); PUSH_DATA (push, 0x00001200); BEGIN_NV04(push, NV30_3D(MULTISAMPLE_CONTROL), 1); PUSH_DATA (push, 0xffff0000); /* Attempt to setup a known state.. Probably missing a heap of * stuff here.. */ BEGIN_NV04(push, NV30_3D(STENCIL_ENABLE(0)), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(STENCIL_ENABLE(1)), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(ALPHA_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(DEPTH_WRITE_ENABLE), 2); PUSH_DATA (push, 0); /* wr disable */ PUSH_DATA (push, 0); /* test disable */ BEGIN_NV04(push, NV30_3D(COLOR_MASK), 1); PUSH_DATA (push, 0x01010101); /* TR,TR,TR,TR */ BEGIN_NV04(push, NV30_3D(CULL_FACE_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 5); PUSH_DATA (push, 0); /* Blend enable */ PUSH_DATA (push, 0); /* Blend src */ PUSH_DATA (push, 0); /* Blend dst */ PUSH_DATA (push, 0x00000000); /* Blend colour */ PUSH_DATA (push, 0x8006); /* FUNC_ADD */ BEGIN_NV04(push, NV30_3D(COLOR_LOGIC_OP_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0x1503 /*GL_COPY*/); BEGIN_NV04(push, NV30_3D(DITHER_ENABLE), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV30_3D(SHADE_MODEL), 1); PUSH_DATA (push, 0x1d01 /*GL_SMOOTH*/); BEGIN_NV04(push, NV30_3D(POLYGON_OFFSET_FACTOR),2); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); BEGIN_NV04(push, NV30_3D(POLYGON_MODE_FRONT), 2); PUSH_DATA (push, 0x1b02 /*GL_FILL*/); PUSH_DATA (push, 0x1b02 /*GL_FILL*/); /* - Disable texture units * - Set fragprog to MOVR result.color, fragment.color */ for (i=0;i<4;i++) { BEGIN_NV04(push, NV30_3D(TEX_ENABLE(i)), 1); PUSH_DATA (push, 0); } /* Polygon stipple */ BEGIN_NV04(push, NV30_3D(POLYGON_STIPPLE_PATTERN(0)), 0x20); for (i=0;i<0x20;i++) PUSH_DATA (push, 0xFFFFFFFF); BEGIN_NV04(push, NV30_3D(DEPTH_RANGE_NEAR), 2); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); /* Ok. If you start X with the nvidia driver, kill it, and then * start X with nouveau you will get black rendering instead of * what you'd expect. This fixes the problem, and it seems that * it's not needed between nouveau restarts - which suggests that * the 3D context (wherever it's stored?) survives somehow. */ //BEGIN_NV04(push, NV30_3D(FP_CONTROL),1); //PUSH_DATA (push, 0x03008000); int w=4096; int h=4096; int pitch=4096*4; BEGIN_NV04(push, NV30_3D(RT_HORIZ), 5); PUSH_DATA (push, w<<16); PUSH_DATA (push, h<<16); PUSH_DATA (push, 0x148); /* format */ PUSH_DATA (push, pitch << 16 | pitch); PUSH_DATA (push, 0x0); BEGIN_NV04(push, NV30_3D(VIEWPORT_TX_ORIGIN), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2); PUSH_DATA (push, (w<<16) | 0); PUSH_DATA (push, (h<<16) | 0); BEGIN_NV04(push, NV30_3D(VIEWPORT_CLIP_HORIZ(0)), 2); PUSH_DATA (push, (w-1)<<16); PUSH_DATA (push, (h-1)<<16); BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, w<<16); PUSH_DATA (push, h<<16); BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2); PUSH_DATA (push, w<<16); PUSH_DATA (push, h<<16); BEGIN_NV04(push, NV30_3D(VIEWPORT_TRANSLATE_X), 8); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); BEGIN_NV04(push, NV30_3D(MODELVIEW_MATRIX(0)), 16); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV30_3D(PROJECTION_MATRIX(0)), 16); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, 4096<<16); PUSH_DATA (push, 4096<<16); PUSH_DATAu(push, pNv->scratch, PFP_PASS, 2 * 4); PUSH_DATAs(push, 0x18009e80); /* txph r0, a[tex0], t[0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x1802be83); /* txph r1, a[tex1], t[1] */ PUSH_DATAs(push, 0x1c9dc801); /* exit */ PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAu(push, pNv->scratch, PFP_NV12_BILINEAR, 8 * 4); PUSH_DATAs(push, 0x17028200); /* texr r0.x, a[tex0], t[1] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x04000e02); /* madr r1.xyz, r0.x, imm.x, imm.yzww */ PUSH_DATAs(push, 0x1c9c0000); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001f202); PUSH_DATAs(push, 0x3f9507c8); /* { 1.16, -0.87, 0.53, -1.08 } */ PUSH_DATAs(push, 0xbf5ee393); PUSH_DATAs(push, 0x3f078fef); PUSH_DATAs(push, 0xbf8a6762); PUSH_DATAs(push, 0x1704ac80); /* texr r0.yz, a[tex1], t[2] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x04000e02); /* madr r1.xyz, r0.y, imm, r1 */ PUSH_DATAs(push, 0x1c9cab00); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x00000000); /* { 0.00, -0.39, 2.02, 0.00 } */ PUSH_DATAs(push, 0xbec890d6); PUSH_DATAs(push, 0x40011687); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x04000e81); /* madr r0.xyz, r0.z, imm, r1 */ PUSH_DATAs(push, 0x1c9d5500); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x3fcc432d); /* { 1.60, -0.81, 0.00, 0.00 } */ PUSH_DATAs(push, 0xbf501a37); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAu(push, pNv->scratch, PFP_NV12_BICUBIC, 24 * 4); PUSH_DATAs(push, 0x01008604); /* movr r2.xy, a[tex0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x03000600); /* addr r0.xy, r2, imm.x */ PUSH_DATAs(push, 0x1c9dc808); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3f000000); /* { 0.50, 0.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x17000e06); /* texr r3.xyz, r0, t[0] */ PUSH_DATAs(push, 0x1c9dc800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x17000e00); /* texr r0.xyz, r0.y, t[0] */ PUSH_DATAs(push, 0x1c9caa00); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x02000a02); /* mulr r1.xz, r3.xxyy, imm.xxyy */ PUSH_DATAs(push, 0x1c9ca00c); PUSH_DATAs(push, 0x0000a002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0xbf800000); /* { -1.00, 1.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x3f800000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x02001402); /* mulr r1.yw, r0.xxyy, imm.xxyy */ PUSH_DATAs(push, 0x1c9ca000); PUSH_DATAs(push, 0x0000a002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0xbf800000); /* { -1.00, 1.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x3f800000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x03001e04); /* addr r2, r2.xyxy, r1 */ PUSH_DATAs(push, 0x1c9c8808); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x17020200); /* texr r0.x, r2, t[1] */ PUSH_DATAs(push, 0x1c9dc808); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x17020402); /* texr r1.y, r2.xwxw, t[1] */ PUSH_DATAs(push, 0x1c9d9808); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x17020202); /* texr r1.x, r2.zyxy, t[1] */ PUSH_DATAs(push, 0x1c9c8c08); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x1f400280); /* lrph r0.x, r0.z, r0, r1.y */ PUSH_DATAs(push, 0x1c9d5400); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0000aa04); PUSH_DATAs(push, 0x17020400); /* texr r0.y, r2.zwzz, t[1] */ PUSH_DATAs(push, 0x1c9d5c08); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x1f400480); /* lrph r0.y, r0.z, r1.x, r0 */ PUSH_DATAs(push, 0x1c9d5400); PUSH_DATAs(push, 0x00000004); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x1f400280); /* lrph r0.x, r3.z, r0, r0.y */ PUSH_DATAs(push, 0x1c9d540c); PUSH_DATAs(push, 0x0001c900); PUSH_DATAs(push, 0x0000ab00); PUSH_DATAs(push, 0x04400e80); /* madh r0.xyz, r0.x, imm.x, imm.yzww */ PUSH_DATAs(push, 0x1c9c0100); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001f202); PUSH_DATAs(push, 0x3f9507c8); /* { 1.16, -0.87, 0.53, -1.08 } */ PUSH_DATAs(push, 0xbf5ee393); PUSH_DATAs(push, 0x3f078fef); PUSH_DATAs(push, 0xbf8a6762); PUSH_DATAs(push, 0x1704ac02); /* texr r1.yz, a[tex1], t[2] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x04400e80); /* madh r0.xyz, r1.y, imm, r0 */ PUSH_DATAs(push, 0x1c9caa04); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c900); PUSH_DATAs(push, 0x00000000); /* { 0.00, -0.39, 2.02, 0.00 } */ PUSH_DATAs(push, 0xbec890d6); PUSH_DATAs(push, 0x40011687); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x04400e81); /* madh r0.xyz, r1.z, imm, r0 */ PUSH_DATAs(push, 0x1c9d5404); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c900); PUSH_DATAs(push, 0x3fcc432d); /* { 1.60, -0.81, 0.00, 0.00 } */ PUSH_DATAs(push, 0xbf501a37); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); return TRUE; } xf86-video-nouveau-1.0.18/src/nv_rop.h0000644000175000017500000002137114713424663013122 /* * Copyright 2008 Maarten Maathuis * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ /* Ternary Raster Operations as defined by GDI * 0 = black * 1 = white * D = destination * S = source * P = pattern * o = bitwise OR * a = bitwise AND * n = bitwise inverse * x = bitwise XOR * * The notation is reverse polish. * Example: * ROP_PDSonon: !(P | !(D | S)) */ #define ROP_0 0x00 #define ROP_DPSoon 0x01 #define ROP_DPSona 0x02 #define ROP_PSon 0x03 #define ROP_SDPona 0x04 #define ROP_DPon 0x05 #define ROP_PDSxnon 0x06 #define ROP_PDSaon 0x07 #define ROP_SDPnaa 0x08 #define ROP_PDSxon 0x09 #define ROP_DPna 0x0A #define ROP_PSDnaon 0x0B #define ROP_SPna 0x0C #define ROP_PDSnaon 0x0D #define ROP_PDSonon 0x0E #define ROP_Pn 0x0F #define ROP_PDSona 0x10 #define ROP_DSon 0x11 #define ROP_SDPxnon 0x12 #define ROP_SDPaon 0x13 #define ROP_DPSxnon 0x14 #define ROP_DPSaon 0x15 #define ROP_PSDPSanaxx 0x16 #define ROP_SSPxDSxaxn 0x17 #define ROP_SPxPDxa 0x18 #define ROP_SDPSanaxn 0x19 #define ROP_PDSPaox 0x1A #define ROP_SDPSxaxn 0x1B #define ROP_PSDPaox 0x1C #define ROP_DSPDxaxn 0x1D #define ROP_PDSox 0x1E #define ROP_PDSoan 0x1F #define ROP_DPSnaa 0x20 #define ROP_SDPxon 0x21 #define ROP_DSna 0x22 #define ROP_SPDnaon 0x23 #define ROP_SPxDSxa 0x24 #define ROP_PDSPanaxn 0x25 #define ROP_SDPSaox 0x26 #define ROP_SDPSxnox 0x27 #define ROP_DPSxa 0x28 #define ROP_PSDPSaoxxn 0x29 #define ROP_DPSana 0x2A #define ROP_SSPxPDxaxn 0x2B #define ROP_SPDSoax 0x2C #define ROP_PSDnox 0x2D #define ROP_PSDPxox 0x2E #define ROP_PSDnoan 0x2F #define ROP_PSna 0x30 #define ROP_SDPnaon 0x31 #define ROP_SDPSoox 0x32 #define ROP_Sn 0x33 #define ROP_SPDSaox 0x34 #define ROP_SPDSxnox 0x35 #define ROP_SDPox 0x36 #define ROP_SDPoan 0x37 #define ROP_PSDPoax 0x38 #define ROP_SPDnox 0x39 #define ROP_SPDSxox 0x3A #define ROP_SPDnoan 0x3B #define ROP_PSx 0x3C #define ROP_SPDSonox 0x3D #define ROP_SPDSnaox 0x3E #define ROP_PSan 0x3F #define ROP_PSDnaa 0x40 #define ROP_DPSxon 0x41 #define ROP_SDxPDxa 0x42 #define ROP_SPDSanaxn 0x43 #define ROP_SDna 0x44 #define ROP_DPSnaon 0x45 #define ROP_DSPDaox 0x46 #define ROP_PSDPxaxn 0x47 #define ROP_SDPxa 0x48 #define ROP_PDSPDaoxxn 0x49 #define ROP_DPSDoax 0x4A #define ROP_PDSnox 0x4B #define ROP_SDPana 0x4C #define ROP_SSPxDSxoxn 0x4D #define ROP_PDSPxox 0x4E #define ROP_PDSnoan 0x4F #define ROP_PDna 0x50 #define ROP_DSPnaon 0x51 #define ROP_DPSDaox 0x52 #define ROP_SPDSxaxn 0x53 #define ROP_DPSonon 0x54 #define ROP_Dn 0x55 #define ROP_DPSox 0x56 #define ROP_DPSoan 0x57 #define ROP_PDSPoax 0x58 #define ROP_DPSnox 0x59 #define ROP_DPx 0x5A #define ROP_DPSDonox 0x5B #define ROP_DPSDxox 0x5C #define ROP_DPSnoan 0x5D #define ROP_DPSDnaox 0x5E #define ROP_DPan 0x5F #define ROP_PDSxa 0x60 #define ROP_DSPDSaoxxn 0x61 #define ROP_DSPDoax 0x62 #define ROP_SDPnox 0x63 #define ROP_SDPSoax 0x64 #define ROP_DSPnox 0x65 #define ROP_DSx 0x66 #define ROP_SDPSonox 0x67 #define ROP_DSPDSonoxxn 0x68 #define ROP_PDSxxn 0x69 #define ROP_DPSax 0x6A #define ROP_PSDPSoaxxn 0x6B #define ROP_SDPax 0x6C #define ROP_PDSPDoaxxn 0x6D #define ROP_SDPSnoax 0x6E #define ROP_PDSxnan 0x6F #define ROP_PDSana 0x70 #define ROP_SSDxPDxaxn 0x71 #define ROP_SDPSxox 0x72 #define ROP_SDPnoan 0x73 #define ROP_DSPDxox 0x74 #define ROP_DSPnoan 0x75 #define ROP_SDPSnaox 0x76 #define ROP_DSan 0x77 #define ROP_PDSax 0x78 #define ROP_DSPDSoaxxn 0x79 #define ROP_DPSDnoax 0x7A #define ROP_SDPxnan 0x7B #define ROP_SPDSnoax 0x7C #define ROP_DPSxnan 0x7D #define ROP_SPxDSxo 0x7E #define ROP_DPSaan 0x7F #define ROP_DPSaa 0x80 #define ROP_SPxDSxon 0x81 #define ROP_DPSxna 0x82 #define ROP_SPDSnoaxn 0x83 #define ROP_SDPxna 0x84 #define ROP_PDSPnoaxn 0x85 #define ROP_DSPDSoaxx 0x86 #define ROP_PDSaxn 0x87 #define ROP_DSa 0x88 #define ROP_SDPSnaoxn 0x89 #define ROP_DSPnoa 0x8A #define ROP_DSPDxoxn 0x8B #define ROP_SDPnoa 0x8C #define ROP_SDPSxoxn 0x8D #define ROP_SSDxPDxax 0x8E #define ROP_PDSanan 0x8F #define ROP_PDSxna 0x90 #define ROP_SDPSnoaxn 0x91 #define ROP_DPSDPoaxx 0x92 #define ROP_SPDaxn 0x93 #define ROP_PSDPSoaxx 0x94 #define ROP_DPSaxn 0x95 #define ROP_DPSxx 0x96 #define ROP_PSDPSonoxx 0x97 #define ROP_SDPSonoxn 0x98 #define ROP_DSxn 0x99 #define ROP_DPSnax 0x9A #define ROP_SDPSoaxn 0x9B #define ROP_SPDnax 0x9C #define ROP_DSPDoaxn 0x9D #define ROP_DSPDSaoxx 0x9E #define ROP_PDSxan 0x9F #define ROP_DPa 0xA0 #define ROP_PDSPnaoxn 0xA1 #define ROP_DPSnoa 0xA2 #define ROP_DPSDxoxn 0xA3 #define ROP_PDSPonoxn 0xA4 #define ROP_PDxn 0xA5 #define ROP_DSPnax 0xA6 #define ROP_PDSPoaxn 0xA7 #define ROP_DPSoa 0xA8 #define ROP_DPSoxn 0xA9 #define ROP_D 0xAA #define ROP_DPSono 0xAB #define ROP_SPDSxax 0xAC #define ROP_DPSDaoxn 0xAD #define ROP_DSPnao 0xAE #define ROP_DPno 0xAF #define ROP_PDSnoa 0xB0 #define ROP_PDSPxoxn 0xB1 #define ROP_SSPxDSxox 0xB2 #define ROP_SDPanan 0xB3 #define ROP_PSDnax 0xB4 #define ROP_DPSDoaxn 0xB5 #define ROP_DPSDPaoxx 0xB6 #define ROP_SDPxan 0xB7 #define ROP_PSDPxax 0xB8 #define ROP_DSPDaoxn 0xB9 #define ROP_DPSnao 0xBA #define ROP_DSno 0xBB #define ROP_SPDSanax 0xBC #define ROP_SDxPDxan 0xBD #define ROP_DPSxo 0xBE #define ROP_DPSano 0xBF #define ROP_Psa 0xC0 #define ROP_SPDSnaoxn 0xC1 #define ROP_SPDSonoxn 0xC2 #define ROP_PSxn 0xC3 #define ROP_SPDnoa 0xC4 #define ROP_SPDSxoxn 0xC5 #define ROP_SDPnax 0xC6 #define ROP_PSDPoaxn 0xC7 #define ROP_SDPoa 0xC8 #define ROP_SPDoxn 0xC9 #define ROP_DPSDxax 0xCA #define ROP_SPDSaoxn 0xCB #define ROP_S 0xCC #define ROP_SDPono 0xCD #define ROP_SDPnao 0xCE #define ROP_SPno 0xCF #define ROP_PSDnoa 0xD0 #define ROP_PSDPxoxn 0xD1 #define ROP_PDSnax 0xD2 #define ROP_SPDSoaxn 0xD3 #define ROP_SSPxPDxax 0xD4 #define ROP_DPSanan 0xD5 #define ROP_PSDPSaoxx 0xD6 #define ROP_DPSxan 0xD7 #define ROP_PDSPxax 0xD8 #define ROP_SDPSaoxn 0xD9 #define ROP_DPSDanax 0xDA #define ROP_SPxDSxan 0xDB #define ROP_SPDnao 0xDC #define ROP_SDno 0xDD #define ROP_SDPxo 0xDE #define ROP_SDPano 0xDF #define ROP_PDSoa 0xE0 #define ROP_PDSoxn 0xE1 #define ROP_DSPDxax 0xE2 #define ROP_PSDPaoxn 0xE3 #define ROP_SDPSxax 0xE4 #define ROP_PDSPaoxn 0xE5 #define ROP_SDPSanax 0xE6 #define ROP_SPxPDxan 0xE7 #define ROP_SSPxDSxax 0xE8 #define ROP_DSPDSanaxxn 0xE9 #define ROP_DPSao 0xEA #define ROP_DPSxno 0xEB #define ROP_SDPao 0xEC #define ROP_SDPxno 0xED #define ROP_DSo 0xEE #define ROP_SDPnoo 0xEF #define ROP_P 0xF0 #define ROP_PDSono 0xF1 #define ROP_PDSnao 0xF2 #define ROP_PSno 0xF3 #define ROP_PSDnao 0xF4 #define ROP_PDno 0xF5 #define ROP_PDSxo 0xF6 #define ROP_PDSano 0xF7 #define ROP_PDSao 0xF8 #define ROP_PDSxno 0xF9 #define ROP_DPo 0xFA #define ROP_DPSnoo 0xFB #define ROP_PSo 0xFC #define ROP_PSDnoo 0xFD #define ROP_DPSoo 0xFE #define ROP_1 0xFF /* derived from XAA */ static struct { int copy; int copy_planemask; int pattern; int pattern_planemask; } NVROP[] = { { ROP_0, ROP_0, ROP_0, ROP_DPna }, /* GXclear */ { ROP_DSa, ROP_DSPnoa, ROP_DPa, ROP_DPSnoa }, /* GXand */ { ROP_SDna, ROP_DPSnaon, ROP_PDna, ROP_DSPnaon }, /* GXandReverse */ { ROP_S, ROP_DPSDxax, ROP_P, ROP_DSPDxax }, /* GXcopy */ { ROP_DSna, ROP_DPSana, ROP_DPna, ROP_DPSana }, /* GXandInverted */ { ROP_D, ROP_D, ROP_D, ROP_D }, /* GXnoop */ { ROP_DSx, ROP_DPSax, ROP_DPx, ROP_DPSax }, /* GXxor */ { ROP_DSo, ROP_DPSao, ROP_DPo, ROP_DPSao }, /* GXor */ { ROP_DSon, ROP_DPSaon, ROP_DPon, ROP_DPSaon }, /* GXnor */ { ROP_DSxn, ROP_DPSaxn, ROP_PDxn, ROP_DPSaxn }, /* GXequiv */ { ROP_Dn, ROP_Dn, ROP_Dn, ROP_DPx }, /* GXinvert */ { ROP_SDno, ROP_DPSanan, ROP_PDno, ROP_DPSanan }, /* GXorReverse */ { ROP_Sn, ROP_PSDPxox, ROP_Pn, ROP_SPDSxox }, /* GXcopyInverted */ { ROP_DSno, ROP_DPSnao, ROP_DPno, ROP_DSPnao }, /* GXorInverted */ { ROP_DSan, ROP_DSPnoan, ROP_DPan, ROP_DPSnoan }, /* GXnand */ { ROP_1, ROP_1, ROP_1, ROP_DPo } /* GXset */ }; xf86-video-nouveau-1.0.18/src/nv04_xv_blit.c0000644000175000017500000001521014713424663014123 /* * Copyright 2007 Arthur Huillet * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv01_2d.xml.h" #include "nv04_accel.h" #define FOURCC_RGB 0x0000003 #define VSYNC_POSSIBLE (pNv->dev->chipset >= 0x11) extern Atom xvSetDefaults, xvSyncToVBlank; Bool NVPutBlitImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset, int id, int src_pitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, short width, short height, short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes, PixmapPtr ppix) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_BLIT_PRIVATE(pNv); BoxPtr pbox; int nbox; CARD32 dsdx, dtdy; CARD32 dst_size, dst_point; CARD32 src_point, src_format; struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nv04_fifo *fifo = pNv->channel->data; int dst_format; if (!NVAccelGetCtxSurf2DFormatFromPixmap(ppix, &dst_format)) return BadImplementation; pbox = REGION_RECTS(clipBoxes); nbox = REGION_NUM_RECTS(clipBoxes); dsdx = (src_w << 20) / drw_w; dtdy = (src_h << 20) / drw_h; dst_size = ((dstBox->y2 - dstBox->y1) << 16) | (dstBox->x2 - dstBox->x1); dst_point = (dstBox->y1 << 16) | dstBox->x1; src_point = ((y1 << 4) & 0xffff0000) | (x1 >> 12); switch(id) { case FOURCC_RGB: src_format = NV03_SIFM_COLOR_FORMAT_X8R8G8B8; break; case FOURCC_UYVY: src_format = NV03_SIFM_COLOR_FORMAT_YB8V8YA8U8; break; default: src_format = NV03_SIFM_COLOR_FORMAT_V8YB8U8YA8; break; } if (!PUSH_SPACE(push, 128)) return BadImplementation; PUSH_RESET(push); BEGIN_NV04(push, NV04_SF2D(FORMAT), 4); PUSH_DATA (push, dst_format); PUSH_DATA (push, (exaGetPixmapPitch(ppix) << 16) | exaGetPixmapPitch(ppix)); PUSH_MTHDl(push, NV04_SF2D(OFFSET_SOURCE), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); PUSH_MTHDl(push, NV04_SF2D(OFFSET_DESTIN), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, pNv->NvScaledImage->handle); BEGIN_NV04(push, NV03_SIFM(DMA_IMAGE), 1); PUSH_MTHDo(push, NV03_SIFM(DMA_IMAGE), src, NOUVEAU_BO_RD | NOUVEAU_BO_VRAM | NOUVEAU_BO_GART, fifo->vram, fifo->gart); if (pNv->dev->chipset >= 0x05) { BEGIN_NV04(push, NV03_SIFM(COLOR_FORMAT), 2); PUSH_DATA (push, src_format); PUSH_DATA (push, NV03_SIFM_OPERATION_SRCCOPY); } else { BEGIN_NV04(push, NV03_SIFM(COLOR_FORMAT), 1); PUSH_DATA (push, src_format); } nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return BadAlloc; } if (pPriv->SyncToVBlank) NV11SyncToVBlank(ppix, dstBox); while (nbox--) { if (!PUSH_SPACE(push, 16)) { nouveau_pushbuf_bufctx(push, NULL); return BadImplementation; } BEGIN_NV04(push, NV04_RECT(COLOR1_A), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV03_SIFM(CLIP_POINT), 6); PUSH_DATA (push, (pbox->y1 << 16) | pbox->x1); PUSH_DATA (push, (pbox->y2 - pbox->y1) << 16 | (pbox->x2 - pbox->x1)); PUSH_DATA (push, dst_point); PUSH_DATA (push, dst_size); PUSH_DATA (push, dsdx); PUSH_DATA (push, dtdy); BEGIN_NV04(push, NV03_SIFM(SIZE), 4); PUSH_DATA (push, (height << 16) | width); PUSH_DATA (push, NV03_SIFM_FORMAT_FILTER_BILINEAR | NV03_SIFM_FORMAT_ORIGIN_CENTER | src_pitch); PUSH_RELOC(push, src, src_offset, NOUVEAU_BO_LOW, 0, 0); PUSH_DATA (push, src_point); pbox++; } nouveau_pushbuf_bufctx(push, NULL); PUSH_KICK(push); exaMarkSync(pScrn->pScreen); pPriv->videoStatus = FREE_TIMER; pPriv->videoTime = currentTime.milliseconds + FREE_DELAY; extern void NVVideoTimerCallback(ScrnInfoPtr, Time); pNv->VideoTimerCallback = NVVideoTimerCallback; return Success; } /** * NVSetBlitPortAttribute * sets the attribute "attribute" of port "data" to value "value" * supported attributes: * - xvSyncToVBlank (values: 0,1) * - xvSetDefaults (values: NA; SyncToVBlank will be set, if hardware supports it) * * @param pScrenInfo * @param attribute attribute to set * @param value value to which attribute is to be set * @param data port from which the attribute is to be set * * @return Success, if setting is successful * BadValue/BadMatch, if value/attribute are invalid */ int NVSetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; NVPtr pNv = NVPTR(pScrn); if ((attribute == xvSyncToVBlank) && VSYNC_POSSIBLE) { if ((value < 0) || (value > 1)) return BadValue; pPriv->SyncToVBlank = value; } else if (attribute == xvSetDefaults) { pPriv->SyncToVBlank = VSYNC_POSSIBLE; } else return BadMatch; return Success; } /** * NVGetBlitPortAttribute * reads the value of attribute "attribute" from port "data" into INT32 "*value" * currently only one attribute supported: xvSyncToVBlank * * @param pScrn unused * @param attribute attribute to be read * @param value value of attribute will be stored here * @param data port from which attribute will be read * @return Success, if queried attribute exists */ int NVGetBlitPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if(attribute == xvSyncToVBlank) *value = (pPriv->SyncToVBlank) ? 1 : 0; else return BadMatch; return Success; } /** * NVStopBlitVideo */ void NVStopBlitVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) { } xf86-video-nouveau-1.0.18/src/nv_include.h0000644000175000017500000000232114713424663013737 #ifndef __NV_INCLUDE_H__ #define __NV_INCLUDE_H__ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include /* All drivers should typically include these */ #include "xf86.h" #include "xf86_OSproc.h" #define PPC_MMIO_IS_BE #include "compiler.h" /* Drivers that need to access the PCI config space directly need this */ #include "xf86Pci.h" #ifdef XSERVER_PLATFORM_BUS #include "xf86platformBus.h" #endif /* All drivers initialising the SW cursor need this */ #include "mipointer.h" #include "micmap.h" #include "xf86DDC.h" #include "xf86RandR12.h" #include "nv_const.h" #include "dixstruct.h" #include "scrnintstr.h" #include "fb.h" #include "xf86cmap.h" #include "shadowfb.h" #include "xf86xv.h" #include #include "xf86Cursor.h" #include "xf86DDC.h" #include "region.h" #include #ifdef HAVE_XEXTPROTO_71 #include #else #define DPMS_SERVER #include #endif #define NV_DMA_DEBUG 0 #include "compat-api.h" #include "nouveau_local.h" #include "nv_type.h" #include "nv_proto.h" #include "nv_dma.h" #endif /* __NV_INCLUDE_H__ */ xf86-video-nouveau-1.0.18/src/nv_const.h0000644000175000017500000000272714713424663013454 #ifndef __NV_CONST_H__ #define __NV_CONST_H__ #define NV_VERSION 4000 #define NV_NAME "NOUVEAU" #define NV_DRIVER_NAME "nouveau" typedef enum { OPTION_SW_CURSOR, OPTION_HW_CURSOR, OPTION_NOACCEL, OPTION_SHADOW_FB, OPTION_VIDEO_KEY, OPTION_WFB, OPTION_GLX_VBLANK, OPTION_ZAPHOD_HEADS, OPTION_PAGE_FLIP, OPTION_SWAP_LIMIT, OPTION_ASYNC_COPY, OPTION_ACCELMETHOD, OPTION_DRI, } NVOpts; static const OptionInfoRec NVOptions[] = { { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE }, { OPTION_WFB, "WrappedFB", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_GLX_VBLANK, "GLXVBlank", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE }, { OPTION_PAGE_FLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SWAP_LIMIT, "SwapLimit", OPTV_INTEGER, {0}, FALSE }, { OPTION_ASYNC_COPY, "AsyncUTSDFS", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, { OPTION_DRI, "DRI", OPTV_INTEGER, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; #endif /* __NV_CONST_H__ */ xf86-video-nouveau-1.0.18/src/nv_proto.h0000644000175000017500000002447314713424663013473 #ifndef __NV_PROTO_H__ #define __NV_PROTO_H__ /* in drmmode_display.c */ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp); void drmmode_adjust_frame(ScrnInfoPtr pScrn, int x, int y); void drmmode_remove_fb(ScrnInfoPtr pScrn); Bool drmmode_cursor_init(ScreenPtr pScreen); void drmmode_fbcon_copy(ScreenPtr pScreen); Bool drmmode_page_flip(DrawablePtr draw, PixmapPtr back, void *priv, unsigned int ref_crtc_hw_id); void drmmode_screen_init(ScreenPtr pScreen); void drmmode_screen_fini(ScreenPtr pScreen); int drmmode_crtc(xf86CrtcPtr crtc); Bool xf86_crtc_on(xf86CrtcPtr crtc); int drmmode_head(xf86CrtcPtr crtc); void drmmode_swap(ScrnInfoPtr, uint32_t, uint32_t *); void *drmmode_event_queue(ScrnInfoPtr, uint64_t name, unsigned size, void (*)(void *, uint64_t, uint64_t, uint32_t), void **token); void drmmode_event_abort(ScrnInfoPtr, uint64_t name, bool pending); int drmmode_event_flush(ScrnInfoPtr); /* in nv_accel_common.c */ Bool NVAccelCommonInit(ScrnInfoPtr pScrn); void NVAccelCommonFini(ScrnInfoPtr pScrn); Bool NVAccelGetCtxSurf2DFormatFromPixmap(PixmapPtr pPix, int *fmt_ret); Bool NVAccelGetCtxSurf2DFormatFromPicture(PicturePtr pPix, int *fmt_ret); PixmapPtr NVGetDrawablePixmap(DrawablePtr pDraw); void NV11SyncToVBlank(PixmapPtr ppix, BoxPtr box); Bool nouveau_allocate_surface(ScrnInfoPtr scrn, int width, int height, int bpp, int usage_hint, int *pitch, struct nouveau_bo **bo); /* in nouveau_dri2.c */ Bool nouveau_dri2_init(ScreenPtr pScreen); void nouveau_dri2_fini(ScreenPtr pScreen); Bool nouveau_dri3_screen_init(ScreenPtr pScreen); /* in nouveau_xv.c */ void NVInitVideo(ScreenPtr); void NVTakedownVideo(ScrnInfoPtr); void NVSetPortDefaults (ScrnInfoPtr pScrn, NVPortPrivPtr pPriv); void NVXVComputeBicubicFilter(struct nouveau_bo *, unsigned, unsigned); unsigned int nv_window_belongs_to_crtc(ScrnInfoPtr, int, int, int, int); xf86CrtcPtr nouveau_pick_best_crtc(ScrnInfoPtr pScrn, int x, int y, int w, int h); RRCrtcPtr randr_crtc_covering_drawable(DrawablePtr pDraw); /* in nouveau_exa.c */ Bool nouveau_exa_init(ScreenPtr pScreen); Bool nouveau_exa_pixmap_is_onscreen(PixmapPtr pPixmap); bool nv50_style_tiled_pixmap(PixmapPtr ppix); Bool NVAccelM2MF(NVPtr pNv, int w, int h, int cpp, uint32_t srco, uint32_t dsto, struct nouveau_bo *s, int sd, int sp, int sh, int sx, int sy, struct nouveau_bo *d, int dd, int dp, int dh, int dx, int dy); /* in nouveau_wfb.c */ void nouveau_wfb_setup_wrap(ReadMemoryProcPtr *, WriteMemoryProcPtr *, DrawablePtr); void nouveau_wfb_finish_wrap(DrawablePtr); /* in nv_shadow.c */ void NVRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); /* in nv04_video_overlay.c */ void NV04PutOverlayImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr clipBoxes); int NV04SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); int NV04GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); void NV04StopOverlay(ScrnInfoPtr); /* in nv04_video_blitter.c */ Bool NVPutBlitImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr, PixmapPtr); int NVSetBlitPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); int NVGetBlitPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); void NVStopBlitVideo(ScrnInfoPtr, pointer, Bool); /* in nv04_exa.c */ Bool NV04EXAPrepareSolid(PixmapPtr, int, Pixel, Pixel); void NV04EXASolid(PixmapPtr, int, int, int, int); void NV04EXADoneSolid(PixmapPtr); Bool NV04EXAPrepareCopy(PixmapPtr, PixmapPtr, int, int, int, Pixel); void NV04EXACopy(PixmapPtr, int, int, int, int, int, int); void NV04EXADoneCopy(PixmapPtr); Bool NV04EXAUploadIFC(ScrnInfoPtr, const char *src, int src_pitch, PixmapPtr pdPix, int x, int y, int w, int h, int cpp); Bool NV04EXARectM2MF(NVPtr pNv, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); /* in nv10_exa.c */ Bool NVAccelInitNV10TCL(ScrnInfoPtr pScrn); Bool NV10EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr); Bool NV10EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); void NV10EXAComposite(PixmapPtr, int, int, int, int, int, int, int, int); void NV10EXADoneComposite(PixmapPtr); /* in nv10_video_overlay.c */ void NV10PutOverlayImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, short, short, short, short, short, short, RegionPtr clipBoxes); int NV10SetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); int NV10GetOverlayPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); void NV10StopOverlay(ScrnInfoPtr); void NV10WriteOverlayParameters(ScrnInfoPtr); /* in nv30_exa.c */ Bool NVAccelInitNV30TCL(ScrnInfoPtr pScrn); Bool NV30EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr); Bool NV30EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); void NV30EXAComposite(PixmapPtr, int, int, int, int, int, int, int, int); void NV30EXADoneComposite(PixmapPtr); /* in nv30_video_texture.c */ int NV30PutTextureImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); void NV30StopTexturedVideo(ScrnInfoPtr, pointer, Bool); int NV30GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); int NV30SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, pointer); /* in nv40_exa.c */ Bool NVAccelInitNV40TCL(ScrnInfoPtr pScrn); Bool NV40EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr); Bool NV40EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); void NV40EXAComposite(PixmapPtr, int, int, int, int, int, int, int, int); void NV40EXADoneComposite(PixmapPtr); /* in nv40_video_texture.c */ int NV40PutTextureImage(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); void NV40StopTexturedVideo(ScrnInfoPtr, pointer, Bool); int NV40GetTexturePortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); int NV40SetTexturePortAttribute(ScrnInfoPtr, Atom, INT32, pointer); /* in nv50_accel.c */ void NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box); Bool NVAccelInitM2MF_NV50(ScrnInfoPtr pScrn); Bool NVAccelInit2D_NV50(ScrnInfoPtr pScrn); Bool NVAccelInitNV50TCL(ScrnInfoPtr pScrn); /* in nvc0_accel.c */ void NVC0SyncToVBlank(PixmapPtr ppix, BoxPtr box); Bool NVAccelInitM2MF_NVC0(ScrnInfoPtr pScrn); Bool NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn); Bool NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn); Bool NVAccelInit2D_NVC0(ScrnInfoPtr pScrn); Bool NVAccelInit3D_NVC0(ScrnInfoPtr pScrn); /* in nv50_exa.c */ Bool NV50EXAPrepareSolid(PixmapPtr, int, Pixel, Pixel); void NV50EXASolid(PixmapPtr, int, int, int, int); void NV50EXADoneSolid(PixmapPtr); Bool NV50EXAPrepareCopy(PixmapPtr, PixmapPtr, int, int, int, Pixel); void NV50EXACopy(PixmapPtr, int, int, int, int, int, int); void NV50EXADoneCopy(PixmapPtr); Bool NV50EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr); Bool NV50EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); void NV50EXAComposite(PixmapPtr, int, int, int, int, int, int, int, int); void NV50EXADoneComposite(PixmapPtr); Bool NV50EXAUploadSIFC(const char *src, int src_pitch, PixmapPtr pdPix, int x, int y, int w, int h, int cpp); Bool NV50EXARectM2MF(NVPtr pNv, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); /* in nvc0_exa.c */ Bool NVC0AccelUploadM2MF(PixmapPtr pdpix, int x, int y, int w, int h, const char *src, int src_pitch); Bool NVC0AccelDownloadM2MF(PixmapPtr pspix, int x, int y, int w, int h, char *dst, unsigned dst_pitch); Bool NVC0EXAPrepareSolid(PixmapPtr, int, Pixel, Pixel); void NVC0EXASolid(PixmapPtr, int, int, int, int); void NVC0EXADoneSolid(PixmapPtr); Bool NVC0EXAPrepareCopy(PixmapPtr, PixmapPtr, int, int, int, Pixel); void NVC0EXACopy(PixmapPtr, int, int, int, int, int, int); void NVC0EXADoneCopy(PixmapPtr); Bool NVC0EXACheckComposite(int, PicturePtr, PicturePtr, PicturePtr); Bool NVC0EXAPrepareComposite(int, PicturePtr, PicturePtr, PicturePtr, PixmapPtr, PixmapPtr, PixmapPtr); void NVC0EXAComposite(PixmapPtr, int, int, int, int, int, int, int, int); void NVC0EXADoneComposite(PixmapPtr); Bool NVC0EXAUploadSIFC(const char *src, int src_pitch, PixmapPtr pdPix, int x, int y, int w, int h, int cpp); Bool NVC0EXARectM2MF(NVPtr pNv, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); Bool NVE0EXARectCopy(NVPtr pNv, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); /* nv50_xv.c */ int nv50_xv_image_put(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); void nv50_xv_video_stop(ScrnInfoPtr, pointer, Bool); int nv50_xv_port_attribute_set(ScrnInfoPtr, Atom, INT32, pointer); int nv50_xv_port_attribute_get(ScrnInfoPtr, Atom, INT32 *, pointer); void nv50_xv_set_port_defaults(ScrnInfoPtr, NVPortPrivPtr); void nv50_xv_csc_update(ScrnInfoPtr, NVPortPrivPtr); /* nvc0_xv.c */ int nvc0_xv_image_put(ScrnInfoPtr, struct nouveau_bo *, int, int, int, int, BoxPtr, int, int, int, int, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, RegionPtr, PixmapPtr, NVPortPrivPtr); void nvc0_xv_csc_update(NVPtr, float, float *, float *, float *); /* To support EXA 2.0, 2.1 has this in the header */ #ifndef exaMoveInPixmap extern void exaMoveInPixmap(PixmapPtr pPixmap); #endif extern Bool wfbPictureInit(ScreenPtr, PictFormatPtr, int); extern Bool wfbScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); #endif /* __NV_PROTO_H__ */ xf86-video-nouveau-1.0.18/src/nv_dma.h0000644000175000017500000000125714713424663013064 #ifndef NV_DMA_H #define NV_DMA_H #define NVDEBUG if (NV_DMA_DEBUG) ErrorF enum DMAObjects { NvNullObject = 0x00000000, NvContextSurfaces = 0x80000010, NvRop = 0x80000011, NvImagePattern = 0x80000012, NvClipRectangle = 0x80000013, NvSolidLine = 0x80000014, NvImageBlit = 0x80000015, NvRectangle = 0x80000016, NvScaledImage = 0x80000017, NvMemFormat = 0x80000018, Nv3D = 0x80000019, NvImageFromCpu = 0x8000001A, NvContextBeta1 = 0x8000001B, NvContextBeta4 = 0x8000001C, Nv2D = 0x80000020, NvSW = 0x80000021, NvDmaFB = 0xbeef0201, NvDmaTT = 0xbeef0202, NvDmaNotifier0 = 0xD8000003, NvVBlankSem = 0xD8000004, }; #endif /* NV_DMA_H */ xf86-video-nouveau-1.0.18/src/nv10_exa.c0000644000175000017500000005576114713424663013245 /* * Copyright 2007 Stephane Marchesin * Copyright 2007 Arthur Huillet * Copyright 2007 Peter Winters * Copyright 2009 Francisco Jerez * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "nv_include.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv10_3d.xml.h" #include "nv04_accel.h" /* Texture/Render target formats. */ static struct pict_format { int exa; int hw; } nv10_tex_format_pot[] = { { PICT_a8, 0x80 }, { PICT_r5g6b5, 0x280 }, { PICT_x8r8g8b8, 0x300 }, { PICT_a8r8g8b8, 0x300 }, {}, }, nv10_tex_format_rect[] = { { PICT_a8, 0x980 }, { PICT_r5g6b5, 0x880 }, { PICT_x8r8g8b8, 0x900 }, { PICT_a8r8g8b8, 0x900 }, {}, }, nv20_tex_format_rect[] = { { PICT_a8, 0xd80 }, { PICT_r5g6b5, 0x880 }, { PICT_x8r8g8b8, 0x900 }, { PICT_a8r8g8b8, 0x900 }, {}, }, nv10_rt_format[] = { { PICT_r5g6b5, 0x103 }, { PICT_x8r8g8b8, 0x108 }, { PICT_a8r8g8b8, 0x108 }, {}, }; static int get_tex_format(NVPtr pNv, PicturePtr pict) { /* If repeat is set we're always handling a 1x1 texture with * ARGB/XRGB destination, in that case we change the format to * use the POT (swizzled) matching format. */ struct pict_format *format = pict->repeat != RepeatNone ? nv10_tex_format_pot : pNv->Architecture == NV_ARCH_20 ? nv20_tex_format_rect : nv10_tex_format_rect; for (; format->hw; format++) { if (format->exa == pict->format) return format->hw; } return 0; } static int get_rt_format(PicturePtr pict) { struct pict_format *format = nv10_rt_format; for (; format->hw; format++) { if (format->exa == pict->format) return format->hw; } return 0; } /* Blending functions. */ #define SF(x) NV10_3D_BLEND_FUNC_SRC_##x #define DF(x) NV10_3D_BLEND_FUNC_DST_##x static struct pict_op { int src; int dst; } nv10_pict_op[] = { { SF(ZERO), DF(ZERO) }, /* Clear */ { SF(ONE), DF(ZERO) }, /* Src */ { SF(ZERO), DF(ONE) }, /* Dst */ { SF(ONE), DF(ONE_MINUS_SRC_ALPHA) }, /* Over */ { SF(ONE_MINUS_DST_ALPHA), DF(ONE) }, /* OverReverse */ { SF(DST_ALPHA), DF(ZERO) }, /* In */ { SF(ZERO), DF(SRC_ALPHA) }, /* InReverse */ { SF(ONE_MINUS_DST_ALPHA), DF(ZERO) }, /* Out */ { SF(ZERO), DF(ONE_MINUS_SRC_ALPHA) }, /* OutReverse */ { SF(DST_ALPHA), DF(ONE_MINUS_SRC_ALPHA) }, /* Atop */ { SF(ONE_MINUS_DST_ALPHA), DF(SRC_ALPHA) }, /* AtopReverse */ { SF(ONE_MINUS_DST_ALPHA), DF(ONE_MINUS_SRC_ALPHA) }, /* Xor */ { SF(ONE), DF(ONE) }, /* Add */ }; static inline Bool needs_src_alpha(int op) { return nv10_pict_op[op].dst == DF(ONE_MINUS_SRC_ALPHA) || nv10_pict_op[op].dst == DF(SRC_ALPHA); } static inline Bool needs_src(int op) { return nv10_pict_op[op].src != SF(ZERO); } static inline Bool effective_component_alpha(PicturePtr mask) { return mask && mask->componentAlpha && PICT_FORMAT_RGB(mask->format); } static Bool check_texture(NVPtr pNv, PicturePtr pict) { int w = 1, h = 1; if (pict->pDrawable) { w = pict->pDrawable->width; h = pict->pDrawable->height; } else { if (pict->pSourcePict->type != SourcePictTypeSolidFill) NOUVEAU_FALLBACK("gradient pictures unsupported\n"); } if (w > 2046 || h > 2046) NOUVEAU_FALLBACK("picture too large, %dx%d\n", w, h); if (!get_tex_format(pNv, pict)) return FALSE; if (pict->filter != PictFilterNearest && pict->filter != PictFilterBilinear) return FALSE; /* We cannot repeat on NV10 because NPOT textures do not * support this. unfortunately. */ if (pict->repeat != RepeatNone) /* we can repeat 1x1 textures */ if (!(w == 1 && h == 1)) return FALSE; return TRUE; } static Bool check_render_target(PicturePtr pict) { int w = pict->pDrawable->width; int h = pict->pDrawable->height; if (w > 4096 || h > 4096) return FALSE; if (!get_rt_format(pict)) return FALSE; return TRUE; } static Bool check_pict_op(int op) { /* We do no saturate, disjoint, conjoint, though we * could do e.g. DisjointClear which really is * Clear. */ return op < PictOpSaturate; } #if 0 static void print_fallback_info(char *reason, int op, PicturePtr src, PicturePtr mask, PicturePtr dst) { char out2[4096]; char *out = out2; sprintf(out, "%s ", reason); out += strlen(out); switch (op) { case PictOpClear: sprintf(out, "PictOpClear "); break; case PictOpSrc: sprintf(out, "PictOpSrc "); break; case PictOpDst: sprintf(out, "PictOpDst "); break; case PictOpOver: sprintf(out, "PictOpOver "); break; case PictOpOutReverse: sprintf(out, "PictOpOutReverse "); break; case PictOpAdd: sprintf(out, "PictOpAdd "); break; default: sprintf(out, "PictOp%d ", op); } out += strlen(out); switch (src->format) { case PICT_a8r8g8b8: sprintf(out, "A8R8G8B8 "); break; case PICT_x8r8g8b8: sprintf(out, "X8R8G8B8 "); break; case PICT_x8b8g8r8: sprintf(out, "X8B8G8R8 "); break; case PICT_r5g6b5: sprintf(out, "R5G6B5 "); break; case PICT_a8: sprintf(out, "A8 "); break; case PICT_a1: sprintf(out, "A1 "); break; default: sprintf(out, "%x ", src->format); } out += strlen(out); sprintf(out, "(%dx%d) ", src->pDrawable->width, src->pDrawable->height); if (src->repeat != RepeatNone) strcat(out, "R "); strcat(out, "-> "); out += strlen(out); switch (dst->format) { case PICT_a8r8g8b8: sprintf(out, "A8R8G8B8 "); break; case PICT_x8r8g8b8: sprintf(out, "X8R8G8B8 "); break; case PICT_x8b8g8r8: sprintf(out, "X8B8G8R8 "); break; case PICT_r5g6b5: sprintf(out, "R5G6B5 "); break; case PICT_a8: sprintf(out, "A8 "); break; case PICT_a1: sprintf(out, "A1 "); break; default: sprintf(out, "%x ", dst->format); } out += strlen(out); sprintf(out, "(%dx%d) ", dst->pDrawable->width, dst->pDrawable->height); if (dst->repeat != RepeatNone) strcat(out, "R "); out += strlen(out); if (!mask) sprintf(out, "& NONE"); else { switch (mask->format) { case PICT_a8r8g8b8: sprintf(out, "& A8R8G8B8 "); break; case PICT_x8r8g8b8: sprintf(out, "& X8R8G8B8 "); break; case PICT_x8b8g8r8: sprintf(out, "& X8B8G8R8 "); break; case PICT_a8: sprintf(out, "& A8 "); break; case PICT_a1: sprintf(out, "& A1 "); break; default: sprintf(out, "& %x ", mask->format); } out += strlen(out); sprintf(out, "(%dx%d) ", mask->pDrawable->width, mask->pDrawable->height); if (mask->repeat != RepeatNone) strcat(out, "R "); if (mask->componentAlpha) strcat(out, "C "); out += strlen(out); } strcat(out, "\n"); xf86DrvMsg(0, X_INFO, "%s", out2); } #else #define print_fallback_info(...) #endif Bool NV10EXACheckComposite(int op, PicturePtr src, PicturePtr mask, PicturePtr dst) { ScrnInfoPtr pScrn = xf86ScreenToScrn(dst->pDrawable->pScreen); NVPtr pNv = NVPTR(pScrn); if (!check_pict_op(op)) { print_fallback_info("pictop", op, src, mask, dst); return FALSE; } if (!check_render_target(dst)) { print_fallback_info("dst", op, src, mask, dst); return FALSE; } if (!check_texture(pNv, src)) { print_fallback_info("src", op, src, mask, dst); return FALSE; } if (mask) { if (!check_texture(pNv, mask)) { print_fallback_info("mask", op, src, mask, dst); return FALSE; } if (effective_component_alpha(mask) && needs_src(op) && needs_src_alpha(op)) { print_fallback_info("ca-mask", op, src, mask, dst); return FALSE; } } print_fallback_info("Accelerating", op, src, mask, dst); return TRUE; } static Bool setup_texture(NVPtr pNv, int unit, PicturePtr pict, PixmapPtr pixmap) { struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pixmap); unsigned reloc = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD; unsigned h = pict->pDrawable->height; unsigned w = pict->pDrawable->width; unsigned format; format = NV10_3D_TEX_FORMAT_WRAP_T_CLAMP_TO_EDGE | NV10_3D_TEX_FORMAT_WRAP_S_CLAMP_TO_EDGE | log2i(w) << 20 | log2i(h) << 16 | 1 << 12 | /* lod == 1 */ get_tex_format(pNv, pict) | 0x50 /* UNK */; /* NPOT_SIZE expects an even number for width, we can round up uneven * numbers here because EXA always gives 64 byte aligned pixmaps and * for all formats we support 64 bytes represents an even number of * pixels */ w = (w + 1) & ~1; BEGIN_NV04(push, NV10_3D(TEX_OFFSET(unit)), 1); PUSH_MTHDl(push, NV10_3D(TEX_OFFSET(unit)), bo, 0, reloc); BEGIN_NV04(push, NV10_3D(TEX_FORMAT(unit)), 1); PUSH_MTHDs(push, NV10_3D(TEX_FORMAT(unit)), bo, format, reloc, NV10_3D_TEX_FORMAT_DMA0, NV10_3D_TEX_FORMAT_DMA1); BEGIN_NV04(push, NV10_3D(TEX_ENABLE(unit)), 1 ); PUSH_DATA (push, NV10_3D_TEX_ENABLE_ENABLE); BEGIN_NV04(push, NV10_3D(TEX_NPOT_PITCH(unit)), 1); PUSH_DATA (push, exaGetPixmapPitch(pixmap) << 16); BEGIN_NV04(push, NV10_3D(TEX_NPOT_SIZE(unit)), 1); PUSH_DATA (push, (w << 16) | h); BEGIN_NV04(push, NV10_3D(TEX_FILTER(unit)), 1); if (pict->filter == PictFilterNearest) PUSH_DATA(push, NV10_3D_TEX_FILTER_MAGNIFY_NEAREST | NV10_3D_TEX_FILTER_MINIFY_NEAREST); else PUSH_DATA(push, NV10_3D_TEX_FILTER_MAGNIFY_LINEAR | NV10_3D_TEX_FILTER_MINIFY_LINEAR); if (pict->transform) { BEGIN_NV04(push, NV10_3D(TEX_MATRIX_ENABLE(unit)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV10_3D(TEX_MATRIX(unit, 0)), 16); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[0][0])); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[0][1])); PUSH_DATAf(push, 0.f); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[0][2])); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[1][0])); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[1][1])); PUSH_DATAf(push, 0.f); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[1][2])); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[2][0])); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[2][1])); PUSH_DATAf(push, 0.0f); PUSH_DATAf(push, xFixedToFloat(pict->transform->matrix[2][2])); } else { BEGIN_NV04(push, NV10_3D(TEX_MATRIX_ENABLE(unit)), 1); PUSH_DATA (push, 0); } return TRUE; } static Bool setup_render_target(NVPtr pNv, PicturePtr pict, PixmapPtr pixmap) { struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pixmap); BEGIN_NV04(push, NV10_3D(RT_FORMAT), 3); PUSH_DATA (push, get_rt_format(pict)); PUSH_DATA (push, (exaGetPixmapPitch(pixmap) << 16 | exaGetPixmapPitch(pixmap))); PUSH_MTHDl(push, NV10_3D(COLOR_OFFSET), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR); return TRUE; } static void setup_blend_function(NVPtr pNv, PicturePtr pdpict, PicturePtr pmpict, int alu) { struct nouveau_pushbuf *push = pNv->pushbuf; struct pict_op *op = &nv10_pict_op[alu]; int src_factor = op->src; int dst_factor = op->dst; if (src_factor == SF(ONE_MINUS_DST_ALPHA) && !PICT_FORMAT_A(pdpict->format)) /* ONE_MINUS_DST_ALPHA doesn't always do the right thing for * framebuffers without alpha channel. But it's the same as * ZERO in that case. */ src_factor = SF(ZERO); if (effective_component_alpha(pmpict)) { if (dst_factor == DF(SRC_ALPHA)) dst_factor = DF(SRC_COLOR); else if (dst_factor == DF(ONE_MINUS_SRC_ALPHA)) dst_factor = DF(ONE_MINUS_SRC_COLOR); } BEGIN_NV04(push, NV10_3D(BLEND_FUNC_SRC), 2); PUSH_DATA (push, src_factor); PUSH_DATA (push, dst_factor); BEGIN_NV04(push, NV10_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 1); } #define RCSRC_COL(i) (0x01 + (unit)) #define RCSRC_TEX(i) (0x08 + (unit)) #define RCSEL_COLOR (0x00) #define RCSEL_ALPHA (0x10) #define RCINP_ZERO (0x00) #define RCINP_ONE (0x20) #define RCINP_A__SHIFT 24 #define RCINP_B__SHIFT 16 static Bool setup_picture(NVPtr pNv, PicturePtr pict, PixmapPtr pixmap, int unit, uint32_t *color, uint32_t *alpha) { struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t shift, source; if (pict && pict->pDrawable) { if (!setup_texture(pNv, unit, pict, pixmap)) return FALSE; source = RCSRC_TEX(unit); } else if (pict) { BEGIN_NV04(push, NV10_3D(RC_COLOR(unit)), 1); PUSH_DATA (push, pict->pSourcePict->solidFill.color); source = RCSRC_COL(unit); } if (pict && PICT_FORMAT_RGB(pict->format)) *color = RCSEL_COLOR | source; else *color = RCSEL_COLOR | RCINP_ZERO; if (pict && PICT_FORMAT_A(pict->format)) *alpha = RCSEL_ALPHA | source; else *alpha = RCSEL_ALPHA | RCINP_ONE; if (unit) shift = RCINP_B__SHIFT; else shift = RCINP_A__SHIFT; *color <<= shift; *alpha <<= shift; return TRUE; } Bool NV10EXAPrepareComposite(int op, PicturePtr pict_src, PicturePtr pict_mask, PicturePtr pict_dst, PixmapPtr src, PixmapPtr mask, PixmapPtr dst) { ScrnInfoPtr pScrn = xf86ScreenToScrn(dst->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t sc, sa, mc, ma; if (!PUSH_SPACE(push, 128)) return FALSE; PUSH_RESET(push); /* setup render target and blending */ if (!setup_render_target(pNv, pict_dst, dst)) return FALSE; setup_blend_function(pNv, pict_dst, pict_mask, op); /* select picture sources */ if (!setup_picture(pNv, pict_src, src, 0, &sc, &sa)) return FALSE; if (!setup_picture(pNv, pict_mask, mask, 1, &mc, &ma)) return FALSE; /* configure register combiners */ BEGIN_NV04(push, NV10_3D(RC_IN_ALPHA(0)), 1); PUSH_DATA (push, sa | ma); BEGIN_NV04(push, NV10_3D(RC_IN_RGB(0)), 1); if (effective_component_alpha(pict_mask)) { if (needs_src_alpha(op)) PUSH_DATA(push, sa | mc); else PUSH_DATA(push, sc | mc); } else { PUSH_DATA(push, sc | ma); } nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return FALSE; } pNv->pspict = pict_src; pNv->pmpict = pict_mask; return TRUE; } static inline void PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV10_3D(VERTEX_TX0_2I), 1); PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); BEGIN_NV04(push, NV10_3D(VERTEX_TX1_2I), 1); PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV10_3D(VERTEX_POS_3F_X), 3); PUSH_DATAf(push, dx); PUSH_DATAf(push, dy); PUSH_DATAf(push, 0.0); } void NV10EXAComposite(PixmapPtr pix_dst, int sx, int sy, int mx, int my, int dx, int dy, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pix_dst->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (!PUSH_SPACE(push, 64)) return; BEGIN_NV04(push, NV10_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV10_3D_VERTEX_BEGIN_END_QUADS); PUSH_VTX2s(push, sx, sy, mx, my, dx, dy); PUSH_VTX2s(push, sx + w, sy, mx + w, my, dx + w, dy); PUSH_VTX2s(push, sx + w, sy + h, mx + w, my + h, dx + w, dy + h); PUSH_VTX2s(push, sx, sy + h, mx, my + h, dx, dy + h); BEGIN_NV04(push, NV10_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV10_3D_VERTEX_BEGIN_END_STOP); } void NV10EXADoneComposite(PixmapPtr dst) { ScrnInfoPtr pScrn = xf86ScreenToScrn(dst->drawable.pScreen); nouveau_pushbuf_bufctx(NVPTR(pScrn)->pushbuf, NULL); } Bool NVAccelInitNV10TCL(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; uint32_t class = 0; int i; if (((pNv->dev->chipset & 0xf0) != NV_ARCH_10) && ((pNv->dev->chipset & 0xf0) != NV_ARCH_20)) return FALSE; if (pNv->dev->chipset >= 0x20 || pNv->dev->chipset == 0x1a) class = NV15_3D_CLASS; else if (pNv->dev->chipset >= 0x17) class = NV17_3D_CLASS; else if (pNv->dev->chipset >= 0x11) class = NV15_3D_CLASS; else class = NV10_3D_CLASS; if (nouveau_object_new(pNv->channel, Nv3D, class, NULL, 0, &pNv->Nv3D)) return FALSE; if (!PUSH_SPACE(push, 256)) return FALSE; BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, pNv->Nv3D->handle); BEGIN_NV04(push, NV10_3D(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV10_3D(DMA_TEXTURE0), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->gart); BEGIN_NV04(push, NV10_3D(DMA_COLOR), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(RT_HORIZ), 2); PUSH_DATA (push, 2048 << 16 | 0); PUSH_DATA (push, 2048 << 16 | 0); BEGIN_NV04(push, NV10_3D(ZETA_OFFSET), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_MODE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_HORIZ(0)), 1); PUSH_DATA (push, 0x7ff << 16 | 0x800); BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_VERT(0)), 1); PUSH_DATA (push, 0x7ff << 16 | 0x800); for (i = 1; i < 8; i++) { BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_HORIZ(i)), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_VERT(i)), 1); PUSH_DATA (push, 0); } BEGIN_NV04(push, NV10_3D(UNK0290), 1); PUSH_DATA (push, (0x10<<16)|1); BEGIN_NV04(push, NV10_3D(UNK03F4), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1); PUSH_DATA (push, 0); if (class != NV10_3D_CLASS) { /* For nv11, nv17 */ BEGIN_NV04(push, SUBC_3D(NV15_3D_FLIP_SET_READ), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV15_BLIT(FLIP_SET_READ), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1); PUSH_DATA (push, 0); } BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1); PUSH_DATA (push, 0); /* Set state */ BEGIN_NV04(push, NV10_3D(FOG_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(ALPHA_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(ALPHA_FUNC_FUNC), 2); PUSH_DATA (push, 0x207); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(TEX_ENABLE(0)), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(RC_IN_ALPHA(0)), 6); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(RC_OUT_ALPHA(0)), 6); PUSH_DATA (push, 0x00000c00); PUSH_DATA (push, 0); PUSH_DATA (push, 0x00000c00); PUSH_DATA (push, 0x18000000); PUSH_DATA (push, 0x300c0000); PUSH_DATA (push, 0x00001c80); BEGIN_NV04(push, NV10_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(DITHER_ENABLE), 2); PUSH_DATA (push, 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(LINE_SMOOTH_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(VERTEX_WEIGHT_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(BLEND_FUNC_SRC), 4); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0x8006); BEGIN_NV04(push, NV10_3D(STENCIL_MASK), 8); PUSH_DATA (push, 0xff); PUSH_DATA (push, 0x207); PUSH_DATA (push, 0); PUSH_DATA (push, 0xff); PUSH_DATA (push, 0x1e00); PUSH_DATA (push, 0x1e00); PUSH_DATA (push, 0x1e00); PUSH_DATA (push, 0x1d01); BEGIN_NV04(push, NV10_3D(NORMALIZE_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(FOG_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(LIGHT_MODEL), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(SEPARATE_SPECULAR_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(ENABLED_LIGHTS), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(POLYGON_OFFSET_POINT_ENABLE), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(DEPTH_FUNC), 1); PUSH_DATA (push, 0x201); BEGIN_NV04(push, NV10_3D(DEPTH_WRITE_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(DEPTH_TEST_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(POLYGON_OFFSET_FACTOR), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(POINT_SIZE), 1); PUSH_DATA (push, 8); BEGIN_NV04(push, NV10_3D(POINT_PARAMETERS_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(LINE_WIDTH), 1); PUSH_DATA (push, 8); BEGIN_NV04(push, NV10_3D(LINE_SMOOTH_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(POLYGON_MODE_FRONT), 2); PUSH_DATA (push, 0x1b02); PUSH_DATA (push, 0x1b02); BEGIN_NV04(push, NV10_3D(CULL_FACE), 2); PUSH_DATA (push, 0x405); PUSH_DATA (push, 0x901); BEGIN_NV04(push, NV10_3D(POLYGON_SMOOTH_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(CULL_FACE_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(TEX_GEN_MODE(0, 0)), 8); for (i = 0; i < 8; i++) PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(FOG_COEFF(0)), 3); PUSH_DATA (push, 0x3fc00000); /* -1.50 */ PUSH_DATA (push, 0xbdb8aa0a); /* -0.09 */ PUSH_DATA (push, 0); /* 0.00 */ BEGIN_NV04(push, NV04_GRAPH(3D, NOP), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(FOG_MODE), 2); PUSH_DATA (push, 0x802); PUSH_DATA (push, 2); /* for some reason VIEW_MATRIX_ENABLE need to be 6 instead of 4 when * using texturing, except when using the texture matrix */ BEGIN_NV04(push, NV10_3D(VIEW_MATRIX_ENABLE), 1); PUSH_DATA (push, 6); BEGIN_NV04(push, NV10_3D(COLOR_MASK), 1); PUSH_DATA (push, 0x01010101); BEGIN_NV04(push, NV10_3D(PROJECTION_MATRIX(0)), 16); for(i = 0; i < 16; i++) PUSH_DATAf(push, i/4 == i%4 ? 1.0 : 0.0); BEGIN_NV04(push, NV10_3D(DEPTH_RANGE_NEAR), 2); PUSH_DATA (push, 0); PUSH_DATAf(push, 65536.0); BEGIN_NV04(push, NV10_3D(VIEWPORT_TRANSLATE_X), 4); PUSH_DATAf(push, -2048.0); PUSH_DATAf(push, -2048.0); PUSH_DATAf(push, 0); PUSH_DATA (push, 0); /* Set vertex component */ BEGIN_NV04(push, NV10_3D(VERTEX_COL_4F_R), 4); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV10_3D(VERTEX_COL2_3F_R), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV10_3D(VERTEX_NOR_3F_X), 3); PUSH_DATA (push, 0); PUSH_DATA (push, 0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV10_3D(VERTEX_TX0_4F_S), 4); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV10_3D(VERTEX_TX1_4F_S), 4); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); BEGIN_NV04(push, NV10_3D(VERTEX_FOG_1F), 1); PUSH_DATAf(push, 0.0); BEGIN_NV04(push, NV10_3D(EDGEFLAG_ENABLE), 1); PUSH_DATA (push, 1); return TRUE; } xf86-video-nouveau-1.0.18/src/compat-api.h0000644000175000017500000000507714713424663013656 /* * Copyright 2012 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Dave Airlie */ /* this file provides API compat between server post 1.13 and pre it, it should be reused inside as many drivers as possible */ #ifndef COMPAT_API_H #define COMPAT_API_H #define SCRN_ARG_TYPE ScrnInfoPtr #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) #define SCREEN_ARG_TYPE ScreenPtr #define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) #define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(22,0) #define HAVE_NOTIFY_FD 1 #endif #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout #define BLOCKHANDLER_ARGS arg, pTimeout #else #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask #endif #define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen #define CLOSE_SCREEN_ARGS pScreen #define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y #define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode #define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg #define FREE_SCREEN_ARGS(x) (x) #define VT_FUNC_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS(flags) pScrn #define XF86_ENABLEDISABLEFB_ARG(x) (x) #endif #if ABI_VIDEODRV_VERSION < SET_ABI_VERSION(25, 2) #define secondary_dst slave_dst #define secondary_list slave_list #define secondary_head slave_head #define is_output_secondary is_output_slave #endif xf86-video-nouveau-1.0.18/src/Makefile.in0000644000175000017500000010016014713424671013504 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # # 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 # ADAM JACKSON 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. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(nouveau_drv_ladir)" LTLIBRARIES = $(nouveau_drv_la_LTLIBRARIES) nouveau_drv_la_LIBADD = am_nouveau_drv_la_OBJECTS = nouveau_copy.lo nouveau_copy85b5.lo \ nouveau_copy90b5.lo nouveau_copya0b5.lo nouveau_exa.lo \ nouveau_xv.lo nouveau_dri2.lo nouveau_present.lo \ nouveau_sync.lo nouveau_wfb.lo nv_accel_common.lo nv_driver.lo \ nv_shadow.lo nv04_exa.lo nv04_xv_ovl.lo nv04_xv_blit.lo \ nv10_exa.lo nv10_xv_ovl.lo nv30_exa.lo nv30_xv_tex.lo \ nv40_exa.lo nv40_xv_tex.lo nv50_accel.lo nv50_exa.lo \ nv50_xv.lo nvc0_accel.lo nvc0_exa.lo nvc0_xv.lo \ drmmode_display.lo vl_hwmc.lo nouveau_drv_la_OBJECTS = $(am_nouveau_drv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = nouveau_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(nouveau_drv_la_LDFLAGS) $(LDFLAGS) -o \ $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/drmmode_display.Plo \ ./$(DEPDIR)/nouveau_copy.Plo ./$(DEPDIR)/nouveau_copy85b5.Plo \ ./$(DEPDIR)/nouveau_copy90b5.Plo \ ./$(DEPDIR)/nouveau_copya0b5.Plo ./$(DEPDIR)/nouveau_dri2.Plo \ ./$(DEPDIR)/nouveau_exa.Plo ./$(DEPDIR)/nouveau_present.Plo \ ./$(DEPDIR)/nouveau_sync.Plo ./$(DEPDIR)/nouveau_wfb.Plo \ ./$(DEPDIR)/nouveau_xv.Plo ./$(DEPDIR)/nv04_exa.Plo \ ./$(DEPDIR)/nv04_xv_blit.Plo ./$(DEPDIR)/nv04_xv_ovl.Plo \ ./$(DEPDIR)/nv10_exa.Plo ./$(DEPDIR)/nv10_xv_ovl.Plo \ ./$(DEPDIR)/nv30_exa.Plo ./$(DEPDIR)/nv30_xv_tex.Plo \ ./$(DEPDIR)/nv40_exa.Plo ./$(DEPDIR)/nv40_xv_tex.Plo \ ./$(DEPDIR)/nv50_accel.Plo ./$(DEPDIR)/nv50_exa.Plo \ ./$(DEPDIR)/nv50_xv.Plo ./$(DEPDIR)/nv_accel_common.Plo \ ./$(DEPDIR)/nv_driver.Plo ./$(DEPDIR)/nv_shadow.Plo \ ./$(DEPDIR)/nvc0_accel.Plo ./$(DEPDIR)/nvc0_exa.Plo \ ./$(DEPDIR)/nvc0_xv.Plo ./$(DEPDIR)/vl_hwmc.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(nouveau_drv_la_SOURCES) DIST_SOURCES = $(nouveau_drv_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBDRM_NOUVEAU_CFLAGS = @LIBDRM_NOUVEAU_CFLAGS@ LIBDRM_NOUVEAU_LIBS = @LIBDRM_NOUVEAU_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ LIBUDEV_LIBS = @LIBUDEV_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@ @LIBDRM_CFLAGS@ nouveau_drv_la_LTLIBRARIES = nouveau_drv.la nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@ \ @LIBUDEV_LIBS@ @LIBDRM_LIBS@ nouveau_drv_ladir = @moduledir@/drivers nouveau_drv_la_SOURCES = \ nouveau_copy.c \ nouveau_copy85b5.c \ nouveau_copy90b5.c \ nouveau_copya0b5.c \ nouveau_exa.c nouveau_xv.c nouveau_dri2.c \ nouveau_present.c \ nouveau_sync.c \ nouveau_wfb.c \ nv_accel_common.c \ nv_driver.c \ nv_shadow.c \ nv04_exa.c \ nv04_xv_ovl.c \ nv04_xv_blit.c \ nv10_exa.c \ nv10_xv_ovl.c \ nv30_exa.c \ nv30_xv_tex.c \ nv40_exa.c \ nv40_xv_tex.c \ nv50_accel.c \ nv50_exa.c \ nv50_xv.c \ nvc0_accel.c \ nvc0_exa.c \ nvc0_xv.c \ drmmode_display.c \ vl_hwmc.c EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \ hwdefs/nv_m2mf.xml.h \ hwdefs/nv_object.xml.h \ hwdefs/nv01_2d.xml.h \ hwdefs/nv10_3d.xml.h \ hwdefs/nv30-40_3d.xml.h \ hwdefs/nv50_2d.xml.h \ hwdefs/nv50_3d.xml.h \ hwdefs/nv50_defs.xml.h \ hwdefs/nv50_texture.h \ hwdefs/nvc0_3d.xml.h \ hwdefs/nvc0_m2mf.xml.h \ hwdefs/gm107_texture.xml.h \ shader/exac8nvc0.fp \ shader/exac8nvc0.fpc \ shader/exac8nve0.fp \ shader/exac8nve0.fpc \ shader/exac8nvf0.fp \ shader/exac8nvf0.fpc \ shader/exac8nv110.fp \ shader/exac8nv110.fpc \ shader/exacanvc0.fp \ shader/exacanvc0.fpc \ shader/exacanve0.fp \ shader/exacanve0.fpc \ shader/exacanvf0.fp \ shader/exacanvf0.fpc \ shader/exacanv110.fp \ shader/exacanv110.fpc \ shader/exacmnvc0.fp \ shader/exacmnvc0.fpc \ shader/exacmnve0.fp \ shader/exacmnve0.fpc \ shader/exacmnvf0.fp \ shader/exacmnvf0.fpc \ shader/exacmnv110.fp \ shader/exacmnv110.fpc \ shader/exas8nvc0.fp \ shader/exas8nvc0.fpc \ shader/exas8nve0.fp \ shader/exas8nve0.fpc \ shader/exas8nvf0.fp \ shader/exas8nvf0.fpc \ shader/exas8nv110.fp \ shader/exas8nv110.fpc \ shader/exasanvc0.fp \ shader/exasanvc0.fpc \ shader/exasanve0.fp \ shader/exasanve0.fpc \ shader/exasanvf0.fp \ shader/exasanvf0.fpc \ shader/exasanv110.fp \ shader/exasanv110.fpc \ shader/exascnvc0.fp \ shader/exascnvc0.fpc \ shader/exascnve0.fp \ shader/exascnve0.fpc \ shader/exascnvf0.fp \ shader/exascnvf0.fpc \ shader/exascnv110.fp \ shader/exascnv110.fpc \ shader/videonvc0.fp \ shader/videonvc0.fpc \ shader/videonve0.fp \ shader/videonve0.fpc \ shader/videonvf0.fp \ shader/videonvf0.fpc \ shader/videonv110.fp \ shader/videonv110.fpc \ shader/xfrm2nvc0.vp \ shader/xfrm2nvc0.vpc \ shader/xfrm2nve0.vp \ shader/xfrm2nve0.vpc \ shader/xfrm2nvf0.vp \ shader/xfrm2nvf0.vpc \ shader/xfrm2nv110.vp \ shader/xfrm2nv110.vpc \ shader/Makefile \ nouveau_local.h \ nouveau_copy.h \ nouveau_present.h \ nouveau_sync.h \ nv_const.h \ nv_dma.h \ nv_include.h \ nv_proto.h \ nv_rop.h \ nv_type.h \ nv04_accel.h \ nv50_accel.h \ nvc0_accel.h \ compat-api.h \ vl_hwmc.c \ vl_hwmc.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-nouveau_drv_laLTLIBRARIES: $(nouveau_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(nouveau_drv_la_LTLIBRARIES)'; test -n "$(nouveau_drv_ladir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(nouveau_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(nouveau_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(nouveau_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(nouveau_drv_ladir)"; \ } uninstall-nouveau_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(nouveau_drv_la_LTLIBRARIES)'; test -n "$(nouveau_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(nouveau_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(nouveau_drv_ladir)/$$f"; \ done clean-nouveau_drv_laLTLIBRARIES: -test -z "$(nouveau_drv_la_LTLIBRARIES)" || rm -f $(nouveau_drv_la_LTLIBRARIES) @list='$(nouveau_drv_la_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } nouveau_drv.la: $(nouveau_drv_la_OBJECTS) $(nouveau_drv_la_DEPENDENCIES) $(EXTRA_nouveau_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(nouveau_drv_la_LINK) -rpath $(nouveau_drv_ladir) $(nouveau_drv_la_OBJECTS) $(nouveau_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmmode_display.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_copy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_copy85b5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_copy90b5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_copya0b5.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_dri2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_present.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_sync.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_wfb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nouveau_xv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv04_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv04_xv_blit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv04_xv_ovl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv10_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv10_xv_ovl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv30_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv30_xv_tex.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv40_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv40_xv_tex.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv50_accel.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv50_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv50_xv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv_accel_common.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv_driver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nv_shadow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvc0_accel.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvc0_exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nvc0_xv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vl_hwmc.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(nouveau_drv_ladir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-nouveau_drv_laLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/drmmode_display.Plo -rm -f ./$(DEPDIR)/nouveau_copy.Plo -rm -f ./$(DEPDIR)/nouveau_copy85b5.Plo -rm -f ./$(DEPDIR)/nouveau_copy90b5.Plo -rm -f ./$(DEPDIR)/nouveau_copya0b5.Plo -rm -f ./$(DEPDIR)/nouveau_dri2.Plo -rm -f ./$(DEPDIR)/nouveau_exa.Plo -rm -f ./$(DEPDIR)/nouveau_present.Plo -rm -f ./$(DEPDIR)/nouveau_sync.Plo -rm -f ./$(DEPDIR)/nouveau_wfb.Plo -rm -f ./$(DEPDIR)/nouveau_xv.Plo -rm -f ./$(DEPDIR)/nv04_exa.Plo -rm -f ./$(DEPDIR)/nv04_xv_blit.Plo -rm -f ./$(DEPDIR)/nv04_xv_ovl.Plo -rm -f ./$(DEPDIR)/nv10_exa.Plo -rm -f ./$(DEPDIR)/nv10_xv_ovl.Plo -rm -f ./$(DEPDIR)/nv30_exa.Plo -rm -f ./$(DEPDIR)/nv30_xv_tex.Plo -rm -f ./$(DEPDIR)/nv40_exa.Plo -rm -f ./$(DEPDIR)/nv40_xv_tex.Plo -rm -f ./$(DEPDIR)/nv50_accel.Plo -rm -f ./$(DEPDIR)/nv50_exa.Plo -rm -f ./$(DEPDIR)/nv50_xv.Plo -rm -f ./$(DEPDIR)/nv_accel_common.Plo -rm -f ./$(DEPDIR)/nv_driver.Plo -rm -f ./$(DEPDIR)/nv_shadow.Plo -rm -f ./$(DEPDIR)/nvc0_accel.Plo -rm -f ./$(DEPDIR)/nvc0_exa.Plo -rm -f ./$(DEPDIR)/nvc0_xv.Plo -rm -f ./$(DEPDIR)/vl_hwmc.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nouveau_drv_laLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/drmmode_display.Plo -rm -f ./$(DEPDIR)/nouveau_copy.Plo -rm -f ./$(DEPDIR)/nouveau_copy85b5.Plo -rm -f ./$(DEPDIR)/nouveau_copy90b5.Plo -rm -f ./$(DEPDIR)/nouveau_copya0b5.Plo -rm -f ./$(DEPDIR)/nouveau_dri2.Plo -rm -f ./$(DEPDIR)/nouveau_exa.Plo -rm -f ./$(DEPDIR)/nouveau_present.Plo -rm -f ./$(DEPDIR)/nouveau_sync.Plo -rm -f ./$(DEPDIR)/nouveau_wfb.Plo -rm -f ./$(DEPDIR)/nouveau_xv.Plo -rm -f ./$(DEPDIR)/nv04_exa.Plo -rm -f ./$(DEPDIR)/nv04_xv_blit.Plo -rm -f ./$(DEPDIR)/nv04_xv_ovl.Plo -rm -f ./$(DEPDIR)/nv10_exa.Plo -rm -f ./$(DEPDIR)/nv10_xv_ovl.Plo -rm -f ./$(DEPDIR)/nv30_exa.Plo -rm -f ./$(DEPDIR)/nv30_xv_tex.Plo -rm -f ./$(DEPDIR)/nv40_exa.Plo -rm -f ./$(DEPDIR)/nv40_xv_tex.Plo -rm -f ./$(DEPDIR)/nv50_accel.Plo -rm -f ./$(DEPDIR)/nv50_exa.Plo -rm -f ./$(DEPDIR)/nv50_xv.Plo -rm -f ./$(DEPDIR)/nv_accel_common.Plo -rm -f ./$(DEPDIR)/nv_driver.Plo -rm -f ./$(DEPDIR)/nv_shadow.Plo -rm -f ./$(DEPDIR)/nvc0_accel.Plo -rm -f ./$(DEPDIR)/nvc0_exa.Plo -rm -f ./$(DEPDIR)/nvc0_xv.Plo -rm -f ./$(DEPDIR)/vl_hwmc.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nouveau_drv_laLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-nouveau_drv_laLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nouveau_drv_laLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-nouveau_drv_laLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-video-nouveau-1.0.18/src/nouveau_local.h0000644000175000017500000001521414713424663014452 /* * Copyright 2007 Nouveau Project * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifndef __NOUVEAU_LOCAL_H__ #define __NOUVEAU_LOCAL_H__ #include "compiler.h" #include "xf86_OSproc.h" #include /* Debug output */ #define NOUVEAU_MSG(fmt,args...) ErrorF(fmt, ##args) #define NOUVEAU_ERR(fmt,args...) \ ErrorF("%s:%d - "fmt, __func__, __LINE__, ##args) #if 0 #define NOUVEAU_FALLBACK(fmt,args...) do { \ NOUVEAU_ERR("FALLBACK: "fmt, ##args); \ return FALSE; \ } while(0) #else #define NOUVEAU_FALLBACK(fmt,args...) do { \ return FALSE; \ } while(0) #endif #define NOUVEAU_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1)) #define NV50_TILE_PITCH(m) (64 << ((m) & 0xf)) #define NV50_TILE_HEIGHT(m) (4 << ((m) >> 4)) #define NVC0_TILE_PITCH(m) (64 << ((m) & 0xf)) #define NVC0_TILE_HEIGHT(m) (8 << ((m) >> 4)) static inline int log2i(int i) { int r = 0; if (i & 0xffff0000) { i >>= 16; r += 16; } if (i & 0x0000ff00) { i >>= 8; r += 8; } if (i & 0x000000f0) { i >>= 4; r += 4; } if (i & 0x0000000c) { i >>= 2; r += 2; } if (i & 0x00000002) { r += 1; } return r; } static inline int round_down_pow2(int x) { return 1 << log2i(x); } static inline int round_up_pow2(int x) { int r = round_down_pow2(x); if (r < x) r <<= 1; return r; } #define SWAP(x, y) do { \ typeof(x) __z = (x); \ (x) = (y); \ (y) = __z; \ } while (0) static inline uint32_t PUSH_AVAIL(struct nouveau_pushbuf *push) { return push->end - push->cur; } static inline Bool PUSH_SPACE(struct nouveau_pushbuf *push, uint32_t size) { if (PUSH_AVAIL(push) < size) return nouveau_pushbuf_space(push, size, 0, 0) == 0; return TRUE; } static inline void PUSH_DATA(struct nouveau_pushbuf *push, uint32_t data) { *push->cur++ = data; } static inline void PUSH_DATAp(struct nouveau_pushbuf *push, const void *data, uint32_t size) { memcpy(push->cur, data, size * 4); push->cur += size; } static inline void PUSH_RELOC(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint32_t offset, uint32_t flags, uint32_t vor, uint32_t tor) { nouveau_pushbuf_reloc(push, bo, offset, flags, vor, tor); } static inline void PUSH_KICK(struct nouveau_pushbuf *push) { nouveau_pushbuf_kick(push, push->channel); } static inline struct nouveau_bufctx * BUFCTX(struct nouveau_pushbuf *push) { return push->user_priv; } static inline void PUSH_RESET(struct nouveau_pushbuf *push) { nouveau_bufctx_reset(BUFCTX(push), 0); } static inline void PUSH_REFN(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint32_t access) { nouveau_bufctx_refn(BUFCTX(push), 0, bo, access); } static inline void PUSH_MTHDl(struct nouveau_pushbuf *push, int subc, int mthd, struct nouveau_bo *bo, uint32_t offset, uint32_t access) { nouveau_bufctx_mthd(BUFCTX(push), 0, (1 << 18) | (subc << 13) | mthd, bo, offset, access | NOUVEAU_BO_LOW, 0, 0); PUSH_DATA (push, bo->offset + offset); } static inline void PUSH_MTHDo(struct nouveau_pushbuf *push, int subc, int mthd, struct nouveau_bo *bo, uint32_t access, uint32_t vor, uint32_t tor) { nouveau_bufctx_mthd(BUFCTX(push), 0, (1 << 18) | (subc << 13) | mthd, bo, 0, access | NOUVEAU_BO_OR, vor, tor); if (bo->flags & NOUVEAU_BO_VRAM) PUSH_DATA (push, vor); else PUSH_DATA (push, tor); } static inline void PUSH_MTHDs(struct nouveau_pushbuf *push, int subc, int mthd, struct nouveau_bo *bo, uint32_t data, uint32_t access, uint32_t vor, uint32_t tor) { nouveau_bufctx_mthd(BUFCTX(push), 0, (1 << 18) | (subc << 13) | mthd, bo, data, access | NOUVEAU_BO_OR, vor, tor); if (bo->flags & NOUVEAU_BO_VRAM) PUSH_DATA (push, data | vor); else PUSH_DATA (push, data | tor); } static inline void PUSH_MTHD(struct nouveau_pushbuf *push, int subc, int mthd, struct nouveau_bo *bo, uint32_t data, uint32_t access, uint32_t vor, uint32_t tor) { nouveau_bufctx_mthd(BUFCTX(push), 0, (1 << 18) | (subc << 13) | mthd, bo, data, access | NOUVEAU_BO_OR, vor, tor); if (access & NOUVEAU_BO_LOW) data += bo->offset; if (access & NOUVEAU_BO_OR) { if (bo->flags & NOUVEAU_BO_VRAM) data |= vor; else data |= tor; } PUSH_DATA (push, data); } static inline void PUSH_DATAf(struct nouveau_pushbuf *push, float v) { union { float f; uint32_t i; } d = { .f = v }; PUSH_DATA (push, d.i); } static inline void BEGIN_NV04(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_DATA (push, 0x00000000 | (size << 18) | (subc << 13) | mthd); } static inline void BEGIN_NI04(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_DATA (push, 0x40000000 | (size << 18) | (subc << 13) | mthd); } static inline void BEGIN_NVC0(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_DATA (push, 0x20000000 | (size << 16) | (subc << 13) | (mthd / 4)); } static inline void BEGIN_NIC0(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_DATA (push, 0x60000000 | (size << 16) | (subc << 13) | (mthd / 4)); } static inline void IMMED_NVC0(struct nouveau_pushbuf *push, int subc, int mthd, int data) { PUSH_DATA (push, 0x80000000 | (data << 16) | (subc << 13) | (mthd / 4)); } static inline void BEGIN_1IC0(struct nouveau_pushbuf *push, int subc, int mthd, int size) { PUSH_DATA (push, 0xa0000000 | (size << 16) | (subc << 13) | (mthd / 4)); } #define NV01_SUBC(subc, mthd) SUBC_##subc((NV01_SUBCHAN_##mthd)) #define NV11_SUBC(subc, mthd) SUBC_##subc((NV11_SUBCHAN_##mthd)) #define NV84_SUBC(subc, mthd) SUBC_##subc((NV84_SUBCHAN_##mthd)) #define NV04_GRAPH(subc, mthd) SUBC_##subc((NV04_GRAPH_##mthd)) #define NV50_GRAPH(subc, mthd) SUBC_##subc((NV50_GRAPH_##mthd)) #define NVC0_GRAPH(subc, mthd) SUBC_##subc((NVC0_GRAPH_##mthd)) #endif xf86-video-nouveau-1.0.18/src/nvc0_accel.c0000644000175000017500000003276714713424663013622 /* * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nvc0_accel.h" #include "shader/xfrm2nvc0.vp" #include "shader/videonvc0.fp" #include "shader/exascnvc0.fp" #include "shader/exacmnvc0.fp" #include "shader/exacanvc0.fp" #include "shader/exasanvc0.fp" #include "shader/exas8nvc0.fp" #include "shader/exac8nvc0.fp" #include "shader/xfrm2nve0.vp" #include "shader/videonve0.fp" #include "shader/exascnve0.fp" #include "shader/exacmnve0.fp" #include "shader/exacanve0.fp" #include "shader/exasanve0.fp" #include "shader/exas8nve0.fp" #include "shader/exac8nve0.fp" #include "shader/xfrm2nvf0.vp" #include "shader/videonvf0.fp" #include "shader/exascnvf0.fp" #include "shader/exacmnvf0.fp" #include "shader/exacanvf0.fp" #include "shader/exasanvf0.fp" #include "shader/exas8nvf0.fp" #include "shader/exac8nvf0.fp" #include "shader/xfrm2nv110.vp" #include "shader/videonv110.fp" #include "shader/exascnv110.fp" #include "shader/exacmnv110.fp" #include "shader/exacanv110.fp" #include "shader/exasanv110.fp" #include "shader/exas8nv110.fp" #include "shader/exac8nv110.fp" #define NVC0PushProgram(pNv,addr,code) do { \ const unsigned size = sizeof(code) / sizeof(code[0]); \ PUSH_DATAu((pNv)->pushbuf, (pNv)->scratch, (addr), size); \ PUSH_DATAp((pNv)->pushbuf, (code), size); \ } while(0) void NVC0SyncToVBlank(PixmapPtr ppix, BoxPtr box) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int head; xf86CrtcPtr crtc; if (!pNv->NvSW || !nouveau_exa_pixmap_is_onscreen(ppix)) return; crtc = nouveau_pick_best_crtc(pScrn, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1); if (!crtc) return; if (!PUSH_SPACE(push, 32)) return; head = drmmode_head(crtc); BEGIN_NVC0(push, NV01_SUBC(NVSW, OBJECT), 1); PUSH_DATA (push, pNv->NvSW->handle); BEGIN_NVC0(push, NV84_SUBC(NVSW, SEMAPHORE_ADDRESS_HIGH), 4); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET)); PUSH_DATA (push, 0x22222222); PUSH_DATA (push, NV84_SUBCHAN_SEMAPHORE_TRIGGER_WRITE_LONG); BEGIN_NVC0(push, SUBC_NVSW(0x0400), 4); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET)); PUSH_DATA (push, 0x11111111); PUSH_DATA (push, head); BEGIN_NVC0(push, NV84_SUBC(NVSW, SEMAPHORE_ADDRESS_HIGH), 4); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + SEMA_OFFSET)); PUSH_DATA (push, 0x11111111); PUSH_DATA (push, NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_EQUAL); } Bool NVAccelInitM2MF_NVC0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int ret; ret = nouveau_object_new(pNv->channel, 0x00009039, 0x9039, NULL, 0, &pNv->NvMemFormat); if (ret) return FALSE; BEGIN_NVC0(push, NV01_SUBC(M2MF, OBJECT), 1); PUSH_DATA (push, pNv->NvMemFormat->handle); BEGIN_NVC0(push, NVC0_M2MF(QUERY_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + NTFY_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + NTFY_OFFSET)); PUSH_DATA (push, 0); return TRUE; } Bool NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t class = (pNv->dev->chipset < 0xf0) ? 0xa040 : 0xa140; int ret; ret = nouveau_object_new(pNv->channel, class, class, NULL, 0, &pNv->NvMemFormat); if (ret) return FALSE; BEGIN_NVC0(push, NV01_SUBC(P2MF, OBJECT), 1); PUSH_DATA (push, pNv->NvMemFormat->handle); return TRUE; } Bool NVAccelInitCOPY_NVE0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t class; int ret; if (pNv->dev->chipset < 0x110) class = 0xa0b5; else if (pNv->dev->chipset < 0x130) class = 0xb0b5; else class = 0xc0b5; ret = nouveau_object_new(pNv->channel, class, class, NULL, 0, &pNv->NvCOPY); if (ret) return FALSE; BEGIN_NVC0(push, NV01_SUBC(COPY, OBJECT), 1); PUSH_DATA (push, pNv->NvCOPY->handle); return TRUE; } Bool NVAccelInit2D_NVC0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int ret; ret = nouveau_object_new(pNv->channel, 0x0000902d, 0x902d, NULL, 0, &pNv->Nv2D); if (ret) return FALSE; if (!PUSH_SPACE(push, 64)) return FALSE; BEGIN_NVC0(push, NV01_SUBC(2D, OBJECT), 1); PUSH_DATA (push, pNv->Nv2D->handle); BEGIN_NVC0(push, NV50_2D(CLIP_ENABLE), 1); PUSH_DATA (push, 1); BEGIN_NVC0(push, NV50_2D(COLOR_KEY_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NV50_2D(UNK0884), 1); PUSH_DATA (push, 0x3f); BEGIN_NVC0(push, NV50_2D(UNK0888), 1); PUSH_DATA (push, 1); BEGIN_NVC0(push, NV50_2D(ROP), 1); PUSH_DATA (push, 0x55); BEGIN_NVC0(push, NV50_2D(OPERATION), 1); PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY); BEGIN_NVC0(push, NV50_2D(BLIT_DU_DX_FRACT), 4); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 1); BEGIN_NVC0(push, NV50_2D(DRAW_SHAPE), 2); PUSH_DATA (push, 4); PUSH_DATA (push, NV50_SURFACE_FORMAT_B5G6R5_UNORM); BEGIN_NVC0(push, NV50_2D(PATTERN_COLOR_FORMAT), 2); PUSH_DATA (push, 2); PUSH_DATA (push, 1); pNv->currentRop = 0xfffffffa; return TRUE; } Bool NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = pNv->scratch; uint32_t class, handle; int ret; if (pNv->Architecture < NV_KEPLER) { class = 0x9097; handle = 0x001f906e; } else if (pNv->dev->chipset == 0xea) { class = 0xa297; handle = 0x0000906e; } else if (pNv->dev->chipset < 0xf0) { class = 0xa097; handle = 0x0000906e; } else if (pNv->dev->chipset < 0x110) { class = 0xa197; handle = 0x0000906e; } else if (pNv->dev->chipset < 0x120) { class = 0xb097; handle = 0x0000906e; } else if (pNv->dev->chipset < 0x130) { class = 0xb197; handle = 0x0000906e; } else if (pNv->dev->chipset == 0x130) { class = 0xc097; handle = 0x0000906e; } else if (pNv->dev->chipset < 0x140) { class = 0xc197; handle = 0x0000906e; } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "No 3D acceleration support for NV%X\n", pNv->dev->chipset); return FALSE; } ret = nouveau_object_new(pNv->channel, class, class, NULL, 0, &pNv->Nv3D); if (ret) return FALSE; ret = nouveau_object_new(pNv->channel, handle, 0x906e, NULL, 0, &pNv->NvSW); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DRM doesn't support sync-to-vblank\n"); } if (nouveau_pushbuf_space(push, 512, 0, 0) || nouveau_pushbuf_refn (push, &(struct nouveau_pushbuf_refn) { pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR }, 1)) return FALSE; BEGIN_NVC0(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, pNv->Nv3D->handle); BEGIN_NVC0(push, NVC0_3D(COND_MODE), 1); PUSH_DATA (push, NVC0_3D_COND_MODE_ALWAYS); BEGIN_NVC0(push, SUBC_3D(NVC0_GRAPH_NOTIFY_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + NTFY_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + NTFY_OFFSET)); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(CSAA_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(ZETA_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(RT_SEPARATE_FRAG_DATA), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(VIEWPORT_HORIZ(0)), 2); PUSH_DATA (push, (8192 << 16) | 0); PUSH_DATA (push, (8192 << 16) | 0); BEGIN_NVC0(push, NVC0_3D(SCREEN_SCISSOR_HORIZ), 2); PUSH_DATA (push, (8192 << 16) | 0); PUSH_DATA (push, (8192 << 16) | 0); BEGIN_NVC0(push, NVC0_3D(SCISSOR_ENABLE(0)), 1); PUSH_DATA (push, 1); BEGIN_NVC0(push, NVC0_3D(VIEWPORT_TRANSFORM_EN), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(VIEW_VOLUME_CLIP_CTRL), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(TIC_ADDRESS_HIGH), 3); PUSH_DATA (push, (bo->offset + TIC_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + TIC_OFFSET)); PUSH_DATA (push, 15); BEGIN_NVC0(push, NVC0_3D(TSC_ADDRESS_HIGH), 3); PUSH_DATA (push, (bo->offset + TSC_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + TSC_OFFSET)); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(LINKED_TSC), 1); PUSH_DATA (push, 1); if (pNv->Architecture < NV_KEPLER) { BEGIN_NVC0(push, NVC0_3D(TEX_LIMITS(4)), 1); PUSH_DATA (push, 0x54); BEGIN_NIC0(push, NVC0_3D(BIND_TIC(4)), 2); PUSH_DATA (push, (0 << 9) | (0 << 1) | NVC0_3D_BIND_TIC_ACTIVE); PUSH_DATA (push, (1 << 9) | (1 << 1) | NVC0_3D_BIND_TIC_ACTIVE); } else { BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 6); PUSH_DATA (push, 256); PUSH_DATA (push, (bo->offset + TB_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + TB_OFFSET)); PUSH_DATA (push, 0); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000001); BEGIN_NVC0(push, NVC0_3D(CB_BIND(4)), 1); PUSH_DATA (push, 0x11); BEGIN_NVC0(push, NVE4_3D(TEX_CB_INDEX), 1); PUSH_DATA (push, 1); } if (pNv->Architecture < NV_MAXWELL) { BEGIN_NVC0(push, NVC0_3D(VERTEX_QUARANTINE_ADDRESS_HIGH), 3); PUSH_DATA (push, (bo->offset + MISC_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + MISC_OFFSET)); PUSH_DATA (push, 1); } else { /* Use new TIC format. Not strictly necessary for GM20x+ */ IMMED_NVC0(push, SUBC_3D(0x0f10), 1); if (pNv->dev->chipset >= 0x120) { /* Use center sample locations. */ BEGIN_NVC0(push, SUBC_3D(0x11e0), 4); PUSH_DATA (push, 0x88888888); PUSH_DATA (push, 0x88888888); PUSH_DATA (push, 0x88888888); PUSH_DATA (push, 0x88888888); } } BEGIN_NVC0(push, NVC0_3D(CODE_ADDRESS_HIGH), 2); PUSH_DATA (push, (bo->offset + CODE_OFFSET) >> 32); PUSH_DATA (push, (bo->offset + CODE_OFFSET)); if (pNv->Architecture < NV_KEPLER) { NVC0PushProgram(pNv, PVP_PASS, NVC0VP_Transform2); NVC0PushProgram(pNv, PFP_S, NVC0FP_Source); NVC0PushProgram(pNv, PFP_C, NVC0FP_Composite); NVC0PushProgram(pNv, PFP_CCA, NVC0FP_CAComposite); NVC0PushProgram(pNv, PFP_CCASA, NVC0FP_CACompositeSrcAlpha); NVC0PushProgram(pNv, PFP_S_A8, NVC0FP_Source_A8); NVC0PushProgram(pNv, PFP_C_A8, NVC0FP_Composite_A8); NVC0PushProgram(pNv, PFP_NV12, NVC0FP_NV12); BEGIN_NVC0(push, NVC0_3D(MEM_BARRIER), 1); PUSH_DATA (push, 0x1111); } else if (pNv->dev->chipset < 0xf0 && pNv->dev->chipset != 0xea) { NVC0PushProgram(pNv, PVP_PASS, NVE0VP_Transform2); NVC0PushProgram(pNv, PFP_S, NVE0FP_Source); NVC0PushProgram(pNv, PFP_C, NVE0FP_Composite); NVC0PushProgram(pNv, PFP_CCA, NVE0FP_CAComposite); NVC0PushProgram(pNv, PFP_CCASA, NVE0FP_CACompositeSrcAlpha); NVC0PushProgram(pNv, PFP_S_A8, NVE0FP_Source_A8); NVC0PushProgram(pNv, PFP_C_A8, NVE0FP_Composite_A8); NVC0PushProgram(pNv, PFP_NV12, NVE0FP_NV12); } else if (pNv->dev->chipset < 0x110) { NVC0PushProgram(pNv, PVP_PASS, NVF0VP_Transform2); NVC0PushProgram(pNv, PFP_S, NVF0FP_Source); NVC0PushProgram(pNv, PFP_C, NVF0FP_Composite); NVC0PushProgram(pNv, PFP_CCA, NVF0FP_CAComposite); NVC0PushProgram(pNv, PFP_CCASA, NVF0FP_CACompositeSrcAlpha); NVC0PushProgram(pNv, PFP_S_A8, NVF0FP_Source_A8); NVC0PushProgram(pNv, PFP_C_A8, NVF0FP_Composite_A8); NVC0PushProgram(pNv, PFP_NV12, NVF0FP_NV12); } else { NVC0PushProgram(pNv, PVP_PASS, NV110VP_Transform2); NVC0PushProgram(pNv, PFP_S, NV110FP_Source); NVC0PushProgram(pNv, PFP_C, NV110FP_Composite); NVC0PushProgram(pNv, PFP_CCA, NV110FP_CAComposite); NVC0PushProgram(pNv, PFP_CCASA, NV110FP_CACompositeSrcAlpha); NVC0PushProgram(pNv, PFP_S_A8, NV110FP_Source_A8); NVC0PushProgram(pNv, PFP_C_A8, NV110FP_Composite_A8); NVC0PushProgram(pNv, PFP_NV12, NV110FP_NV12); } BEGIN_NVC0(push, NVC0_3D(SP_SELECT(1)), 4); PUSH_DATA (push, NVC0_3D_SP_SELECT_PROGRAM_VP_B | NVC0_3D_SP_SELECT_ENABLE); PUSH_DATA (push, PVP_PASS); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 8); BEGIN_NVC0(push, NVC0_3D(VERT_COLOR_CLAMP_EN), 1); PUSH_DATA (push, 1); BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3); PUSH_DATA (push, 256); PUSH_DATA (push, (bo->offset + PVP_DATA) >> 32); PUSH_DATA (push, (bo->offset + PVP_DATA)); BEGIN_NVC0(push, NVC0_3D(CB_BIND(0)), 1); PUSH_DATA (push, 0x01); BEGIN_NVC0(push, NVC0_3D(SP_SELECT(5)), 4); PUSH_DATA (push, NVC0_3D_SP_SELECT_PROGRAM_FP | NVC0_3D_SP_SELECT_ENABLE); PUSH_DATA (push, PFP_S); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 8); BEGIN_NVC0(push, NVC0_3D(FRAG_COLOR_CLAMP_EN), 1); PUSH_DATA (push, 0x11111111); BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3); PUSH_DATA (push, 256); PUSH_DATA (push, (bo->offset + PFP_DATA) >> 32); PUSH_DATA (push, (bo->offset + PFP_DATA)); BEGIN_NVC0(push, NVC0_3D(CB_BIND(4)), 1); PUSH_DATA (push, 0x01); return TRUE; } xf86-video-nouveau-1.0.18/src/nv50_accel.c0000644000175000017500000004363614713424663013541 /* * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nv50_accel.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv50_2d.xml.h" #include "hwdefs/nv50_3d.xml.h" void NV50SyncToVBlank(PixmapPtr ppix, BoxPtr box) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; int head; xf86CrtcPtr crtc; if (!nouveau_exa_pixmap_is_onscreen(ppix)) return; crtc = nouveau_pick_best_crtc(pScrn, box->x1, box->y1, box->x2 - box->x1, box->y2 - box->y1); if (!crtc) return; if (!PUSH_SPACE(push, 10)) return; head = drmmode_head(crtc); BEGIN_NV04(push, SUBC_NVSW(0x0060), 2); PUSH_DATA (push, pNv->vblank_sem->handle); PUSH_DATA (push, 0); BEGIN_NV04(push, SUBC_NVSW(0x006c), 1); PUSH_DATA (push, 0x22222222); BEGIN_NV04(push, SUBC_NVSW(0x0404), 2); PUSH_DATA (push, 0x11111111); PUSH_DATA (push, head); BEGIN_NV04(push, SUBC_NVSW(0x0068), 1); PUSH_DATA (push, 0x11111111); } Bool NVAccelInitM2MF_NV50(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; if (nouveau_object_new(pNv->channel, NvMemFormat, NV50_M2MF_CLASS, NULL, 0, &pNv->NvMemFormat)) return FALSE; if (!PUSH_SPACE(push, 8)) return FALSE; BEGIN_NV04(push, NV01_SUBC(M2MF, OBJECT), 1); PUSH_DATA (push, pNv->NvMemFormat->handle); BEGIN_NV04(push, NV03_M2MF(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); BEGIN_NV04(push, NV03_M2MF(DMA_BUFFER_IN), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); return TRUE; } Bool NVAccelInit2D_NV50(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; if (nouveau_object_new(pNv->channel, Nv2D, NV50_2D_CLASS, NULL, 0, &pNv->Nv2D)) return FALSE; if (!PUSH_SPACE(push, 64)) return FALSE; BEGIN_NV04(push, NV01_SUBC(2D, OBJECT), 1); PUSH_DATA (push, pNv->Nv2D->handle); BEGIN_NV04(push, NV50_2D(DMA_NOTIFY), 3); PUSH_DATA (push, pNv->notify0->handle); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); /* Magics from nv, no clue what they do, but at least some * of them are needed to avoid crashes. */ BEGIN_NV04(push, NV50_2D(UNK260), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_2D(CLIP_ENABLE), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_2D(COLOR_KEY_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_2D(UNK58C), 1); PUSH_DATA (push, 0x111); pNv->currentRop = 0xfffffffa; return TRUE; } Bool NVAccelInitNV50TCL(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nv04_fifo *fifo = pNv->channel->data; struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_notify ntfy = { .length = 32 }; unsigned class; int i; switch (pNv->dev->chipset & 0xf0) { case 0x50: class = NV50_3D_CLASS; break; case 0x80: case 0x90: class = NV84_3D_CLASS; break; case 0xa0: switch (pNv->dev->chipset) { case 0xa0: case 0xaa: case 0xac: class = NVA0_3D_CLASS; break; case 0xaf: class = NVAF_3D_CLASS; break; default: class = NVA3_3D_CLASS; break; } break; default: return FALSE; } if (nouveau_object_new(pNv->channel, Nv3D, class, NULL, 0, &pNv->Nv3D)) return FALSE; if (nouveau_object_new(pNv->channel, NvSW, 0x506e, NULL, 0, &pNv->NvSW)) { nouveau_object_del(&pNv->Nv3D); return FALSE; } if (nouveau_object_new(pNv->channel, NvVBlankSem, NOUVEAU_NOTIFIER_CLASS, &ntfy, sizeof(ntfy), &pNv->vblank_sem)) { nouveau_object_del(&pNv->NvSW); nouveau_object_del(&pNv->Nv3D); return FALSE; } if (nouveau_pushbuf_space(push, 512, 0, 0) || nouveau_pushbuf_refn (push, &(struct nouveau_pushbuf_refn) { pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR }, 1)) return FALSE; BEGIN_NV04(push, NV01_SUBC(NVSW, OBJECT), 1); PUSH_DATA (push, pNv->NvSW->handle); BEGIN_NV04(push, SUBC_NVSW(0x018c), 1); PUSH_DATA (push, pNv->vblank_sem->handle); BEGIN_NV04(push, SUBC_NVSW(0x0400), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, pNv->Nv3D->handle); BEGIN_NV04(push, NV50_3D(COND_MODE), 1); PUSH_DATA (push, NV50_3D_COND_MODE_ALWAYS); BEGIN_NV04(push, NV50_3D(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->NvNull->handle); BEGIN_NV04(push, NV50_3D(DMA_ZETA), 11); for (i = 0; i < 11; i++) PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV50_3D(DMA_COLOR(0)), NV50_3D_DMA_COLOR__LEN); for (i = 0; i < NV50_3D_DMA_COLOR__LEN; i++) PUSH_DATA (push, fifo->vram); BEGIN_NV04(push, NV50_3D(RT_CONTROL), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(VIEWPORT_TRANSFORM_EN), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_3D(COLOR_MASK_COMMON), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(ZETA_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_3D(TIC_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + TIC_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + TIC_OFFSET)); PUSH_DATA (push, 0x00000800); BEGIN_NV04(push, NV50_3D(TSC_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + TSC_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + TSC_OFFSET)); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV50_3D(LINKED_TSC), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(TEX_LIMITS(2)), 1); PUSH_DATA (push, 0x54); PUSH_DATAu(push, pNv->scratch, PVP_OFFSET, 30 * 2); PUSH_DATA (push, 0x10000001); PUSH_DATA (push, 0x0423c788); /* mov b32 o[0x0] a[0x0] */ PUSH_DATA (push, 0x10000205); PUSH_DATA (push, 0x0423c788); /* mov b32 o[0x4] a[0x4] */ PUSH_DATA (push, 0xc0800401); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r0 a[0x8] c0[0x0] */ PUSH_DATA (push, 0xc0830405); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r1 a[0x8] c0[0xc] */ PUSH_DATA (push, 0xc0860409); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r2 a[0x8] c0[0x18] */ PUSH_DATA (push, 0xe0810601); PUSH_DATA (push, 0x00200780); /* add f32 $r0 (mul a[0xc] c0[0x4]) $r0 */ PUSH_DATA (push, 0xe0840605); PUSH_DATA (push, 0x00204780); /* add f32 $r1 (mul a[0xc] c0[0x10]) $r1 */ PUSH_DATA (push, 0xe0870609); PUSH_DATA (push, 0x00208780); /* add f32 $r2 (mul a[0xc] c0[0x1c]) $r2 */ PUSH_DATA (push, 0xb1000001); PUSH_DATA (push, 0x00008780); /* add rn f32 $r0 $r0 c0[0x8] */ PUSH_DATA (push, 0xb1000205); PUSH_DATA (push, 0x00014780); /* add rn f32 $r1 $r1 c0[0x14] */ PUSH_DATA (push, 0xb1000409); PUSH_DATA (push, 0x00020780); /* add rn f32 $r2 $r2 c0[0x20] */ PUSH_DATA (push, 0x90000409); PUSH_DATA (push, 0x00000780); /* rcp f32 $r2 $r2 */ PUSH_DATA (push, 0xc0020001); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r0 $r0 $r2 */ PUSH_DATA (push, 0xc0020205); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r1 $r1 $r2 */ PUSH_DATA (push, 0xc0890009); PUSH_DATA (push, 0x00000788); /* mul rn f32 o[0x8] $r0 c0[0x24] */ PUSH_DATA (push, 0xc08a020d); PUSH_DATA (push, 0x00000788); /* mul rn f32 o[0xc] $r1 c0[0x28] */ PUSH_DATA (push, 0xc08b0801); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r0 a[0x10] c0[0x2c] */ PUSH_DATA (push, 0xc08e0805); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r1 a[0x10] c0[0x38] */ PUSH_DATA (push, 0xc0910809); PUSH_DATA (push, 0x00200780); /* mul rn f32 $r2 a[0x10] c0[0x44] */ PUSH_DATA (push, 0xe08c0a01); PUSH_DATA (push, 0x00200780); /* add f32 $r0 (mul a[0x14] c0[0x30]) $r0 */ PUSH_DATA (push, 0xe08f0a05); PUSH_DATA (push, 0x00204780); /* add f32 $r1 (mul a[0x14] c0[0x3c]) $r1 */ PUSH_DATA (push, 0xe0920a09); PUSH_DATA (push, 0x00208780); /* add f32 $r2 (mul a[0x14] c0[0x48]) $r2 */ PUSH_DATA (push, 0xb1000001); PUSH_DATA (push, 0x00034780); /* add rn f32 $r0 $r0 c0[0x34] */ PUSH_DATA (push, 0xb1000205); PUSH_DATA (push, 0x00040780); /* add rn f32 $r1 $r1 c0[0x40] */ PUSH_DATA (push, 0xb1000409); PUSH_DATA (push, 0x0004c780); /* add rn f32 $r2 $r2 c0[0x4c] */ PUSH_DATA (push, 0x90000409); PUSH_DATA (push, 0x00000780); /* rcp f32 $r2 $r2 */ PUSH_DATA (push, 0xc0020001); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r0 $r0 $r2 */ PUSH_DATA (push, 0xc0020205); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r1 $r1 $r2 */ PUSH_DATA (push, 0xc0940011); PUSH_DATA (push, 0x00000788); /* mul rn f32 o[0x10] $r0 c0[0x50] */ PUSH_DATA (push, 0xc0950215); PUSH_DATA (push, 0x00000789); /* exit mul rn f32 o[0x14] $r1 c0[0x54] */ /* fetch only VTX_ATTR[0,8,9].xy */ BEGIN_NV04(push, NV50_3D(VP_ATTR_EN(0)), 2); PUSH_DATA (push, 0x00000003); PUSH_DATA (push, 0x00000033); BEGIN_NV04(push, NV50_3D(VP_REG_ALLOC_RESULT), 1); PUSH_DATA (push, 6); BEGIN_NV04(push, NV50_3D(VP_RESULT_MAP_SIZE), 2); PUSH_DATA (push, 8); PUSH_DATA (push, 4); /* NV50_3D_VP_REG_ALLOC_TEMP */ BEGIN_NV04(push, NV50_3D(VP_ADDRESS_HIGH), 2); PUSH_DATA (push, (pNv->scratch->offset + PVP_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PVP_OFFSET)); BEGIN_NV04(push, NV50_3D(CB_DEF_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA)); PUSH_DATA (push, (CB_PVP << NV50_3D_CB_DEF_SET_BUFFER__SHIFT) | 256); BEGIN_NV04(push, NV50_3D(SET_PROGRAM_CB), 1); PUSH_DATA (push, 0x00000001 | (CB_PVP << 12)); BEGIN_NV04(push, NV50_3D(VP_START_ID), 1); PUSH_DATA (push, 0); PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_S, 6); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82010200); /* interp $r0 v[0x4] $r1 */ PUSH_DATA (push, 0x82020204); /* interp $r1 v[0x8] $r1 */ PUSH_DATA (push, 0xf6400001); PUSH_DATA (push, 0x0000c785); /* exit texauto live $r0:$r1:$r2:$r3 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_C, 16); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82030210); /* interp $r4 v[0xc] $r1 */ PUSH_DATA (push, 0x82040214); /* interp $r5 v[0x10] $r1 */ PUSH_DATA (push, 0x82010200); /* interp $r0 v[0x4] $r1 */ PUSH_DATA (push, 0x82020204); /* interp $r1 v[0x8] $r1 */ PUSH_DATA (push, 0xf6400001); PUSH_DATA (push, 0x0000c784); /* texauto live $r0:$r1:$r2:$r3 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xf0400211); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r4 $t1 $s0 $r4:$r5 0x0 0x0 0x0 */ PUSH_DATA (push, 0xc0040000); /* mul f32 $r0 $r0 $r4 */ PUSH_DATA (push, 0xc0040204); /* mul f32 $r1 $r1 $r4 */ PUSH_DATA (push, 0xc0040409); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r2 $r2 $r4 */ PUSH_DATA (push, 0xc004060d); PUSH_DATA (push, 0x00000781); /* exit mul rn f32 $r3 $r3 $r4 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_CCA, 16); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82030210); /* interp $r4 v[0xc] $r1 */ PUSH_DATA (push, 0x82040214); /* interp $r5 v[0x10] $r1 */ PUSH_DATA (push, 0x82010200); /* interp $r0 v[0x4] $r1 */ PUSH_DATA (push, 0x82020204); /* interp $r1 v[0x8] $r1 */ PUSH_DATA (push, 0xf6400001); PUSH_DATA (push, 0x0000c784); /* texauto live $r0:$r1:$r2:$r3 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xf6400211); PUSH_DATA (push, 0x0000c784); /* texauto live $r4:$r5:$r6:$r7 $t1 $s0 $r4:$r5 0x0 0x0 0x0 */ PUSH_DATA (push, 0xc0040000); /* mul f32 $r0 $r0 $r4 */ PUSH_DATA (push, 0xc0050204); /* mul f32 $r1 $r1 $r5 */ PUSH_DATA (push, 0xc0060409); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r2 $r2 $r6 */ PUSH_DATA (push, 0xc007060d); PUSH_DATA (push, 0x00000781); /* exit mul rn f32 $r3 $r3 $r7 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_CCASA, 16); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82030200); /* interp $r0 v[0xc] $r1 */ PUSH_DATA (push, 0x82040204); /* interp $r1 v[0x10] $r1 */ PUSH_DATA (push, 0x82010210); /* interp $r4 v[0x4] $r1 */ PUSH_DATA (push, 0x82020214); /* interp $r5 v[0x8] $r1 */ PUSH_DATA (push, 0xf6400201); PUSH_DATA (push, 0x0000c784); /* texauto live $r0:$r1:$r2:$r3 $t1 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xf0400011); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r4 $t0 $s0 $r4:$r5 0x0 0x0 0x0 */ PUSH_DATA (push, 0xc0040000); /* mul f32 $r0 $r0 $r4 */ PUSH_DATA (push, 0xc0040204); /* mul f32 $r1 $r1 $r4 */ PUSH_DATA (push, 0xc0040409); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r2 $r2 $r4 */ PUSH_DATA (push, 0xc004060d); PUSH_DATA (push, 0x00000781); /* exit mul rn f32 $r3 $r3 $r4 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_S_A8, 10); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82010200); /* interp $r0 v[0x4] $r1 */ PUSH_DATA (push, 0x82020204); /* interp $r1 v[0x8] $r1 */ PUSH_DATA (push, 0xf0400001); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r0 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0x10008004); /* mov b32 $r1 $r0 */ PUSH_DATA (push, 0x10008008); /* mov b32 $r2 $r0 */ PUSH_DATA (push, 0x1000000d); PUSH_DATA (push, 0x0403c781); /* exit mov b32 $r3 $r0 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_C_A8, 16); PUSH_DATA (push, 0x80000000); /* interp $r0 v[0x0] */ PUSH_DATA (push, 0x90000004); /* rcp f32 $r1 $r0 */ PUSH_DATA (push, 0x82030208); /* interp $r2 v[0xc] $r1 */ PUSH_DATA (push, 0x8204020c); /* interp $r3 v[0x10] $r1 */ PUSH_DATA (push, 0x82010200); /* interp $r0 v[0x4] $r1 */ PUSH_DATA (push, 0x82020204); /* interp $r1 v[0x8] $r1 */ PUSH_DATA (push, 0xf0400001); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r0 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xf0400209); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r2 $t1 $s0 $r2:$r3 0x0 0x0 0x0 */ PUSH_DATA (push, 0xc002000d); PUSH_DATA (push, 0x00000780); /* mul rn f32 $r3 $r0 $r2 */ PUSH_DATA (push, 0x10008600); /* mov b32 $r0 $r3 */ PUSH_DATA (push, 0x10008604); /* mov b32 $r1 $r3 */ PUSH_DATA (push, 0x10000609); PUSH_DATA (push, 0x0403c781); /* exit mov b32 $r2 $r3 */ PUSH_DATAu(push, pNv->scratch, PFP_OFFSET + PFP_NV12, 24); PUSH_DATA (push, 0x80000008); /* interp $r2 v[0x0] */ PUSH_DATA (push, 0x90000408); /* rcp f32 $r2 $r2 */ PUSH_DATA (push, 0x82010400); /* interp $r0 v[0x4] $r2 */ PUSH_DATA (push, 0x82020404); /* interp $r1 v[0x8] $r2 */ PUSH_DATA (push, 0xf0400001); PUSH_DATA (push, 0x00008784); /* texauto live #:#:#:$r0 $t0 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xc0800014); /* mul f32 $r5 $r0 c0[0x0] */ PUSH_DATA (push, 0xb0810a0c); /* add f32 $r3 $r5 c0[0x4] */ PUSH_DATA (push, 0xb0820a10); /* add f32 $r4 $r5 c0[0x8] */ PUSH_DATA (push, 0xb0830a14); /* add f32 $r5 $r5 c0[0xc] */ PUSH_DATA (push, 0x82010400); /* interp $r0 v[0x4] $r2 */ PUSH_DATA (push, 0x82020404); /* interp $r1 v[0x8] $r2 */ PUSH_DATA (push, 0xf0400201); PUSH_DATA (push, 0x0000c784); /* texauto live #:#:$r0:$r1 $t1 $s0 $r0:$r1 0x0 0x0 0x0 */ PUSH_DATA (push, 0xe084000c); /* add f32 $r3 (mul $r0 c0[0x10]) $r3 */ PUSH_DATA (push, 0xe0850010); /* add f32 $r4 (mul $r0 c0[0x14]) $r4 */ PUSH_DATA (push, 0xe0860015); PUSH_DATA (push, 0x00014780); /* add f32 $r5 (mul $r0 c0[0x18]) $r5 */ PUSH_DATA (push, 0xe0870201); PUSH_DATA (push, 0x0000c780); /* add f32 $r0 (mul $r1 c0[0x1c]) $r3 */ PUSH_DATA (push, 0xe0890209); PUSH_DATA (push, 0x00014780); /* add f32 $r2 (mul $r1 c0[0x24]) $r5 */ PUSH_DATA (push, 0xe0880205); PUSH_DATA (push, 0x00010781); /* exit add f32 $r1 (mul $r1 c0[0x20]) $r4 */ /* HPOS.xy = ($o0, $o1), HPOS.zw = (0.0, 1.0), then map $o2 - $o5 */ BEGIN_NV04(push, NV50_3D(VP_RESULT_MAP(0)), 2); PUSH_DATA (push, 0x41400100); PUSH_DATA (push, 0x05040302); BEGIN_NV04(push, NV50_3D(POINT_SPRITE_ENABLE), 1); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV50_3D(FP_INTERPOLANT_CTRL), 2); PUSH_DATA (push, 0x08040404); PUSH_DATA (push, 0x00000008); /* NV50_3D_FP_REG_ALLOC_TEMP */ BEGIN_NV04(push, NV50_3D(FP_ADDRESS_HIGH), 2); PUSH_DATA (push, (pNv->scratch->offset + PFP_OFFSET) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PFP_OFFSET)); BEGIN_NV04(push, NV50_3D(CB_DEF_ADDRESS_HIGH), 3); PUSH_DATA (push, (pNv->scratch->offset + PFP_DATA) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PFP_DATA)); PUSH_DATA (push, (CB_PFP << NV50_3D_CB_DEF_SET_BUFFER__SHIFT) | 256); BEGIN_NV04(push, NV50_3D(SET_PROGRAM_CB), 1); PUSH_DATA (push, 0x00000031 | (CB_PFP << 12)); BEGIN_NV04(push, NV50_3D(SCISSOR_ENABLE(0)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(VIEWPORT_HORIZ(0)), 2); PUSH_DATA (push, 8192 << NV50_3D_VIEWPORT_HORIZ_W__SHIFT); PUSH_DATA (push, 8192 << NV50_3D_VIEWPORT_VERT_H__SHIFT); /* NV50_3D_SCISSOR_VERT_T_SHIFT is wrong, because it was deducted with * origin lying at the bottom left. This will be changed to _MIN_ and _MAX_ * later, because it is origin dependent. */ BEGIN_NV04(push, NV50_3D(SCISSOR_HORIZ(0)), 2); PUSH_DATA (push, 8192 << NV50_3D_SCISSOR_HORIZ_MAX__SHIFT); PUSH_DATA (push, 8192 << NV50_3D_SCISSOR_VERT_MAX__SHIFT); BEGIN_NV04(push, NV50_3D(SCREEN_SCISSOR_HORIZ), 2); PUSH_DATA (push, 8192 << NV50_3D_SCREEN_SCISSOR_HORIZ_W__SHIFT); PUSH_DATA (push, 8192 << NV50_3D_SCREEN_SCISSOR_VERT_H__SHIFT); return TRUE; } xf86-video-nouveau-1.0.18/src/nv_driver.c0000644000175000017500000011570714713424663013617 /* * Copyright 1996-1997 David J. McKay * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include #include #include "nv_include.h" #include "xorg-server.h" #include "xf86drm.h" #include "xf86drmMode.h" #include "nouveau_drm.h" #ifdef DRI2 #include "dri2.h" #endif #include "nouveau_copy.h" #include "nouveau_present.h" #include "nouveau_sync.h" /* * Forward definitions for the functions that make up the driver. */ /* Mandatory functions */ static const OptionInfoRec * NVAvailableOptions(int chipid, int busid); static void NVIdentify(int flags); static Bool NVPreInit(ScrnInfoPtr pScrn, int flags); static Bool NVScreenInit(SCREEN_INIT_ARGS_DECL); static Bool NVEnterVT(VT_FUNC_ARGS_DECL); static void NVLeaveVT(VT_FUNC_ARGS_DECL); static Bool NVCloseScreen(CLOSE_SCREEN_ARGS_DECL); static Bool NVSaveScreen(ScreenPtr pScreen, int mode); static void NVCloseDRM(ScrnInfoPtr); /* Optional functions */ static Bool NVDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data); static Bool NVSwitchMode(SWITCH_MODE_ARGS_DECL); static void NVAdjustFrame(ADJUST_FRAME_ARGS_DECL); static void NVFreeScreen(FREE_SCREEN_ARGS_DECL); /* Internally used functions */ static Bool NVMapMem(ScrnInfoPtr pScrn); static Bool NVUnmapMem(ScrnInfoPtr pScrn); #define NOUVEAU_PCI_DEVICE(_vendor_id, _device_id) \ { (_vendor_id), (_device_id), PCI_MATCH_ANY, PCI_MATCH_ANY, \ 0x00030000, 0x00ff0000, 0 } static const struct pci_id_match nouveau_device_match[] = { NOUVEAU_PCI_DEVICE(0x12d2, PCI_MATCH_ANY), NOUVEAU_PCI_DEVICE(0x10de, PCI_MATCH_ANY), { 0, 0, 0 }, }; static Bool NVPciProbe ( DriverPtr drv, int entity_num, struct pci_device *dev, intptr_t match_data ); #ifdef XSERVER_PLATFORM_BUS static Bool NVPlatformProbe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *dev, intptr_t dev_match_data); #endif _X_EXPORT int NVEntityIndex = -1; static int getNVEntityIndex(void) { return NVEntityIndex; } /* * This contains the functions needed by the server after loading the * driver module. It must be supplied, and gets added the driver list by * the Module Setup funtion in the dynamic case. In the static case a * reference to this is compiled in, and this requires that the name of * this DriverRec be an upper-case version of the driver name. */ _X_EXPORT DriverRec NV = { NV_VERSION, NV_DRIVER_NAME, NVIdentify, NULL, NVAvailableOptions, NULL, 0, NVDriverFunc, nouveau_device_match, NVPciProbe, #ifdef XSERVER_PLATFORM_BUS NVPlatformProbe, #endif }; struct NvFamily { char *name; char *chipset; }; static struct NvFamily NVKnownFamilies[] = { { "RIVA TNT", "NV04" }, { "RIVA TNT2", "NV05" }, { "GeForce 256", "NV10" }, { "GeForce 2", "NV11, NV15" }, { "GeForce 4MX", "NV17, NV18" }, { "GeForce 3", "NV20" }, { "GeForce 4Ti", "NV25, NV28" }, { "GeForce FX", "NV3x" }, { "GeForce 6", "NV4x" }, { "GeForce 7", "G7x" }, { "GeForce 8", "G8x" }, { "GeForce 9", "G9x" }, { "GeForce GTX 2xx/3xx", "GT2xx" }, { "GeForce GTX 4xx/5xx", "GFxxx" }, { "GeForce GTX 6xx/7xx", "GKxxx" }, { "GeForce GTX 9xx", "GMxxx" }, { "GeForce GTX 10xx", "GPxxx" }, { NULL, NULL} }; static MODULESETUPPROTO(nouveauSetup); static XF86ModuleVersionInfo nouveauVersRec = { "nouveau", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0,0,0,0} }; _X_EXPORT XF86ModuleData nouveauModuleData = { &nouveauVersRec, nouveauSetup, NULL }; static pointer nouveauSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; /* This module should be loaded only once, but check to be sure. */ if (!setupDone) { setupDone = TRUE; /* The 1 here is needed to turn off a backwards compatibility mode */ /* Otherwise NVPciProbe() is not called */ xf86AddDriver(&NV, module, 1); /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ return (pointer)1; } else { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; } } static const OptionInfoRec * NVAvailableOptions(int chipid, int busid) { return NVOptions; } /* Mandatory */ static void NVIdentify(int flags) { struct NvFamily *family; size_t maxLen=0; xf86DrvMsg(0, X_INFO, NV_NAME " driver " NV_DRIVER_DATE "\n"); xf86DrvMsg(0, X_INFO, NV_NAME " driver for NVIDIA chipset families :\n"); /* maximum length for alignment */ family = NVKnownFamilies; while(family->name && family->chipset) { maxLen = max(maxLen, strlen(family->name)); family++; } /* display */ family = NVKnownFamilies; while(family->name && family->chipset) { size_t len = strlen(family->name); xf86ErrorF("\t%s", family->name); while(lenchipset); family++; } } static Bool NVDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data) { xorgHWFlags *flag; switch (op) { case GET_REQUIRED_HW_INTERFACES: flag = (CARD32 *)data; (*flag) = 0; return TRUE; case SUPPORTS_SERVER_FDS: return TRUE; default: return FALSE; } } static void NVInitScrn(ScrnInfoPtr pScrn, struct xf86_platform_device *platform_dev, int entity_num) { DevUnion *pPriv; NVEntPtr pNVEnt; pScrn->driverVersion = NV_VERSION; pScrn->driverName = NV_DRIVER_NAME; pScrn->name = NV_NAME; pScrn->Probe = NULL; pScrn->PreInit = NVPreInit; pScrn->ScreenInit = NVScreenInit; pScrn->SwitchMode = NVSwitchMode; pScrn->AdjustFrame = NVAdjustFrame; pScrn->EnterVT = NVEnterVT; pScrn->LeaveVT = NVLeaveVT; pScrn->FreeScreen = NVFreeScreen; xf86SetEntitySharable(entity_num); if (NVEntityIndex == -1) NVEntityIndex = xf86AllocateEntityPrivateIndex(); pPriv = xf86GetEntityPrivate(entity_num, NVEntityIndex); if (!pPriv->ptr) { pPriv->ptr = XNFcallocarray(sizeof(NVEntRec), 1); pNVEnt = pPriv->ptr; pNVEnt->platform_dev = platform_dev; } else pNVEnt = pPriv->ptr; /* Reset settings which must not persist across server regeneration */ if (pNVEnt->reinitGeneration != serverGeneration) { pNVEnt->reinitGeneration = serverGeneration; /* Clear mask of assigned crtc's in this generation to "none" */ pNVEnt->assigned_crtcs = 0; } xf86SetEntityInstanceForScreen(pScrn, entity_num, xf86GetNumEntityInstances(entity_num) - 1); } static struct nouveau_device * NVOpenNouveauDevice(struct pci_device *pci_dev, struct xf86_platform_device *platform_dev, int scrnIndex, Bool probe) { struct nouveau_device *dev = NULL; char *busid; int ret, fd = -1; #ifdef ODEV_ATTRIB_PATH if (platform_dev) busid = NULL; else #endif { XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d", pci_dev->domain, pci_dev->bus, pci_dev->dev, pci_dev->func); } #if defined(ODEV_ATTRIB_FD) if (platform_dev) fd = xf86_get_platform_device_int_attrib(platform_dev, ODEV_ATTRIB_FD, -1); #endif if (fd != -1) ret = nouveau_device_wrap(fd, 0, &dev); #ifdef ODEV_ATTRIB_PATH else if (platform_dev) { const char *path; path = xf86_get_platform_device_attrib(platform_dev, ODEV_ATTRIB_PATH); fd = open(path, O_RDWR | O_CLOEXEC); ret = nouveau_device_wrap(fd, 1, &dev); if (ret) close(fd); } #endif else ret = nouveau_device_open(busid, &dev); if (ret) xf86DrvMsg(scrnIndex, X_ERROR, "[drm] Failed to open DRM device for %s: %d\n", busid, ret); free(busid); return dev; } static Bool NVHasKMS(struct pci_device *pci_dev, struct xf86_platform_device *platform_dev) { struct nouveau_device *dev = NULL; drmVersion *version; int chipset; dev = NVOpenNouveauDevice(pci_dev, platform_dev, -1, TRUE); if (!dev) return FALSE; /* Check the version reported by the kernel module. In theory we * shouldn't have to do this, as libdrm_nouveau will do its own checks. * But, we're currently using the kernel patchlevel to also version * the DRI interface. */ version = drmGetVersion(dev->fd); xf86DrvMsg(-1, X_INFO, "[drm] nouveau interface version: %d.%d.%d\n", version->version_major, version->version_minor, version->version_patchlevel); drmFree(version); chipset = dev->chipset; nouveau_device_del(&dev); switch (chipset & ~0xf) { case 0x00: case 0x10: case 0x20: case 0x30: case 0x40: case 0x60: case 0x50: case 0x80: case 0x90: case 0xa0: case 0xc0: case 0xd0: case 0xe0: case 0xf0: case 0x100: case 0x110: case 0x120: case 0x130: break; default: xf86DrvMsg(-1, X_ERROR, "Unknown chipset: NV%02X\n", chipset); return FALSE; } return TRUE; } static Bool NVPciProbe(DriverPtr drv, int entity_num, struct pci_device *pci_dev, intptr_t match_data) { PciChipsets NVChipsets[] = { { pci_dev->device_id, (pci_dev->vendor_id << 16) | pci_dev->device_id, NULL }, { -1, -1, NULL } }; ScrnInfoPtr pScrn = NULL; if (!NVHasKMS(pci_dev, NULL)) return FALSE; pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, NVChipsets, NULL, NULL, NULL, NULL, NULL); if (!pScrn) return FALSE; NVInitScrn(pScrn, NULL, entity_num); return TRUE; } #ifdef XSERVER_PLATFORM_BUS static Bool NVPlatformProbe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *dev, intptr_t dev_match_data) { ScrnInfoPtr scrn = NULL; uint32_t scr_flags = 0; if (!NVHasKMS(dev->pdev, dev)) return FALSE; if (flags & PLATFORM_PROBE_GPU_SCREEN) scr_flags = XF86_ALLOCATE_GPU_SCREEN; scrn = xf86AllocateScreen(driver, scr_flags); if (!scrn) return FALSE; if (xf86IsEntitySharable(entity_num)) xf86SetEntityShared(entity_num); xf86AddEntityToScreen(scrn, entity_num); NVInitScrn(scrn, dev, entity_num); return TRUE; } #endif #define MAX_CHIPS MAXSCREENS Bool NVSwitchMode(SWITCH_MODE_ARGS_DECL) { SCRN_INFO_PTR(arg); return xf86SetSingleMode(pScrn, mode, RR_Rotate_0); } /* * This function is used to initialize the Start Address - the first * displayed location in the video memory. */ /* Usually mandatory */ void NVAdjustFrame(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); drmmode_adjust_frame(pScrn, x, y); } /* * This is called when VT switching back to the X server. Its job is * to reinitialise the video mode. */ /* Mandatory */ static Bool NVEnterVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); NVPtr pNv = NVPTR(pScrn); #ifdef XF86_PDEV_SERVER_FD NVEntPtr pNVEnt = NVEntPriv(pScrn); #endif int ret; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVEnterVT is called.\n"); #ifdef XF86_PDEV_SERVER_FD if (!(pNVEnt->platform_dev && (pNVEnt->platform_dev->flags & XF86_PDEV_SERVER_FD))) #endif { ret = drmSetMaster(pNv->dev->fd); if (ret) ErrorF("Unable to get master: %s\n", strerror(errno)); } if (XF86_CRTC_CONFIG_PTR(pScrn)->num_crtc && !xf86SetDesiredModes(pScrn)) return FALSE; if (pNv->overlayAdaptor && pNv->Architecture != NV_ARCH_04) NV10WriteOverlayParameters(pScrn); return TRUE; } /* * This is called when VT switching away from the X server. Its job is * to restore the previous (text) mode. */ /* Mandatory */ static void NVLeaveVT(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); NVPtr pNv = NVPTR(pScrn); #ifdef XF86_PDEV_SERVER_FD NVEntPtr pNVEnt = NVEntPriv(pScrn); #endif int ret; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVLeaveVT is called.\n"); #ifdef XF86_PDEV_SERVER_FD if (pNVEnt->platform_dev && (pNVEnt->platform_dev->flags & XF86_PDEV_SERVER_FD)) return; #endif ret = drmDropMaster(pNv->dev->fd); if (ret && errno != EIO && errno != ENODEV) ErrorF("Error dropping master: %i(%m)\n", -errno); } static void NVFlushCallback(CallbackListPtr *list, pointer user_data, pointer call_data) { ScrnInfoPtr pScrn = user_data; NVPtr pNv = NVPTR(pScrn); if (pScrn->vtSema && pNv->Flush) pNv->Flush(pScrn); } #ifdef NOUVEAU_PIXMAP_SHARING static void redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty) { RegionRec pixregion; PixmapRegionInit(&pixregion, dirty->secondary_dst); DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion); PixmapSyncDirtyHelper(dirty); DamageRegionProcessPending(&dirty->secondary_dst->drawable); RegionUninit(&pixregion); } static void nouveau_dirty_update(ScreenPtr screen) { RegionPtr region; PixmapDirtyUpdatePtr ent; if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return; xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) { region = DamageRegion(ent->damage); if (RegionNotEmpty(region)) { redisplay_dirty(screen, ent); DamageEmpty(ent->damage); } } } #endif static void NVBlockHandler (BLOCKHANDLER_ARGS_DECL) { SCREEN_PTR(arg); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); pScreen->BlockHandler = pNv->BlockHandler; (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); pScreen->BlockHandler = NVBlockHandler; #ifdef NOUVEAU_PIXMAP_SHARING nouveau_dirty_update(pScreen); #endif NVFlushCallback(NULL, pScrn, NULL); if (pNv->VideoTimerCallback) (*pNv->VideoTimerCallback)(pScrn, currentTime.milliseconds); } static Bool NVCreateScreenResources(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); pScreen->CreateScreenResources = pNv->CreateScreenResources; if (!(*pScreen->CreateScreenResources)(pScreen)) return FALSE; pScreen->CreateScreenResources = NVCreateScreenResources; drmmode_fbcon_copy(pScreen); if (!NVEnterVT(VT_FUNC_ARGS(0))) return FALSE; if (pNv->AccelMethod == EXA) { PixmapPtr ppix = pScreen->GetScreenPixmap(pScreen); nouveau_bo_ref(pNv->scanout, &nouveau_pixmap(ppix)->bo); } return TRUE; } /* * This is called at the end of each server generation. It restores the * original (text) mode. It should also unmap the video memory, and free * any per-generation data allocated by the driver. It should finish * by unwrapping and calling the saved CloseScreen function. */ /* Mandatory */ static Bool NVCloseScreen(CLOSE_SCREEN_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); if (XF86_CRTC_CONFIG_PTR(pScrn)->num_crtc) drmmode_screen_fini(pScreen); nouveau_present_fini(pScreen); nouveau_dri2_fini(pScreen); nouveau_sync_fini(pScreen); nouveau_copy_fini(pScreen); if (pScrn->vtSema) { NVLeaveVT(VT_FUNC_ARGS(0)); pScrn->vtSema = FALSE; } NVTakedownVideo(pScrn); NVAccelCommonFini(pScrn); NVUnmapMem(pScrn); xf86_cursors_fini(pScreen); DeleteCallback(&FlushCallback, NVFlushCallback, pScrn); if (pNv->ShadowPtr) { free(pNv->ShadowPtr); pNv->ShadowPtr = NULL; } if (pNv->overlayAdaptor) { free(pNv->overlayAdaptor); pNv->overlayAdaptor = NULL; } if (pNv->blitAdaptor) { free(pNv->blitAdaptor); pNv->blitAdaptor = NULL; } if (pNv->textureAdaptor[0]) { free(pNv->textureAdaptor[0]); pNv->textureAdaptor[0] = NULL; } if (pNv->textureAdaptor[1]) { free(pNv->textureAdaptor[1]); pNv->textureAdaptor[1] = NULL; } if (pNv->EXADriverPtr) { exaDriverFini(pScreen); free(pNv->EXADriverPtr); pNv->EXADriverPtr = NULL; } pScrn->vtSema = FALSE; pScreen->CloseScreen = pNv->CloseScreen; pScreen->BlockHandler = pNv->BlockHandler; return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } /* Free up any persistent data structures */ /* Optional */ static void NVFreeScreen(FREE_SCREEN_ARGS_DECL) { /* * This only gets called when a screen is being deleted. It does not * get called routinely at the end of a server generation. */ SCRN_INFO_PTR(arg); NVPtr pNv = NVPTR(pScrn); if (!pNv) return; NVCloseDRM(pScrn); free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } #define NVPreInitFail(fmt, args...) do { \ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%d: "fmt, __LINE__, ##args); \ NVFreeScreen(FREE_SCREEN_ARGS(pScrn)); \ return FALSE; \ } while(0) static void NVCloseDRM(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); drmFree(pNv->drm_device_name); nouveau_client_del(&pNv->client); nouveau_device_del(&pNv->dev); free(pNv->render_node); } static void nouveau_setup_capabilities(ScrnInfoPtr pScrn) { #ifdef NOUVEAU_PIXMAP_SHARING NVPtr pNv = NVPTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); uint64_t value; int ret; pScrn->capabilities = 0; ret = drmGetCap(pNv->dev->fd, DRM_CAP_PRIME, &value); if (ret == 0) { if (value & DRM_PRIME_CAP_EXPORT) pScrn->capabilities |= RR_Capability_SourceOutput; if (value & DRM_PRIME_CAP_IMPORT) { pScrn->capabilities |= RR_Capability_SourceOffload; if (xf86_config->num_crtc) pScrn->capabilities |= RR_Capability_SinkOutput; } } #endif } NVEntPtr NVEntPriv(ScrnInfoPtr pScrn) { DevUnion *pPriv; NVPtr pNv = NVPTR(pScrn); pPriv = xf86GetEntityPrivate(pNv->pEnt->index, getNVEntityIndex()); return pPriv->ptr; } static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); NVEntPtr pNVEnt = NVEntPriv(pScrn); drmSetVersion sv; int err; int ret; if (pNVEnt->fd) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, " reusing fd for second head\n"); ret = nouveau_device_wrap(pNVEnt->fd, 0, &pNv->dev); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] error creating device\n"); return FALSE; } return TRUE; } pNv->dev = NVOpenNouveauDevice(pNv->PciInfo, pNVEnt->platform_dev, pScrn->scrnIndex, FALSE); if (!pNv->dev) return FALSE; sv.drm_di_major = 1; sv.drm_di_minor = 1; sv.drm_dd_major = -1; sv.drm_dd_minor = -1; err = drmSetInterfaceVersion(pNv->dev->fd, &sv); if (err != 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] failed to set drm interface version.\n"); nouveau_device_del(&pNv->dev); return FALSE; } pNVEnt->fd = pNv->dev->fd; return TRUE; } static Bool NVPreInitDRM(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); int ret; if (!xf86LoadSubModule(pScrn, "dri2")) return FALSE; /* Load the kernel module, and open the DRM */ ret = NVOpenDRMMaster(pScrn); if (!ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] error opening the drm\n"); return FALSE; } ret = nouveau_client_new(pNv->dev, &pNv->client); if (ret) return FALSE; pNv->drm_device_name = drmGetDeviceNameFromFd(pNv->dev->fd); return TRUE; } /* Mandatory */ Bool NVPreInit(ScrnInfoPtr pScrn, int flags) { struct nouveau_device *dev; NVPtr pNv; MessageType from; const char *reason, *string; uint64_t v; int ret; int defaultDepth = 0; if (flags & PROBE_DETECT) { EntityInfoPtr pEnt = xf86GetEntityInfo(pScrn->entityList[0]); if (!pEnt) return FALSE; free(pEnt); return TRUE; } /* * Note: This function is only called once at server startup, and * not at the start of each server generation. This means that * only things that are persistent across server generations can * be initialised here. xf86Screens[] is (pScrn is a pointer to one * of these). Privates allocated using xf86AllocateScrnInfoPrivateIndex() * are too, and should be used for data that must persist across * server generations. * * Per-generation data should be allocated with * AllocateScreenPrivateIndex() from the ScreenInit() function. */ /* Check the number of entities, and fail if it isn't one. */ if (pScrn->numEntities != 1) return FALSE; /* Allocate the NVRec driverPrivate */ if (!(pScrn->driverPrivate = XNFcallocarray(1, sizeof(NVRec)))) return FALSE; pNv = NVPTR(pScrn); /* Get the entity, and make sure it is PCI. */ pNv->pEnt = xf86GetEntityInfo(pScrn->entityList[0]); if (pNv->pEnt->location.type != BUS_PCI #ifdef XSERVER_PLATFORM_BUS && pNv->pEnt->location.type != BUS_PLATFORM #endif ) return FALSE; if (xf86IsEntityShared(pScrn->entityList[0])) { if(!xf86IsPrimInitDone(pScrn->entityList[0])) { pNv->Primary = TRUE; xf86SetPrimInitDone(pScrn->entityList[0]); } else { pNv->Secondary = TRUE; } } /* Find the PCI info for this screen */ pNv->PciInfo = xf86GetPciInfoForEntity(pNv->pEnt->index); /* Initialise the kernel module */ if (!NVPreInitDRM(pScrn)) NVPreInitFail("\n"); dev = pNv->dev; pScrn->chipset = malloc(sizeof(char) * 25); sprintf((char *)pScrn->chipset, "NVIDIA NV%02X", dev->chipset); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\"\n", pScrn->chipset); switch (dev->chipset & ~0xf) { case 0x00: pNv->Architecture = NV_ARCH_04; break; case 0x10: pNv->Architecture = NV_ARCH_10; break; case 0x20: pNv->Architecture = NV_ARCH_20; break; case 0x30: pNv->Architecture = NV_ARCH_30; break; case 0x40: case 0x60: pNv->Architecture = NV_ARCH_40; break; case 0x50: case 0x80: case 0x90: case 0xa0: pNv->Architecture = NV_TESLA; break; case 0xc0: case 0xd0: pNv->Architecture = NV_FERMI; break; case 0xe0: case 0xf0: case 0x100: pNv->Architecture = NV_KEPLER; break; case 0x110: case 0x120: pNv->Architecture = NV_MAXWELL; break; case 0x130: pNv->Architecture = NV_PASCAL; break; default: return FALSE; } /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; /* * The first thing we should figure out is the depth, bpp, etc. */ if (dev->vram_size <= 16 * 1024 * 1024) defaultDepth = 16; if (!xf86SetDepthBpp(pScrn, defaultDepth, 0, 0, Support32bppFb)) { NVPreInitFail("\n"); } else { /* Check that the returned depth is one we support */ switch (pScrn->depth) { case 16: case 24: /* OK */ break; case 30: /* OK on NV50 KMS */ if (pNv->Architecture < NV_TESLA) NVPreInitFail("Depth 30 supported on G80+ only\n"); break; case 15: /* 15 may get done one day, so leave any code for it in place */ default: NVPreInitFail("Given depth (%d) is not supported by this driver\n", pScrn->depth); } } xf86PrintDepthBpp(pScrn); /* * This must happen after pScrn->display has been set because * xf86SetWeight references it. */ rgb rgbzeros = {0, 0, 0}; if (pScrn->depth == 30) { rgb rgbmask; rgbmask.red = 0x000003ff; rgbmask.green = 0x000ffc00; rgbmask.blue = 0x3ff00000; if (!xf86SetWeight(pScrn, rgbzeros, rgbmask)) NVPreInitFail("\n"); /* xf86SetWeight() seems to think ffs(1) == 0... */ pScrn->offset.red--; pScrn->offset.green--; pScrn->offset.blue--; } else { if (!xf86SetWeight(pScrn, rgbzeros, rgbzeros)) NVPreInitFail("\n"); } if (!xf86SetDefaultVisual(pScrn, -1)) NVPreInitFail("\n"); /* We don't support DirectColor */ if (pScrn->defaultVisual != TrueColor) { NVPreInitFail("Given default visual (%s) is not supported at depth %d\n", xf86GetVisualName(pScrn->defaultVisual), pScrn->depth); } /* We use a programmable clock */ pScrn->progClock = TRUE; /* Collect all of the relevant option flags (fill in pScrn->options) */ xf86CollectOptions(pScrn, NULL); /* Process the options */ if (!(pNv->Options = malloc(sizeof(NVOptions)))) return FALSE; memcpy(pNv->Options, NVOptions, sizeof(NVOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pNv->Options); from = X_DEFAULT; pNv->HWCursor = TRUE; /* * The preferred method is to use the "hw cursor" option as a tri-state * option, with the default set above. */ if (xf86GetOptValBool(pNv->Options, OPTION_HW_CURSOR, &pNv->HWCursor)) { from = X_CONFIG; } /* For compatibility, accept this too (as an override) */ if (xf86ReturnOptValBool(pNv->Options, OPTION_SW_CURSOR, FALSE)) { from = X_CONFIG; pNv->HWCursor = FALSE; } xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n", pNv->HWCursor ? "HW" : "SW"); string = xf86GetOptValString(pNv->Options, OPTION_ACCELMETHOD); if (string) { if (!strcmp(string, "none")) pNv->AccelMethod = NONE; else if (!strcmp(string, "exa")) pNv->AccelMethod = EXA; else { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Invalid AccelMethod specified\n"); } } if (pNv->AccelMethod == UNKNOWN) { pNv->AccelMethod = EXA; } if (xf86ReturnOptValBool(pNv->Options, OPTION_NOACCEL, FALSE)) { pNv->AccelMethod = NONE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n"); } if (xf86ReturnOptValBool(pNv->Options, OPTION_SHADOW_FB, FALSE)) { pNv->ShadowFB = TRUE; pNv->AccelMethod = NONE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using \"Shadow Framebuffer\" - acceleration disabled\n"); } if (pNv->AccelMethod > NONE) { if (pNv->Architecture >= NV_TESLA) pNv->wfb_enabled = xf86ReturnOptValBool( pNv->Options, OPTION_WFB, FALSE); if (pNv->Architecture >= NV_ARCH_10) pNv->tiled_scanout = TRUE; } pNv->ce_enabled = xf86ReturnOptValBool(pNv->Options, OPTION_ASYNC_COPY, FALSE); /* Define maximum allowed level of DRI implementation to use. * We default to DRI2 on EXA for now, as DRI3 still has some * problems. */ pNv->max_dri_level = 2; from = X_DEFAULT; if (xf86GetOptValInteger(pNv->Options, OPTION_DRI, &pNv->max_dri_level)) { from = X_CONFIG; if (pNv->max_dri_level < 2) pNv->max_dri_level = 2; if (pNv->max_dri_level > 3) pNv->max_dri_level = 3; } xf86DrvMsg(pScrn->scrnIndex, from, "Allowed maximum DRI level %i.\n", pNv->max_dri_level); if (pNv->AccelMethod > NONE && pNv->dev->chipset >= 0x11) { from = X_DEFAULT; pNv->glx_vblank = TRUE; if (xf86GetOptValBool(pNv->Options, OPTION_GLX_VBLANK, &pNv->glx_vblank)) from = X_CONFIG; xf86DrvMsg(pScrn->scrnIndex, from, "GLX sync to VBlank %s.\n", pNv->glx_vblank ? "enabled" : "disabled"); } #ifdef NOUVEAU_GETPARAM_HAS_PAGEFLIP reason = ": no kernel support"; from = X_DEFAULT; ret = nouveau_getparam(pNv->dev, NOUVEAU_GETPARAM_HAS_PAGEFLIP, &v); if (ret == 0 && v == 1) { pNv->has_pageflip = TRUE; if (xf86GetOptValBool(pNv->Options, OPTION_PAGE_FLIP, &pNv->has_pageflip)) from = X_CONFIG; reason = ""; } #else reason = ": not available at build time"; #endif xf86DrvMsg(pScrn->scrnIndex, from, "Page flipping %sabled%s\n", pNv->has_pageflip ? "en" : "dis", reason); if(xf86GetOptValInteger(pNv->Options, OPTION_VIDEO_KEY, &(pNv->videoKey))) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "video key set to 0x%x\n", pNv->videoKey); } else { pNv->videoKey = (1 << pScrn->offset.red) | (1 << pScrn->offset.green) | (((pScrn->mask.blue >> pScrn->offset.blue) - 1) << pScrn->offset.blue); } /* Limit to max 2 pending swaps - we can't handle more than triple-buffering: */ pNv->max_swap_limit = 2; if(xf86GetOptValInteger(pNv->Options, OPTION_SWAP_LIMIT, &(pNv->swap_limit))) { if (pNv->swap_limit < 1) pNv->swap_limit = 1; if (pNv->swap_limit > pNv->max_swap_limit) pNv->swap_limit = pNv->max_swap_limit; reason = ""; from = X_CONFIG; if ((DRI2INFOREC_VERSION < 6) && (pNv->swap_limit > 1)) { /* No swap limit api in server. A value > 1 requires use * of problematic hacks. */ from = X_WARNING; reason = ": Caution: Use of this swap limit > 1 violates OML_sync_control spec on this X-Server!\n"; } } else { /* Always default to double-buffering, because it avoids artifacts like * unthrottled rendering of non-fullscreen clients under desktop composition. */ pNv->swap_limit = 1; reason = ""; from = X_DEFAULT; } xf86DrvMsg(pScrn->scrnIndex, from, "Swap limit set to %d [Max allowed %d]%s\n", pNv->swap_limit, pNv->max_swap_limit, reason); /* Does kernel do the sync of pageflips to vblank? */ pNv->has_async_pageflip = FALSE; #ifdef DRM_CAP_ASYNC_PAGE_FLIP ret = drmGetCap(pNv->dev->fd, DRM_CAP_ASYNC_PAGE_FLIP, &v); if (ret == 0 && v == 1) { pNv->has_async_pageflip = TRUE; } xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Page flipping synced to vblank by %s.\n", pNv->has_async_pageflip ? "kernel" : "ddx"); #endif ret = drmmode_pre_init(pScrn, pNv->dev->fd, pScrn->bitsPerPixel >> 3); if (ret == FALSE) NVPreInitFail("Kernel modesetting failed to initialize\n"); /* * If the driver can do gamma correction, it should call xf86SetGamma() * here. */ Gamma gammazeros = {0.0, 0.0, 0.0}; if (!xf86SetGamma(pScrn, gammazeros)) NVPreInitFail("\n"); #ifdef NOUVEAU_PIXMAP_SHARING /* * The driver will not work as gpu screen without acceleration enabled. * To support this usecase modesetting ddx can be used instead. */ if (pNv->AccelMethod <= NONE || pNv->ShadowFB) { /* * Optimus mode requires acceleration enabled. * So if no mode is found, or the screen is created * as a gpu screen the pre init should fail. */ if (pScrn->is_gpu || !pScrn->modes) return FALSE; } #else /* No usable mode, no optimus config possible */ if (!pScrn->modes) return FALSE; #endif nouveau_setup_capabilities(pScrn); if (!pScrn->modes) { pScrn->modes = xf86ModesAdd(pScrn->modes, xf86CVTMode(pScrn->display->virtualX, pScrn->display->virtualY, 60, 0, 0)); } /* Set the current mode to the first in the list */ pScrn->currentMode = pScrn->modes; /* Print the list of modes being used */ xf86PrintModes(pScrn); /* Set display resolution */ xf86SetDpi(pScrn, 0, 0); if (pNv->wfb_enabled) { if (xf86LoadSubModule(pScrn, "wfb") == NULL) NVPreInitFail("\n"); } if (xf86LoadSubModule(pScrn, "fb") == NULL) NVPreInitFail("\n"); /* Load shadowfb */ if (!xf86LoadSubModule(pScrn, "shadowfb")) NVPreInitFail("\n"); return TRUE; } static Bool NVMapMem(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); int ret, pitch; ret = nouveau_allocate_surface(pScrn, pScrn->virtualX, pScrn->virtualY, pScrn->bitsPerPixel, NOUVEAU_CREATE_PIXMAP_SCANOUT, &pitch, &pNv->scanout); if (!ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Error allocating scanout buffer: %d\n", ret); return FALSE; } pScrn->displayWidth = pitch / (pScrn->bitsPerPixel / 8); return TRUE; } /* * Unmap the framebuffer and offscreen memory. */ static Bool NVUnmapMem(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); drmmode_remove_fb(pScrn); nouveau_bo_ref(NULL, &pNv->transfer); nouveau_bo_ref(NULL, &pNv->scanout); return TRUE; } static void NVLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int c; int i, j, index; CARD16 lut_r[256], lut_g[256], lut_b[256]; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; /* code borrowed from intel driver */ switch (pScrn->depth) { case 15: for (i = 0; i < numColors; i++) { index = indices[i]; for (j = 0; j < 8; j++) { lut_r[index * 8 + j] = colors[index].red << 8; lut_g[index * 8 + j] = colors[index].green << 8; lut_b[index * 8 + j] = colors[index].blue << 8; } } break; case 16: for (i = 0; i < numColors; i++) { index = indices[i]; if (i <= 31) { for (j = 0; j < 8; j++) { lut_r[index * 8 + j] = colors[index].red << 8; lut_b[index * 8 + j] = colors[index].blue << 8; } } for (j = 0; j < 4; j++) { lut_g[index * 4 + j] = colors[index].green << 8; } } break; default: for (i = 0; i < numColors; i++) { index = indices[i]; lut_r[index] = colors[index].red << 8; lut_g[index] = colors[index].green << 8; lut_b[index] = colors[index].blue << 8; } break; } if (crtc->randr_crtc) /* Make the change through RandR */ RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b); } } /* Mandatory */ /* This gets called at the start of each server generation */ static Bool NVScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); int ret; VisualPtr visual; unsigned char *FBStart; int displayWidth; if (pNv->AccelMethod == EXA) { if (!NVAccelCommonInit(pScrn)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Error initialising acceleration. " "Falling back to NoAccel\n"); pNv->AccelMethod = NONE; pNv->ShadowFB = TRUE; pNv->wfb_enabled = FALSE; pNv->tiled_scanout = FALSE; pScrn->capabilities &= ~(RR_Capability_SourceOutput | RR_Capability_SourceOffload | RR_Capability_SinkOutput); pScrn->displayWidth = nv_pitch_align(pNv, pScrn->virtualX, pScrn->depth); } } nouveau_copy_init(pScreen); /* Allocate and map memory areas we need */ if (!NVMapMem(pScrn)) return FALSE; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; /* need to point to new screen on server regeneration */ for (i = 0; i < xf86_config->num_crtc; i++) xf86_config->crtc[i]->scrn = pScrn; for (i = 0; i < xf86_config->num_output; i++) xf86_config->output[i]->scrn = pScrn; /* * The next step is to setup the screen's visuals, and initialise the * framebuffer code. In cases where the framebuffer's default * choices for things like visual layouts and bits per RGB are OK, * this may be as simple as calling the framebuffer's ScreenInit() * function. If not, the visuals will need to be setup before calling * a fb ScreenInit() function and fixed up after. * * For most PC hardware at depths >= 8, the defaults that fb uses * are not appropriate. In this driver, we fixup the visuals after. */ /* * Reset the visual list. */ miClearVisualTypes(); /* Setup the visuals we support. */ if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; if (!miSetPixmapDepths ()) return FALSE; /* * Call the framebuffer layer's ScreenInit function, and fill in other * pScreen fields. */ if (pNv->ShadowFB) { pNv->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * pScrn->virtualX); pNv->ShadowPtr = malloc(pNv->ShadowPitch * pScrn->virtualY); displayWidth = pNv->ShadowPitch / (pScrn->bitsPerPixel >> 3); FBStart = pNv->ShadowPtr; } else if (pNv->AccelMethod <= NONE) { pNv->ShadowPtr = NULL; displayWidth = pScrn->displayWidth; nouveau_bo_map(pNv->scanout, NOUVEAU_BO_RDWR, pNv->client); FBStart = pNv->scanout->map; } else { pNv->ShadowPtr = NULL; displayWidth = pScrn->displayWidth; FBStart = NULL; } switch (pScrn->bitsPerPixel) { case 16: case 32: if (pNv->wfb_enabled) { ret = wfbScreenInit(pScreen, FBStart, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, displayWidth, pScrn->bitsPerPixel, nouveau_wfb_setup_wrap, nouveau_wfb_finish_wrap); } else { ret = fbScreenInit(pScreen, FBStart, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, displayWidth, pScrn->bitsPerPixel); } break; default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) in NVScreenInit\n", pScrn->bitsPerPixel); ret = FALSE; break; } if (!ret) return FALSE; /* Fixup RGB ordering */ visual = pScreen->visuals + pScreen->numVisuals; while (--visual >= pScreen->visuals) { if ((visual->class | DynamicClass) == DirectColor) { visual->offsetRed = pScrn->offset.red; visual->offsetGreen = pScrn->offset.green; visual->offsetBlue = pScrn->offset.blue; visual->redMask = pScrn->mask.red; visual->greenMask = pScrn->mask.green; visual->blueMask = pScrn->mask.blue; } } if (pNv->wfb_enabled) wfbPictureInit (pScreen, 0, 0); else fbPictureInit (pScreen, 0, 0); xf86SetBlackWhitePixels(pScreen); if (pNv->AccelMethod == EXA && nouveau_present_init(pScreen)) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Hardware support for Present enabled\n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Hardware support for Present disabled\n"); nouveau_sync_init(pScreen); nouveau_dri2_init(pScreen); if (pNv->AccelMethod == EXA) { if (pNv->max_dri_level >= 3 && !nouveau_dri3_screen_init(pScreen)) return FALSE; if (!nouveau_exa_init(pScreen)) return FALSE; } xf86SetBackingStore(pScreen); xf86SetSilkenMouse(pScreen); /* * Initialize software cursor. * Must precede creation of the default colormap. */ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); /* * Initialize HW cursor layer. * Must follow software cursor initialization. */ if (xf86_config->num_crtc && pNv->HWCursor) { ret = drmmode_cursor_init(pScreen); if (ret != TRUE) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Hardware cursor initialization failed\n"); pNv->HWCursor = FALSE; } } if (pNv->ShadowFB) ShadowFBInit(pScreen, NVRefreshArea); pScrn->fbOffset = 0; NVInitVideo(pScreen); /* Wrap the block handler here, if we do it after the EnterVT we * can end up in the unfortunate case where we've wrapped the * xf86RotateBlockHandler which sometimes is not expecting to * be in the wrap chain and calls a NULL pointer... */ pNv->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = NVBlockHandler; if (!AddCallback(&FlushCallback, NVFlushCallback, pScrn)) return FALSE; pScrn->vtSema = TRUE; pScrn->pScreen = pScreen; xf86DPMSInit(pScreen, xf86DPMSSet, 0); /* Wrap the current CloseScreen function */ pScreen->SaveScreen = NVSaveScreen; pNv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = NVCloseScreen; pNv->CreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = NVCreateScreenResources; #ifdef NOUVEAU_PIXMAP_SHARING pScreen->StartPixmapTracking = PixmapStartDirtyTracking; pScreen->StopPixmapTracking = PixmapStopDirtyTracking; #endif if (!xf86CrtcScreenInit(pScreen)) return FALSE; /* Initialise default colourmap */ if (!miCreateDefColormap(pScreen)) return FALSE; /* * Initialize colormap layer. * Must follow initialization of the default colormap. * X-Server < 1.20 mishandles > 256 slots / > 8 bpc color maps, so skip * color map setup on old servers at > 8 bpc. Gamma luts still work. */ if (xf86_config->num_crtc && (pScrn->rgbBits <= 8 || XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,20,0,0,0)) && !xf86HandleColormaps(pScreen, 1 << pScrn->rgbBits, pScrn->rgbBits, NVLoadPalette, NULL, CMAP_PALETTED_TRUECOLOR)) return FALSE; /* Report any unused options (only for the first generation) */ if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); if (xf86_config->num_crtc) drmmode_screen_init(pScreen); else pNv->glx_vblank = FALSE; return TRUE; } static Bool NVSaveScreen(ScreenPtr pScreen, int mode) { return TRUE; } xf86-video-nouveau-1.0.18/src/nv30_xv_tex.c0000644000175000017500000002775714713424663014013 /* * Copyright 2007-2008 Maarten Maathuis * Copyright 2008 Stephane Marchesin * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" #include "hwdefs/nv30-40_3d.xml.h" #include "nv04_accel.h" extern Atom xvSyncToVBlank, xvSetDefaults; #define SWIZZLE(ts0x,ts0y,ts0z,ts0w,ts1x,ts1y,ts1z,ts1w) \ ( \ NV30_3D_TEX_SWIZZLE_S0_X_##ts0x | NV30_3D_TEX_SWIZZLE_S0_Y_##ts0y | \ NV30_3D_TEX_SWIZZLE_S0_Z_##ts0z | NV30_3D_TEX_SWIZZLE_S0_W_##ts0w | \ NV30_3D_TEX_SWIZZLE_S1_X_##ts1x | NV30_3D_TEX_SWIZZLE_S1_Y_##ts1y | \ NV30_3D_TEX_SWIZZLE_S1_Z_##ts1z | NV30_3D_TEX_SWIZZLE_S1_W_##ts1w \ ) /* * Texture 0 : filter table * Texture 1 : Y data * Texture 2 : UV data */ static Bool NV30VideoTexture(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, uint16_t width, uint16_t height, uint16_t src_pitch, int unit) { NVPtr pNv = NVPTR(pScrn); unsigned reloc = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD; struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t card_fmt = 0; uint32_t card_swz = 0; int h = log2i(height); int w = log2i(width); switch (unit) { case 0: card_fmt = NV30_3D_TEX_FORMAT_FORMAT_A8R8G8B8; card_swz = SWIZZLE(S1, S1, S1, S1, X, Y, Z, W); break; case 1: card_fmt = NV30_3D_TEX_FORMAT_FORMAT_I8_RECT; card_swz = SWIZZLE(S1, S1, S1, S1, X, X, X, X); break; case 2: card_fmt = NV30_3D_TEX_FORMAT_FORMAT_A8L8_RECT; #if X_BYTE_ORDER == X_BIG_ENDIAN card_swz = SWIZZLE(S1, S1, S1, S1, Z, W, X, Y); #else card_swz = SWIZZLE(S1, S1, S1, S1, W, Z, Y, X); #endif break; } BEGIN_NV04(push, NV30_3D(TEX_OFFSET(unit)), 8); PUSH_MTHDl(push, NV30_3D(TEX_OFFSET(unit)), src, offset, reloc); if (unit == 0) { PUSH_MTHD (push, NV30_3D(TEX_FORMAT(unit)), src, NV30_3D_TEX_FORMAT_DIMS_1D | card_fmt | (1 << 16) | 8 /* no idea */ | (w << NV30_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT) | (h << NV30_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT), reloc | NOUVEAU_BO_OR, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); PUSH_DATA (push, NV30_3D_TEX_WRAP_S_REPEAT | NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE); } else { PUSH_MTHD (push, NV30_3D(TEX_FORMAT(unit)), src, NV30_3D_TEX_FORMAT_DIMS_2D | card_fmt | (1 << 16) | 8 /* no idea */ | (w << NV30_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT) | (h << NV30_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT), reloc | NOUVEAU_BO_OR, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); PUSH_DATA (push, NV30_3D_TEX_WRAP_S_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE); } PUSH_DATA (push, NV30_3D_TEX_ENABLE_ENABLE); PUSH_DATA (push, (src_pitch << NV30_3D_TEX_SWIZZLE_RECT_PITCH__SHIFT) | card_swz); if (unit == 0) PUSH_DATA (push, NV30_3D_TEX_FILTER_SIGNED_ALPHA | NV30_3D_TEX_FILTER_SIGNED_RED | NV30_3D_TEX_FILTER_SIGNED_GREEN | NV30_3D_TEX_FILTER_SIGNED_BLUE | NV30_3D_TEX_FILTER_MIN_LINEAR | NV30_3D_TEX_FILTER_MAG_LINEAR | 0x2000); else PUSH_DATA (push, NV30_3D_TEX_FILTER_MIN_LINEAR | NV30_3D_TEX_FILTER_MAG_LINEAR | 0x2000); PUSH_DATA (push, (width << NV30_3D_TEX_NPOT_SIZE_W__SHIFT) | height); PUSH_DATA (push, 0); /* border ARGB */ BEGIN_NV04(push, NV30_3D(TEX_MATRIX_ENABLE(unit)), 1); PUSH_DATA (push, 0); return TRUE; } static Bool NV30GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) { switch (ppix->drawable.bitsPerPixel) { case 32: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_A8R8G8B8; break; case 24: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_X8R8G8B8; break; case 16: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_R5G6B5; break; case 8: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_B8; break; default: return FALSE; } return TRUE; } void NV30StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) { } #define VERTEX_OUT(sx,sy,dx,dy) do { \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2F_X(8)), 4); \ PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy)); \ PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0); \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); \ PUSH_DATA (push, (((dy)&0xffff)<<16)|((dx)&0xffff)); \ } while(0) int NV30PutTextureImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset, int src_offset2, int id, int src_pitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, uint16_t width, uint16_t height, uint16_t src_w, uint16_t src_h, uint16_t drw_w, uint16_t drw_h, RegionPtr clipBoxes, PixmapPtr ppix, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); Bool bicubic = pPriv->bicubic; float X1, X2, Y1, Y2; BoxPtr pbox; int nbox; int dst_format = 0; if (drw_w > 4096 || drw_h > 4096) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "XV: Draw size too large.\n"); return BadAlloc; } if (!NV30GetSurfaceFormat(ppix, &dst_format)) { ErrorF("No surface format, bad.\n"); return BadImplementation; } pbox = REGION_RECTS(clipBoxes); nbox = REGION_NUM_RECTS(clipBoxes); if (!PUSH_SPACE(push, 128)) return FALSE; PUSH_RESET(push); BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(RT_FORMAT), 3); PUSH_DATA (push, NV30_3D_RT_FORMAT_TYPE_LINEAR | NV30_3D_RT_FORMAT_ZETA_Z24S8 | dst_format); PUSH_DATA (push, (exaGetPixmapPitch(ppix) << 16) | exaGetPixmapPitch(ppix)); PUSH_MTHDl(push, NV30_3D(COLOR0_OFFSET), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); if (pNv->dev->chipset == 0x30) { int x = 0; int y = 0; int w = ppix->drawable.x + ppix->drawable.width; int h = ppix->drawable.y + ppix->drawable.height; BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2); PUSH_DATA (push, (w<<16)|x); PUSH_DATA (push, (h<<16)|y); BEGIN_NV04(push, NV30_3D(VIEWPORT_CLIP_HORIZ(0)), 2); PUSH_DATA (push, (w-1+x)<<16); PUSH_DATA (push, (h-1+y)<<16); BEGIN_NV04(push, NV30_3D(VIEWPORT_TX_ORIGIN), 1); PUSH_DATA (push, (y<<16)|x); } BEGIN_NV04(push, NV30_3D(TEX_UNITS_ENABLE), 1); PUSH_DATA (push, NV30_3D_TEX_UNITS_ENABLE_TX0 | NV30_3D_TEX_UNITS_ENABLE_TX1); if (!NV30VideoTexture(pScrn, pNv->scratch, XV_TABLE, XV_TABLE_SIZE, 1, 0, 0) || !NV30VideoTexture(pScrn, src, src_offset, src_w, src_h, src_pitch, 1)) return BadImplementation; /* We've got NV12 format, which means half width and half height * texture of chroma channels. */ if (!NV30VideoTexture(pScrn, src, src_offset2, src_w/2, src_h/2, src_pitch, 2)) { PUSH_RESET(push); return BadImplementation; } BEGIN_NV04(push, NV30_3D(TEX_ENABLE(3)), 1); PUSH_DATA (push, 0x0); if (drw_w / 2 < src_w || drw_h / 2 < src_h) bicubic = FALSE; BEGIN_NV04(push, NV30_3D(FP_ACTIVE_PROGRAM), 1); PUSH_MTHD (push, NV30_3D(FP_ACTIVE_PROGRAM), pNv->scratch, bicubic ? PFP_NV12_BICUBIC : PFP_NV12_BILINEAR, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR, NV30_3D_FP_ACTIVE_PROGRAM_DMA0, NV30_3D_FP_ACTIVE_PROGRAM_DMA1); BEGIN_NV04(push, NV30_3D(FP_REG_CONTROL), 1); PUSH_DATA (push, 0x0001000f); BEGIN_NV04(push, NV30_3D(FP_CONTROL), 1); PUSH_DATA (push, 0x00000001); BEGIN_NV04(push, NV30_3D(RC_ENABLE), 1); PUSH_DATA (push, 0x00000000); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return BadAlloc; } /* Before rendering we wait for vblank in the non-composited case. */ if (pPriv->SyncToVBlank) NV11SyncToVBlank(ppix, dstBox); /* These are fixed point values in the 16.16 format. */ X1 = (float)(x1>>16)+(float)(x1&0xFFFF)/(float)0x10000; Y1 = (float)(y1>>16)+(float)(y1&0xFFFF)/(float)0x10000; X2 = (float)(x2>>16)+(float)(x2&0xFFFF)/(float)0x10000; Y2 = (float)(y2>>16)+(float)(y2&0xFFFF)/(float)0x10000; BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_TRIANGLES); while (nbox--) { float tx1=X1+(float)(pbox->x1 - dstBox->x1)*(X2-X1)/(float)(drw_w); float tx2=X1+(float)(pbox->x2 - dstBox->x1)*(src_w)/(float)(drw_w); float ty1=Y1+(float)(pbox->y1 - dstBox->y1)*(Y2-Y1)/(float)(drw_h); float ty2=Y1+(float)(pbox->y2 - dstBox->y1)*(src_h)/(float)(drw_h); int sx1=pbox->x1; int sx2=pbox->x2; int sy1=pbox->y1; int sy2=pbox->y2; if (!PUSH_SPACE(push, 64)) { nouveau_pushbuf_bufctx(push, NULL); return BadImplementation; } BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, (sx2 << 16) | 0); PUSH_DATA (push, (sy2 << 16) | 0); VERTEX_OUT(tx1, ty1, sx1, sy1); VERTEX_OUT(tx2+(tx2-tx1), ty1, sx2+(sx2-sx1), sy1); VERTEX_OUT(tx1, ty2+(ty2-ty1), sx1, sy2+(sy2-sy1)); pbox++; } BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_STOP); if (pNv->dev->chipset == 0x30) { BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2); PUSH_DATA (push, 4096 << 16); PUSH_DATA (push, 4096 << 16); BEGIN_NV04(push, NV30_3D(VIEWPORT_CLIP_HORIZ(0)), 2); PUSH_DATA (push, 4095 << 16); PUSH_DATA (push, 4095 << 16); BEGIN_NV04(push, NV30_3D(VIEWPORT_TX_ORIGIN), 1); PUSH_DATA (push, 0); } nouveau_pushbuf_bufctx(push, NULL); PUSH_KICK(push); return Success; } /** * NV30SetTexturePortAttribute * sets the attribute "attribute" of port "data" to value "value" * supported attributes: * Sync to vblank. * * @param pScrenInfo * @param attribute attribute to set * @param value value to which attribute is to be set * @param data port from which the attribute is to be set * * @return Success, if setting is successful * BadValue/BadMatch, if value/attribute are invalid */ int NV30SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvSyncToVBlank) { if ((value < 0) || (value > 1)) return BadValue; pPriv->SyncToVBlank = value; } else if (attribute == xvSetDefaults) { pPriv->SyncToVBlank = TRUE; } else return BadMatch; return Success; } /** * NV30GetTexturePortAttribute * reads the value of attribute "attribute" from port "data" into INT32 "*value" * Sync to vblank. * * @param pScrn unused * @param attribute attribute to be read * @param value value of attribute will be stored here * @param data port from which attribute will be read * @return Success, if queried attribute exists */ int NV30GetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if(attribute == xvSyncToVBlank) *value = (pPriv->SyncToVBlank) ? 1 : 0; else return BadMatch; return Success; } xf86-video-nouveau-1.0.18/src/nouveau_copya0b5.c0000644000175000017500000000632114713424663014774 /* * Copyright 2014 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Ben Skeggs */ #include "nouveau_copy.h" #include "hwdefs/nv_object.xml.h" #include "nvc0_accel.h" Bool nouveau_copya0b5_rect(struct nouveau_pushbuf *push, struct nouveau_object *copy, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; unsigned exec; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; exec = 0x00000206; if (!src->config.nvc0.memtype) { src_off += src_y * src_pitch + src_x * cpp; exec |= 0x00000080; } if (!dst->config.nvc0.memtype) { dst_off += dst_y * dst_pitch + dst_x * cpp; exec |= 0x00000100; } BEGIN_NVC0(push, SUBC_COPY(0x0728), 6); PUSH_DATA (push, 0x00001000 | src->config.nvc0.tile_mode); PUSH_DATA (push, src_pitch); PUSH_DATA (push, src_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, (src_y << 16) | src_x * cpp); BEGIN_NVC0(push, SUBC_COPY(0x070c), 6); PUSH_DATA (push, 0x000001000 | dst->config.nvc0.tile_mode); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, dst_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, (dst_y << 16) | dst_x * cpp); BEGIN_NVC0(push, SUBC_COPY(0x0400), 8); PUSH_DATA (push, (src->offset + src_off) >> 32); PUSH_DATA (push, (src->offset + src_off)); PUSH_DATA (push, (dst->offset + dst_off) >> 32); PUSH_DATA (push, (dst->offset + dst_off)); PUSH_DATA (push, src_pitch); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, w * cpp); PUSH_DATA (push, h); BEGIN_NVC0(push, SUBC_COPY(0x0300), 1); PUSH_DATA (push, exec); return TRUE; } Bool nouveau_copya0b5_init(NVPtr pNv) { struct nouveau_pushbuf *push = pNv->ce_pushbuf; if (PUSH_SPACE(push, 8)) { BEGIN_NVC0(push, NV01_SUBC(COPY, OBJECT), 1); PUSH_DATA (push, pNv->NvCopy->handle); pNv->ce_rect = nouveau_copya0b5_rect; return TRUE; } return FALSE; } xf86-video-nouveau-1.0.18/src/nouveau_copy.c0000644000175000017500000000765514713424663014337 /* * Copyright 2014 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Ben Skeggs */ #include "nouveau_copy.h" void nouveau_copy_fini(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); nouveau_object_del(&pNv->NvCopy); nouveau_pushbuf_del(&pNv->ce_pushbuf); nouveau_object_del(&pNv->ce_channel); } Bool nouveau_copy_init(ScreenPtr pScreen) { static const struct { CARD32 oclass; int engine; Bool (*init)(NVPtr); } methods[] = { { 0xc1b5, 0, nouveau_copya0b5_init }, { 0xc0b5, 0, nouveau_copya0b5_init }, { 0xb0b5, 0, nouveau_copya0b5_init }, { 0xa0b5, 0, nouveau_copya0b5_init }, { 0x90b8, 5, nouveau_copy90b5_init }, { 0x90b5, 4, nouveau_copy90b5_init }, { 0x85b5, 0, nouveau_copy85b5_init }, {} }, *method = methods; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); int ret; if (pNv->AccelMethod == NONE) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "[COPY] acceleration disabled\n"); return FALSE; } switch (pNv->Architecture) { case NV_TESLA: if (pNv->dev->chipset < 0xa3 || pNv->dev->chipset == 0xaa || pNv->dev->chipset == 0xac) return FALSE; ret = nouveau_object_new(&pNv->dev->object, 0, NOUVEAU_FIFO_CHANNEL_CLASS, &(struct nv04_fifo) { .vram = NvDmaFB, .gart = NvDmaTT, }, sizeof(struct nv04_fifo), &pNv->ce_channel); break; case NV_FERMI: ret = nouveau_object_new(&pNv->dev->object, 0, NOUVEAU_FIFO_CHANNEL_CLASS, &(struct nvc0_fifo) { }, sizeof(struct nvc0_fifo), &pNv->ce_channel); break; case NV_KEPLER: case NV_MAXWELL: case NV_PASCAL: ret = nouveau_object_new(&pNv->dev->object, 0, NOUVEAU_FIFO_CHANNEL_CLASS, &(struct nve0_fifo) { .engine = NVE0_FIFO_ENGINE_CE0 | NVE0_FIFO_ENGINE_CE1, }, sizeof(struct nve0_fifo), &pNv->ce_channel); break; default: return FALSE; } if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[COPY] error allocating channel: %d\n", ret); return FALSE; } ret = nouveau_pushbuf_new(pNv->client, pNv->ce_channel, 4, 32 * 1024, true, &pNv->ce_pushbuf); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[COPY] error allocating pushbuf: %d\n", ret); nouveau_copy_fini(pScreen); return FALSE; } while (method->init) { ret = nouveau_object_new(pNv->ce_channel, method->engine << 16 | method->oclass, method->oclass, NULL, 0, &pNv->NvCopy); if (ret == 0) { if (!method->init(pNv)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[COPY] failed to initialise.\n"); nouveau_copy_fini(pScreen); return FALSE; } break; } method++; } if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[COPY] failed to allocate class.\n"); nouveau_copy_fini(pScreen); return FALSE; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[COPY] async initialised.\n"); return TRUE; } xf86-video-nouveau-1.0.18/src/nv_type.h0000644000175000017500000001353014713424663013301 #ifndef __NV_STRUCT_H__ #define __NV_STRUCT_H__ #include "colormapst.h" #include "xf86Cursor.h" #include "exa.h" #include "xf86drm.h" #include #include #include "xf86Crtc.h" #if XF86_CRTC_VERSION >= 5 #define NOUVEAU_PIXMAP_SHARING 1 #endif #define NV_ARCH_03 0x03 #define NV_ARCH_04 0x04 #define NV_ARCH_10 0x10 #define NV_ARCH_20 0x20 #define NV_ARCH_30 0x30 #define NV_ARCH_40 0x40 #define NV_TESLA 0x50 #define NV_FERMI 0xc0 #define NV_KEPLER 0xe0 #define NV_MAXWELL 0x110 #define NV_PASCAL 0x130 struct xf86_platform_device; /* NV50 */ typedef struct _NVRec *NVPtr; typedef struct { int fd; unsigned long reinitGeneration; struct xf86_platform_device *platform_dev; unsigned int assigned_crtcs; unsigned long fd_wakeup_registered; int fd_wakeup_ref; } NVEntRec, *NVEntPtr; NVEntPtr NVEntPriv(ScrnInfoPtr pScrn); typedef struct _NVRec { uint32_t Architecture; EntityInfoPtr pEnt; struct pci_device *PciInfo; Bool Primary; Bool Secondary; struct nouveau_bo * scanout; enum { UNKNOWN = 0, NONE, EXA, } AccelMethod; void (*Flush)(ScrnInfoPtr); Bool HWCursor; Bool ShadowFB; unsigned char * ShadowPtr; int ShadowPitch; ExaDriverPtr EXADriverPtr; Bool exa_force_cp; Bool wfb_enabled; Bool tiled_scanout; Bool glx_vblank; Bool has_async_pageflip; Bool has_pageflip; int swap_limit; int max_swap_limit; int max_dri_level; ScreenBlockHandlerProcPtr BlockHandler; CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; void (*VideoTimerCallback)(ScrnInfoPtr, Time); XF86VideoAdaptorPtr overlayAdaptor; XF86VideoAdaptorPtr blitAdaptor; XF86VideoAdaptorPtr textureAdaptor[2]; int videoKey; OptionInfoPtr Options; Bool LockedUp; CARD32 currentRop; void *drmmode; /* for KMS */ /* DRM interface */ struct nouveau_device *dev; char *drm_device_name; /* GPU context */ struct nouveau_client *client; struct nouveau_bo *transfer; CARD32 transfer_offset; struct nouveau_object *channel; struct nouveau_pushbuf *pushbuf; struct nouveau_bufctx *bufctx; struct nouveau_object *notify0; struct nouveau_object *vblank_sem; struct nouveau_object *NvNull; struct nouveau_object *NvContextSurfaces; struct nouveau_object *NvContextBeta1; struct nouveau_object *NvContextBeta4; struct nouveau_object *NvImagePattern; struct nouveau_object *NvRop; struct nouveau_object *NvRectangle; struct nouveau_object *NvImageBlit; struct nouveau_object *NvScaledImage; struct nouveau_object *NvClipRectangle; struct nouveau_object *NvMemFormat; struct nouveau_object *NvImageFromCpu; struct nouveau_object *Nv2D; struct nouveau_object *Nv3D; struct nouveau_object *NvSW; struct nouveau_object *NvCOPY; struct nouveau_bo *scratch; Bool ce_enabled; struct nouveau_object *ce_channel; struct nouveau_pushbuf *ce_pushbuf; struct nouveau_object *NvCopy; Bool (*ce_rect)(struct nouveau_pushbuf *, struct nouveau_object *, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int, struct nouveau_bo *, uint32_t, int, int, int, int, int); /* SYNC extension private */ void *sync; /* Present extension private */ void *present; /* Acceleration context */ PixmapPtr pspix, pmpix, pdpix; PicturePtr pspict, pmpict; Pixel fg_colour; char *render_node; } NVRec; #define NVPTR(p) ((NVPtr)((p)->driverPrivate)) typedef struct _NVPortPrivRec { short brightness; short contrast; short saturation; short hue; RegionRec clip; CARD32 colorKey; Bool autopaintColorKey; Bool doubleBuffer; CARD32 videoStatus; int currentBuffer; Time videoTime; int overlayCRTC; Bool grabbedByV4L; Bool iturbt_709; Bool blitter; Bool texture; Bool bicubic; /* only for texture adapter */ Bool SyncToVBlank; int max_image_dim; struct nouveau_bo *video_mem; int pitch; int offset; struct nouveau_bo *TT_mem_chunk[2]; int currentHostBuffer; } NVPortPrivRec, *NVPortPrivPtr; #define GET_OVERLAY_PRIVATE(pNv) \ (NVPortPrivPtr)((pNv)->overlayAdaptor->pPortPrivates[0].ptr) #define GET_BLIT_PRIVATE(pNv) \ (NVPortPrivPtr)((pNv)->blitAdaptor->pPortPrivates[0].ptr) #define OFF_TIMER 0x01 #define FREE_TIMER 0x02 #define CLIENT_VIDEO_ON 0x04 #define OFF_DELAY 500 /* milliseconds */ #define FREE_DELAY 5000 #define TIMER_MASK (OFF_TIMER | FREE_TIMER) /* EXA driver-controlled pixmaps */ #define NOUVEAU_CREATE_PIXMAP_ZETA 0x10000000 #define NOUVEAU_CREATE_PIXMAP_TILED 0x20000000 #define NOUVEAU_CREATE_PIXMAP_SCANOUT 0x40000000 struct nouveau_pixmap { struct nouveau_bo *bo; Bool shared; }; static inline struct nouveau_pixmap * nouveau_pixmap(PixmapPtr ppix) { return (struct nouveau_pixmap *)exaGetPixmapDriverPrivate(ppix); } static inline struct nouveau_bo * nouveau_pixmap_bo(PixmapPtr ppix) { struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix); return nvpix ? nvpix->bo : NULL; } static inline uint32_t nv_pitch_align(NVPtr pNv, uint32_t width, int bpp) { int mask; if (bpp == 15) bpp = 16; if (bpp == 24 || bpp == 30) bpp = 8; /* Alignment requirements taken from the Haiku driver */ if (pNv->Architecture == NV_ARCH_04) mask = 128 / bpp - 1; else mask = 512 / bpp - 1; return (width + mask) & ~mask; } /* nv04 cursor max dimensions of 32x32 (A1R5G5B5) */ #define NV04_CURSOR_SIZE 32 /* limit nv10 cursors to 64x64 (ARGB8) (we could go to 64x255) */ #define NV10_CURSOR_SIZE 64 static inline int nv_cursor_width(NVPtr pNv) { return pNv->dev->chipset >= 0x10 ? NV10_CURSOR_SIZE : NV04_CURSOR_SIZE; } #define xFixedToFloat(v) \ ((float)xFixedToInt((v)) + ((float)xFixedFrac(v) / 65536.0)) #endif /* __NV_STRUCT_H__ */ xf86-video-nouveau-1.0.18/src/nouveau_dri2.c0000644000175000017500000007341314713424663014220 #include #include #include #include #include "xorg-server.h" #include "nv_include.h" #ifdef DRI2 #include "dri2.h" #else #error "This driver requires a DRI2-enabled X server" #endif #ifdef DRI3 #include "dri3.h" #endif #include "xf86drmMode.h" struct nouveau_dri2_buffer { DRI2BufferRec base; PixmapPtr ppix; }; static inline struct nouveau_dri2_buffer * nouveau_dri2_buffer(DRI2BufferPtr buf) { return (struct nouveau_dri2_buffer *)buf; } static PixmapPtr get_drawable_pixmap(DrawablePtr drawable) { if (drawable->type == DRAWABLE_PIXMAP) return (PixmapPtr)drawable; else return (*drawable->pScreen->GetWindowPixmap)((WindowPtr)drawable); } static DRI2BufferPtr nouveau_dri2_create_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, unsigned int attachment, unsigned int format) { NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen)); struct nouveau_dri2_buffer *nvbuf; struct nouveau_pixmap *nvpix; PixmapPtr ppix = NULL; nvbuf = calloc(1, sizeof(*nvbuf)); if (!nvbuf) return NULL; if (attachment == DRI2BufferFrontLeft) { ppix = get_drawable_pixmap(pDraw); if (pScreen != ppix->drawable.pScreen) ppix = NULL; if (pDraw->type == DRAWABLE_WINDOW) { #if DRI2INFOREC_VERSION >= 6 /* Set initial swap limit on drawable. */ DRI2SwapLimit(pDraw, pNv->swap_limit); #endif } if (ppix) ppix->refcnt++; } else { int bpp; unsigned int usage_hint = 0; if (pNv->Architecture >= NV_ARCH_10) usage_hint |= NOUVEAU_CREATE_PIXMAP_TILED; /* 'format' is just depth (or 0, or maybe it depends on the caller) */ bpp = round_up_pow2(format ? format : pDraw->depth); if (attachment == DRI2BufferDepth || attachment == DRI2BufferDepthStencil) usage_hint |= NOUVEAU_CREATE_PIXMAP_ZETA; else usage_hint |= NOUVEAU_CREATE_PIXMAP_SCANOUT; ppix = pScreen->CreatePixmap(pScreen, pDraw->width, pDraw->height, bpp, usage_hint); } if (ppix) { pNv->exa_force_cp = TRUE; exaMoveInPixmap(ppix); pNv->exa_force_cp = FALSE; nvbuf->base.pitch = ppix->devKind; nvbuf->base.cpp = ppix->drawable.bitsPerPixel / 8; } nvbuf->base.attachment = attachment; nvbuf->base.driverPrivate = nvbuf; nvbuf->base.format = format; nvbuf->base.flags = 0; nvbuf->ppix = ppix; if (ppix) { nvpix = nouveau_pixmap(ppix); if (!nvpix || !nvpix->bo || nouveau_bo_name_get(nvpix->bo, &nvbuf->base.name)) { dixDestroyPixmap(nvbuf->ppix, 0); free(nvbuf); return NULL; } } return &nvbuf->base; } static DRI2BufferPtr nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int format) { return nouveau_dri2_create_buffer2(pDraw->pScreen, pDraw, attachment, format); } static void nouveau_dri2_destroy_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, DRI2BufferPtr buf) { struct nouveau_dri2_buffer *nvbuf; nvbuf = nouveau_dri2_buffer(buf); if (!nvbuf) return; if (nvbuf->ppix) dixDestroyPixmap(nvbuf->ppix, 0); free(nvbuf); } static void nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf) { nouveau_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf); } static void nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer) { struct nouveau_dri2_buffer *src = nouveau_dri2_buffer(pSrcBuffer); struct nouveau_dri2_buffer *dst = nouveau_dri2_buffer(pDstBuffer); NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen)); RegionPtr pCopyClip; GCPtr pGC; DrawablePtr src_draw, dst_draw; Bool translate = FALSE; int off_x = 0, off_y = 0; src_draw = &src->ppix->drawable; dst_draw = &dst->ppix->drawable; #if 0 ErrorF("attachments src %d, dst %d, drawable %p %p pDraw %p\n", src->base.attachment, dst->base.attachment, src_draw, dst_draw, pDraw); #endif if (src->base.attachment == DRI2BufferFrontLeft) src_draw = pDraw; if (dst->base.attachment == DRI2BufferFrontLeft) { #ifdef NOUVEAU_PIXMAP_SHARING if (pDraw->pScreen != pScreen) { dst_draw = DRI2UpdatePrime(pDraw, pDstBuffer); if (!dst_draw) return; } else #endif dst_draw = pDraw; if (dst_draw != pDraw) translate = TRUE; } if (translate && pDraw->type == DRAWABLE_WINDOW) { #ifdef COMPOSITE PixmapPtr pPix = get_drawable_pixmap(pDraw); off_x = -pPix->screen_x; off_y = -pPix->screen_y; #endif off_x += pDraw->x; off_y += pDraw->y; } pGC = GetScratchGC(pDraw->depth, pScreen); pCopyClip = REGION_CREATE(pScreen, NULL, 0); REGION_COPY(pScreen, pCopyClip, pRegion); if (translate) { REGION_TRANSLATE(pScreen, pCopyClip, off_x, off_y); } pGC->funcs->ChangeClip(pGC, CT_REGION, pCopyClip, 0); ValidateGC(dst_draw, pGC); /* If this is a full buffer swap or frontbuffer flush, throttle on * the previous one. */ if (dst->base.attachment == DRI2BufferFrontLeft && REGION_NUM_RECTS(pRegion) == 1) { BoxPtr extents = REGION_EXTENTS(pScreen, pRegion); if (extents->x1 == 0 && extents->y1 == 0 && extents->x2 == pDraw->width && extents->y2 == pDraw->height) { PixmapPtr fpix = get_drawable_pixmap(dst_draw); struct nouveau_bo *bo = nouveau_pixmap_bo(fpix); if (bo) nouveau_bo_wait(bo, NOUVEAU_BO_RD, pNv->client); } } pGC->ops->CopyArea(src_draw, dst_draw, pGC, 0, 0, pDraw->width, pDraw->height, off_x, off_y); FreeScratchGC(pGC); } static void nouveau_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer) { return nouveau_dri2_copy_region2(pDraw->pScreen, pDraw, pRegion, pDstBuffer, pSrcBuffer); } struct nouveau_dri2_vblank_state { enum { SWAP, BLIT, WAIT } action; ClientPtr client; XID draw; DRI2BufferPtr dst; DRI2BufferPtr src; DRI2SwapEventPtr func; void *data; unsigned int frame; }; struct dri2_vblank { struct nouveau_dri2_vblank_state *s; }; static uint64_t dri2_sequence; static Bool update_front(DrawablePtr draw, DRI2BufferPtr front) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); struct nouveau_dri2_buffer *nvbuf = nouveau_dri2_buffer(front); struct nouveau_bo *pixmap_bo; PixmapPtr pixmap; int r; if (draw->type == DRAWABLE_PIXMAP) pixmap = (PixmapPtr)draw; else pixmap = (*draw->pScreen->GetWindowPixmap)((WindowPtr)draw); pixmap->refcnt++; pNv->exa_force_cp = TRUE; exaMoveInPixmap(pixmap); pNv->exa_force_cp = FALSE; pixmap_bo = nouveau_pixmap_bo(pixmap); if (!pixmap_bo) r = -1; else r = nouveau_bo_name_get(pixmap_bo, &front->name); if (r) { dixDestroyPixmap(pixmap, 0); return FALSE; } if (nvbuf->ppix) dixDestroyPixmap(nvbuf->ppix, 0); front->pitch = pixmap->devKind; front->cpp = pixmap->drawable.bitsPerPixel / 8; nvbuf->ppix = pixmap; return TRUE; } static Bool can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); NVPtr pNv = NVPTR(scrn); int i, active_crtc_count = 0; if (!xf86_config->num_crtc) return FALSE; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (xf86_crtc_on(crtc)) { if (crtc->rotatedData) return FALSE; active_crtc_count++; } } return ((DRI2CanFlip(draw) && pNv->has_pageflip)) && dst_pix->drawable.width == src_pix->drawable.width && dst_pix->drawable.height == src_pix->drawable.height && dst_pix->drawable.bitsPerPixel == src_pix->drawable.bitsPerPixel && dst_pix->devKind == src_pix->devKind && active_crtc_count; } static Bool can_sync_to_vblank(DrawablePtr draw) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); return pNv->glx_vblank && nv_window_belongs_to_crtc(scrn, draw->x, draw->y, draw->width, draw->height); } #if DRI2INFOREC_VERSION >= 6 static Bool nouveau_dri2_swap_limit_validate(DrawablePtr draw, int swap_limit) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); if ((swap_limit < 1 ) || (swap_limit > pNv->max_swap_limit)) return FALSE; return TRUE; } #endif /* Shall we intentionally violate the OML_sync_control spec to * get some sort of triple-buffering behaviour on a pre 1.12.0 * x-server? */ static Bool violate_oml(DrawablePtr draw) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); return (DRI2INFOREC_VERSION < 6) && (pNv->swap_limit > 1); } typedef struct { int fd; unsigned old_fb_id; int flip_count; void *event_data; unsigned int fe_msc; uint64_t fe_ust; } dri2_flipdata_rec, *dri2_flipdata_ptr; typedef struct { dri2_flipdata_ptr flipdata; Bool dispatch_me; } dri2_flipevtcarrier_rec, *dri2_flipevtcarrier_ptr; static void nouveau_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { struct nouveau_dri2_vblank_state *flip = event_data; DrawablePtr draw; ScreenPtr screen; ScrnInfoPtr scrn; int status; status = dixLookupDrawable(&draw, flip->draw, serverClient, M_ANY, DixWriteAccess); if (status != Success) { free(flip); return; } screen = draw->pScreen; scrn = xf86ScreenToScrn(screen); /* We assume our flips arrive in order, so we don't check the frame */ switch (flip->action) { case SWAP: /* Check for too small vblank count of pageflip completion, * taking wraparound into account. This usually means some * defective kms pageflip completion, causing wrong (msc, ust) * return values and possible visual corruption. * Skip test for frame == 0, as this is a valid constant value * reported by all Linux kernels at least up to Linux 3.0. */ if ((frame != 0) && (frame < flip->frame) && (flip->frame - frame < 5)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Pageflip has impossible msc %d < target_msc %d\n", __func__, frame, flip->frame); /* All-Zero values signal failure of (msc, ust) * timestamping to client. */ frame = tv_sec = tv_usec = 0; } DRI2SwapComplete(flip->client, draw, frame, tv_sec, tv_usec, DRI2_FLIP_COMPLETE, flip->func, flip->data); break; default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event received\n", __func__); /* Unknown type */ break; } free(flip); } static void nouveau_dri2_flip_handler(void *priv, uint64_t name, uint64_t ust, uint32_t msc) { dri2_flipevtcarrier_ptr flipcarrier = priv; dri2_flipdata_ptr flipdata = flipcarrier->flipdata; /* Is this the event whose info shall be delivered to higher level? */ if (flipcarrier->dispatch_me) { /* Yes: Cache msc, ust for later delivery. */ flipdata->fe_msc = msc; flipdata->fe_ust = ust; } /* Last crtc completed flip? */ flipdata->flip_count--; if (flipdata->flip_count > 0) return; /* Release framebuffer */ drmModeRmFB(flipdata->fd, flipdata->old_fb_id); if (flipdata->event_data == NULL) { free(flipdata); return; } /* Deliver cached msc, ust from reference crtc to flip event handler */ nouveau_dri2_flip_event_handler(flipdata->fe_msc, flipdata->fe_ust / 1000000, flipdata->fe_ust % 1000000, flipdata->event_data); free(flipdata); } static Bool dri2_page_flip(DrawablePtr draw, PixmapPtr back, void *priv, xf86CrtcPtr ref_crtc) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); NVPtr pNv = NVPTR(scrn); uint32_t next_fb; int emitted = 0; int ret, i; dri2_flipdata_ptr flipdata; dri2_flipevtcarrier_ptr flipcarrier; ret = drmModeAddFB(pNv->dev->fd, scrn->virtualX, scrn->virtualY, scrn->depth, scrn->bitsPerPixel, scrn->displayWidth * scrn->bitsPerPixel / 8, nouveau_pixmap(back)->bo->handle, &next_fb); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "add fb failed: %s\n", strerror(errno)); return FALSE; } flipdata = calloc(1, sizeof(dri2_flipdata_rec)); if (!flipdata) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue: data alloc failed.\n"); goto error_undo; } flipdata->event_data = priv; flipdata->fd = pNv->dev->fd; for (i = 0; i < config->num_crtc; i++) { int head = drmmode_crtc(config->crtc[i]); void *token; if (!xf86_crtc_on(config->crtc[i])) continue; flipdata->flip_count++; flipcarrier = drmmode_event_queue(scrn, ++dri2_sequence, sizeof(*flipcarrier), nouveau_dri2_flip_handler, &token); if (!flipcarrier) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue: carrier alloc failed.\n"); if (emitted == 0) free(flipdata); goto error_undo; } /* Only the reference crtc will finally deliver its page flip * completion event. All other crtc's events will be discarded. */ flipcarrier->dispatch_me = (config->crtc[i] == ref_crtc); flipcarrier->flipdata = flipdata; ret = drmModePageFlip(pNv->dev->fd, head, next_fb, DRM_MODE_PAGE_FLIP_EVENT, token); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue failed: %s\n", strerror(errno)); drmmode_event_abort(scrn, dri2_sequence--, false); if (emitted == 0) free(flipdata); goto error_undo; } emitted++; } /* Will release old fb after all crtc's completed flip. */ drmmode_swap(scrn, next_fb, &flipdata->old_fb_id); return TRUE; error_undo: drmModeRmFB(pNv->dev->fd, next_fb); return FALSE; } static void nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, struct nouveau_dri2_vblank_state *s); static void nouveau_dri2_vblank_handler(void *priv, uint64_t name, uint64_t ust, uint32_t frame) { struct dri2_vblank *event = priv; struct nouveau_dri2_vblank_state *s = event->s; uint32_t tv_sec = ust / 1000000; uint32_t tv_usec = ust % 1000000; DrawablePtr draw; int ret; ret = dixLookupDrawable(&draw, s->draw, serverClient, M_ANY, DixWriteAccess); if (ret) { free(s); return; } switch (s->action) { case SWAP: nouveau_dri2_finish_swap(draw, frame, tv_sec, tv_usec, s); #if DRI2INFOREC_VERSION >= 6 /* Restore real swap limit on drawable, now that it is safe. */ ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); DRI2SwapLimit(draw, NVPTR(scrn)->swap_limit); #endif break; case WAIT: DRI2WaitMSCComplete(s->client, draw, frame, tv_sec, tv_usec); free(s); break; case BLIT: DRI2SwapComplete(s->client, draw, frame, tv_sec, tv_usec, DRI2_BLIT_COMPLETE, s->func, s->data); free(s); break; } } static int nouveau_wait_vblank(DrawablePtr draw, int type, CARD64 msc, CARD64 *pmsc, CARD64 *pust, void *data) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); xf86CrtcPtr crtc; drmVBlank vbl; struct dri2_vblank *event = NULL; void *token = NULL; int ret; int head; /* Select crtc which shows the largest part of the drawable */ crtc = nouveau_pick_best_crtc(scrn, draw->x, draw->y, draw->width, draw->height); if (!crtc) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Wait for VBlank failed: No valid crtc for drawable.\n"); return -EINVAL; } if (type & DRM_VBLANK_EVENT) { event = drmmode_event_queue(scrn, ++dri2_sequence, sizeof(*event), nouveau_dri2_vblank_handler, &token); if (!event) return -ENOMEM; event->s = data; } /* Map xf86CrtcPtr to drmWaitVBlank compatible display head index. */ head = drmmode_head(crtc); if (head == 1) type |= DRM_VBLANK_SECONDARY; else if (head > 1) #ifdef DRM_VBLANK_HIGH_CRTC_SHIFT type |= (head << DRM_VBLANK_HIGH_CRTC_SHIFT) & DRM_VBLANK_HIGH_CRTC_MASK; #else xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Wait for VBlank failed: Called for CRTC %d > 1, but " "DRM_VBLANK_HIGH_CRTC_SHIFT not defined at build time.\n", head); #endif vbl.request.type = type; vbl.request.sequence = msc; vbl.request.signal = (unsigned long)token; ret = drmWaitVBlank(pNv->dev->fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Wait for VBlank failed: %s\n", strerror(errno)); if (event) drmmode_event_abort(scrn, dri2_sequence--, false); return ret; } if (pmsc) *pmsc = vbl.reply.sequence; if (pust) *pust = (CARD64)vbl.reply.tval_sec * 1000000 + vbl.reply.tval_usec; return 0; } static void nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, struct nouveau_dri2_vblank_state *s) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); PixmapPtr dst_pix; PixmapPtr src_pix = nouveau_dri2_buffer(s->src)->ppix; struct nouveau_bo *dst_bo; struct nouveau_bo *src_bo = nouveau_pixmap_bo(src_pix); struct nouveau_pushbuf *push = pNv->pushbuf; RegionRec reg; int type, ret; Bool front_updated, will_exchange; xf86CrtcPtr ref_crtc; REGION_INIT(0, ®, (&(BoxRec){ 0, 0, draw->width, draw->height }), 0); REGION_TRANSLATE(0, ®, draw->x, draw->y); /* Main crtc for this drawable shall finally deliver pageflip event. */ ref_crtc = nouveau_pick_best_crtc(scrn, draw->x, draw->y, draw->width, draw->height); /* Update frontbuffer pixmap and name: Could have changed due to * window (un)redirection as part of compositing. */ front_updated = update_front(draw, s->dst); /* Assign frontbuffer pixmap, after update in update_front() */ dst_pix = nouveau_dri2_buffer(s->dst)->ppix; dst_bo = nouveau_pixmap_bo(dst_pix); /* Throttle on the previous frame before swapping */ nouveau_bo_wait(dst_bo, NOUVEAU_BO_RD, push->client); /* Swap by buffer exchange possible? */ will_exchange = front_updated && can_exchange(draw, dst_pix, src_pix); /* Only emit a wait for vblank pushbuf here if this is a copy-swap, or * if it is a kms pageflip-swap on an old kernel. Pure exchange swaps * don't need sync to vblank. kms pageflip-swaps on Linux 3.13+ are * synced to vblank in the kms driver, so we must not sync here, or * framerate will be cut in half! */ if (can_sync_to_vblank(draw) && (!will_exchange || (!pNv->has_async_pageflip && nouveau_exa_pixmap_is_onscreen(dst_pix)))) { /* Reference the back buffer to sync it to vblank */ nouveau_pushbuf_refn(push, &(struct nouveau_pushbuf_refn) { src_bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, 1); if (pNv->Architecture >= NV_FERMI) NVC0SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); else if (pNv->Architecture >= NV_TESLA) NV50SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); else NV11SyncToVBlank(dst_pix, REGION_EXTENTS(0, ®)); nouveau_pushbuf_kick(push, push->channel); } if (will_exchange) { type = DRI2_EXCHANGE_COMPLETE; DamageRegionAppend(draw, ®); if (nouveau_exa_pixmap_is_onscreen(dst_pix)) { type = DRI2_FLIP_COMPLETE; ret = dri2_page_flip(draw, src_pix, violate_oml(draw) ? NULL : s, ref_crtc); if (!ret) goto out; } SWAP(s->dst->name, s->src->name); SWAP(nouveau_pixmap(dst_pix)->bo, nouveau_pixmap(src_pix)->bo); DamageRegionProcessPending(draw); /* If it is a page flip, finish it in the flip event handler. */ if ((type == DRI2_FLIP_COMPLETE) && !violate_oml(draw)) return; } else { type = DRI2_BLIT_COMPLETE; /* Reference the front buffer to let throttling work * on occluded drawables. */ nouveau_pushbuf_refn(push, &(struct nouveau_pushbuf_refn) { dst_bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, 1); REGION_TRANSLATE(0, ®, -draw->x, -draw->y); nouveau_dri2_copy_region(draw, ®, s->dst, s->src); if (can_sync_to_vblank(draw) && !violate_oml(draw)) { /* Request a vblank event one vblank from now, the most * likely (optimistic?) time a direct framebuffer blit * will complete or a desktop compositor will update its * screen. This defers DRI2SwapComplete() to the earliest * likely time of real swap completion. */ s->action = BLIT; ret = nouveau_wait_vblank(draw, DRM_VBLANK_EVENT | DRM_VBLANK_RELATIVE, 1, NULL, NULL, s); /* Done, if success. Otherwise use fallback below. */ if (!ret) return; } } /* Special triple-buffering hack for old pre 1.12.0 x-servers used? */ if (violate_oml(draw)) { /* Signal to client that swap completion timestamps and counts * are invalid - they violate the specification. */ frame = tv_sec = tv_usec = 0; } /* * Tell the X server buffers are already swapped even if they're * not, to prevent it from blocking the client on the next * GetBuffers request (and let the client do triple-buffering). * * XXX - The DRI2SwapLimit() API allowed us to move this to * the flip handler with no FPS hit for page flipped swaps. * It is still needed as a fallback for some copy swaps as * we lack a method to detect true swap completion for * DRI2_BLIT_COMPLETE. * * It is also used if triple-buffering is requested on * old x-servers which don't support the DRI2SwapLimit() * function. */ DRI2SwapComplete(s->client, draw, frame, tv_sec, tv_usec, type, s->func, s->data); out: free(s); } static Bool nouveau_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr dst, DRI2BufferPtr src, CARD64 *target_msc, CARD64 divisor, CARD64 remainder, DRI2SwapEventPtr func, void *data) { struct nouveau_dri2_vblank_state *s; CARD64 current_msc, expect_msc; CARD64 current_ust; int ret; /* Initialize a swap structure */ s = malloc(sizeof(*s)); if (!s) return FALSE; *s = (struct nouveau_dri2_vblank_state) { SWAP, client, draw->id, dst, src, func, data, 0 }; if (can_sync_to_vblank(draw)) { /* Get current sequence and vblank time*/ ret = nouveau_wait_vblank(draw, DRM_VBLANK_RELATIVE, 0, ¤t_msc, ¤t_ust, NULL); if (ret) goto fail; /* Truncate to match kernel interfaces; means occasional overflow * misses, but that's generally not a big deal. */ *target_msc &= 0xffffffff; divisor &= 0xffffffff; remainder &= 0xffffffff; /* Calculate a swap target if we don't have one */ if (current_msc >= *target_msc && divisor) *target_msc = current_msc + divisor - (current_msc - remainder) % divisor; /* Avoid underflow of unsigned value below */ if (*target_msc == 0) *target_msc = 1; /* Swap at next possible vblank requested? */ if (current_msc >= *target_msc - 1) { /* Special case: Need to swap at next vblank. * Schedule swap immediately, bypassing the kernel * vblank event mechanism to avoid a dangerous race * between the client and the x-server vblank event * dispatch in the main x-server dispatch loop when * the swap_limit is set to 2 for triple-buffering. * * This also optimizes for the common case of swap * at next vblank, avoiding vblank dispatch delay. */ s->frame = 1 + ((unsigned int) current_msc & 0xffffffff); *target_msc = 1 + current_msc; nouveau_dri2_finish_swap(draw, current_msc, (unsigned int) (current_ust / 1000000), (unsigned int) (current_ust % 1000000), s); return TRUE; } /* This is a swap in the future, ie. the vblank event will * only get dispatched at least 2 vblanks into the future. */ #if DRI2INFOREC_VERSION >= 6 /* On XOrg 1.12+ we need to temporarily lower the swaplimit to 1, * so that DRI2GetBuffersWithFormat() requests from the client get * deferred in the x-server until the vblank event has been * dispatched to us and nouveau_dri2_finish_swap() is done. If * we wouldn't do this, DRI2GetBuffersWithFormat() would operate * on wrong (pre-swap) buffers, and cause a segfault later on in * nouveau_dri2_finish_swap(). Our vblank event handler will restore * the old swaplimit immediately after nouveau_dri2_finish_swap() * is done, so we still get 1 video refresh cycle worth of triple- * buffering, because the client can start rendering again 1 cycle * before the pending swap is completed. * * The same race would happen for the "swap at next vblank" case, * but the special case "swap immediately" code above prevents this. */ DRI2SwapLimit(draw, 1); #endif /* Request a vblank event one frame before the target */ ret = nouveau_wait_vblank(draw, DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT, max(current_msc, *target_msc - 1), &expect_msc, NULL, s); if (ret) goto fail; s->frame = 1 + ((unsigned int) expect_msc & 0xffffffff); *target_msc = 1 + expect_msc; } else { /* We can't/don't want to sync to vblank, just swap. */ nouveau_dri2_finish_swap(draw, 0, 0, 0, s); } return TRUE; fail: free(s); return FALSE; } static Bool nouveau_dri2_schedule_wait(ClientPtr client, DrawablePtr draw, CARD64 target_msc, CARD64 divisor, CARD64 remainder) { struct nouveau_dri2_vblank_state *s; CARD64 current_msc; int ret; /* Truncate to match kernel interfaces; means occasional overflow * misses, but that's generally not a big deal. */ target_msc &= 0xffffffff; divisor &= 0xffffffff; remainder &= 0xffffffff; if (!can_sync_to_vblank(draw)) { DRI2WaitMSCComplete(client, draw, target_msc, 0, 0); return TRUE; } /* Initialize a vblank structure */ s = malloc(sizeof(*s)); if (!s) return FALSE; *s = (struct nouveau_dri2_vblank_state) { WAIT, client, draw->id }; /* Get current sequence */ ret = nouveau_wait_vblank(draw, DRM_VBLANK_RELATIVE, 0, ¤t_msc, NULL, NULL); if (ret) goto fail; /* Calculate a wait target if we don't have one */ if (current_msc >= target_msc && divisor) target_msc = current_msc + divisor - (current_msc - remainder) % divisor; /* Request a vblank event */ ret = nouveau_wait_vblank(draw, DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT, max(current_msc, target_msc), NULL, NULL, s); if (ret) goto fail; DRI2BlockClient(client, draw); return TRUE; fail: free(s); return FALSE; } static Bool nouveau_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc) { int ret; if (!can_sync_to_vblank(draw)) { *ust = 0; *msc = 0; return TRUE; } /* Get current sequence */ ret = nouveau_wait_vblank(draw, DRM_VBLANK_RELATIVE, 0, msc, ust, NULL); if (ret) return FALSE; return TRUE; } Bool nouveau_dri2_init(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); DRI2InfoRec dri2 = { 0 }; const char *drivernames[2][2] = { { "nouveau", "nouveau" }, { "nouveau_vieux", "nouveau_vieux" } }; if (pNv->AccelMethod != EXA) return FALSE; if (pNv->Architecture >= NV_ARCH_30) dri2.driverNames = drivernames[0]; else dri2.driverNames = drivernames[1]; dri2.numDrivers = 2; dri2.driverName = dri2.driverNames[0]; dri2.fd = pNv->dev->fd; dri2.deviceName = pNv->drm_device_name; dri2.version = DRI2INFOREC_VERSION; dri2.CreateBuffer = nouveau_dri2_create_buffer; dri2.DestroyBuffer = nouveau_dri2_destroy_buffer; dri2.CopyRegion = nouveau_dri2_copy_region; dri2.ScheduleSwap = nouveau_dri2_schedule_swap; dri2.ScheduleWaitMSC = nouveau_dri2_schedule_wait; dri2.GetMSC = nouveau_dri2_get_msc; #if DRI2INFOREC_VERSION >= 6 dri2.SwapLimitValidate = nouveau_dri2_swap_limit_validate; #endif #if DRI2INFOREC_VERSION >= 7 dri2.version = 7; dri2.GetParam = NULL; #endif #if DRI2INFOREC_VERSION >= 9 dri2.version = 9; dri2.CreateBuffer2 = nouveau_dri2_create_buffer2; dri2.DestroyBuffer2 = nouveau_dri2_destroy_buffer2; dri2.CopyRegion2 = nouveau_dri2_copy_region2; #endif return DRI2ScreenInit(pScreen, &dri2); } void nouveau_dri2_fini(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); if (pNv->AccelMethod == EXA) DRI2CloseScreen(pScreen); } #ifdef DRI3 static int is_render_node(int fd) { struct stat st; if (fstat(fd, &st)) return 0; if (!S_ISCHR(st.st_mode)) return 0; return st.st_rdev & 0x80; } static int nouveau_dri3_open(ScreenPtr screen, RRProviderPtr provider, int *out) { ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(pScrn); int fd = -1; #ifdef O_CLOEXEC fd = open(pNv->render_node, O_RDWR | O_CLOEXEC); #endif if (fd < 0) fd = open(pNv->render_node, O_RDWR); if (fd < 0) return -BadAlloc; if (!is_render_node(fd)) { drm_magic_t magic; if (drmGetMagic(fd, &magic) || drmAuthMagic(pNv->dev->fd, magic)) { close(fd); return -BadMatch; } } *out = fd; return Success; } static PixmapPtr nouveau_dri3_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp) { ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(pScrn); PixmapPtr pixmap; struct nouveau_bo *bo = NULL; struct nouveau_pixmap *nvpix; if (depth < 8 || depth > 32) return NULL; pixmap = screen->CreatePixmap(screen, 0, 0, depth, 0); if (!pixmap) return NULL; if (pixmap->drawable.bitsPerPixel % 8) goto free_pixmap; if (!screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, stride, NULL)) goto free_pixmap; if (nouveau_bo_prime_handle_ref(pNv->dev, fd, &bo)) goto free_pixmap; nvpix = nouveau_pixmap(pixmap); nouveau_bo_ref(NULL, &nvpix->bo); nvpix->bo = bo; nvpix->shared = (bo->flags & NOUVEAU_BO_APER) == NOUVEAU_BO_GART; return pixmap; free_pixmap: dixDestroyPixmap(pixmap, 0); return NULL; } static int nouveau_dri3_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { struct nouveau_bo *bo = nouveau_pixmap_bo(pixmap); int fd; if (!bo || nouveau_bo_set_prime(bo, &fd) < 0) return -EINVAL; *stride = pixmap->devKind; *size = bo->size; return fd; } static dri3_screen_info_rec nouveau_dri3_screen_info = { .version = DRI3_SCREEN_INFO_VERSION, .open = nouveau_dri3_open, .pixmap_from_fd = nouveau_dri3_pixmap_from_fd, .fd_from_pixmap = nouveau_dri3_fd_from_pixmap }; #endif Bool nouveau_dri3_screen_init(ScreenPtr screen) { #ifdef DRI3 ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(pScrn); char *buf; if (is_render_node(pNv->dev->fd)) return TRUE; buf = drmGetRenderDeviceNameFromFd(pNv->dev->fd); if (buf) { pNv->render_node = buf; if (dri3_screen_init(screen, &nouveau_dri3_screen_info)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DRI3 on EXA enabled\n"); return TRUE; } else { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DRI3 on EXA initialization failed\n"); return FALSE; } } else free(buf); #endif return TRUE; } xf86-video-nouveau-1.0.18/src/nouveau_exa.c0000644000175000017500000003264414713424663014136 /* * Copyright 2009 Nouveau Project * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "exa.h" #include "hwdefs/nv_m2mf.xml.h" static inline Bool NVAccelMemcpyRect(char *dst, const char *src, int height, int dst_pitch, int src_pitch, int line_len) { if ((src_pitch == line_len) && (src_pitch == dst_pitch)) { memcpy(dst, src, line_len*height); } else { while (height--) { memcpy(dst, src, line_len); src += src_pitch; dst += dst_pitch; } } return TRUE; } Bool NVAccelM2MF(NVPtr pNv, int w, int h, int cpp, uint32_t srcoff, uint32_t dstoff, struct nouveau_bo *src, int sd, int sp, int sh, int sx, int sy, struct nouveau_bo *dst, int dd, int dp, int dh, int dx, int dy) { if (pNv->ce_rect && pNv->ce_enabled) return pNv->ce_rect(pNv->ce_pushbuf, pNv->NvCopy, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else if (pNv->Architecture >= NV_KEPLER) return NVE0EXARectCopy(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else if (pNv->Architecture >= NV_FERMI) return NVC0EXARectM2MF(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else if (pNv->Architecture >= NV_TESLA) return NV50EXARectM2MF(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); else return NV04EXARectM2MF(pNv, w, h, cpp, src, srcoff, sd, sp, sh, sx, sy, dst, dstoff, dd, dp, dh, dx, dy); return FALSE; } static int nouveau_exa_mark_sync(ScreenPtr pScreen) { return 0; } static void nouveau_exa_wait_marker(ScreenPtr pScreen, int marker) { } static Bool nouveau_exa_prepare_access(PixmapPtr ppix, int index) { struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); NVPtr pNv = NVPTR(xf86ScreenToScrn(ppix->drawable.pScreen)); if (nv50_style_tiled_pixmap(ppix) && !pNv->wfb_enabled) return FALSE; if (nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client)) return FALSE; ppix->devPrivate.ptr = bo->map; return TRUE; } static void nouveau_exa_finish_access(PixmapPtr ppix, int index) { } static Bool nouveau_exa_pixmap_is_offscreen(PixmapPtr ppix) { return nouveau_pixmap_bo(ppix) != NULL; } static void * nouveau_exa_create_pixmap(ScreenPtr pScreen, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(scrn); struct nouveau_pixmap *nvpix; int ret; if (!width || !height) return calloc(1, sizeof(*nvpix)); if (!pNv->exa_force_cp && pNv->dev->vram_size <= 32 * 1024 * 1024) return NULL; nvpix = calloc(1, sizeof(*nvpix)); if (!nvpix) return NULL; ret = nouveau_allocate_surface(scrn, width, height, bitsPerPixel, usage_hint, new_pitch, &nvpix->bo); if (!ret) { free(nvpix); return NULL; } #ifdef NOUVEAU_PIXMAP_SHARING if ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) nvpix->shared = TRUE; #endif return nvpix; } static void nouveau_exa_destroy_pixmap(ScreenPtr pScreen, void *priv) { struct nouveau_pixmap *nvpix = priv; if (!nvpix) return; nouveau_bo_ref(NULL, &nvpix->bo); free(nvpix); } #ifdef NOUVEAU_PIXMAP_SHARING static Bool nouveau_exa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr secondary, void **handle_p) { struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix); int ret; int handle; ret = nouveau_bo_set_prime(bo, &handle); if (ret != 0) { ErrorF("%s: ret is %d errno is %d\n", __func__, ret, errno); return FALSE; } nvpix->shared = TRUE; *handle_p = (void *)(long)handle; return TRUE; } static Bool nouveau_exa_set_shared_pixmap_backing(PixmapPtr ppix, void *handle) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix); int ret; int ihandle = (int)(long)(handle); ret = nouveau_bo_prime_handle_ref(pNv->dev, ihandle, &bo); if (ret) { ErrorF("failed to get BO with handle %d\n", ihandle); return FALSE; } nvpix->bo = bo; nvpix->shared = TRUE; close(ihandle); return TRUE; } #endif bool nv50_style_tiled_pixmap(PixmapPtr ppix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); return pNv->Architecture >= NV_TESLA && nouveau_pixmap_bo(ppix)->config.nv50.memtype; } static int nouveau_exa_scratch(NVPtr pNv, int size, struct nouveau_bo **pbo, int *off) { struct nouveau_bo *bo; int ret; if (!pNv->transfer || pNv->transfer->size <= pNv->transfer_offset + size) { ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, NOUVEAU_ALIGN(size, 1 * 1024 * 1024), NULL, &bo); if (ret != 0) return ret; ret = nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client); if (ret != 0) { nouveau_bo_ref(NULL, &bo); return ret; } nouveau_bo_ref(bo, &pNv->transfer); nouveau_bo_ref(NULL, &bo); pNv->transfer_offset = 0; } *off = pNv->transfer_offset; *pbo = pNv->transfer; pNv->transfer_offset += size; return 0; } static Bool nouveau_exa_download_from_screen(PixmapPtr pspix, int x, int y, int w, int h, char *dst, int dst_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pspix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_bo *bo; int src_pitch, tmp_pitch, cpp, i; const char *src; Bool ret; cpp = pspix->drawable.bitsPerPixel >> 3; src_pitch = exaGetPixmapPitch(pspix); tmp_pitch = w * cpp; while (h) { const int lines = (h > 2047) ? 2047 : h; struct nouveau_bo *tmp; int tmp_offset; if (nouveau_exa_scratch(pNv, lines * tmp_pitch, &tmp, &tmp_offset)) goto memcpy; if (!NVAccelM2MF(pNv, w, lines, cpp, 0, tmp_offset, nouveau_pixmap_bo(pspix), NOUVEAU_BO_VRAM, src_pitch, pspix->drawable.height, x, y, tmp, NOUVEAU_BO_GART, tmp_pitch, lines, 0, 0)) goto memcpy; nouveau_bo_wait(tmp, NOUVEAU_BO_RD, pNv->client); if (dst_pitch == tmp_pitch) { memcpy(dst, tmp->map + tmp_offset, dst_pitch * lines); dst += dst_pitch * lines; } else { src = tmp->map + tmp_offset; for (i = 0; i < lines; i++) { memcpy(dst, src, tmp_pitch); src += tmp_pitch; dst += dst_pitch; } } /* next! */ h -= lines; y += lines; } return TRUE; memcpy: bo = nouveau_pixmap_bo(pspix); if (nv50_style_tiled_pixmap(pspix)) ErrorF("%s:%d - falling back to memcpy ignores tiling\n", __func__, __LINE__); if (nouveau_bo_map(bo, NOUVEAU_BO_RD, pNv->client)) return FALSE; src = (char *)bo->map + (y * src_pitch) + (x * cpp); ret = NVAccelMemcpyRect(dst, src, h, dst_pitch, src_pitch, w*cpp); return ret; } static Bool nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h, char *src, int src_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdpix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); int dst_pitch, tmp_pitch, cpp, i; struct nouveau_bo *bo; char *dst; Bool ret; cpp = pdpix->drawable.bitsPerPixel >> 3; dst_pitch = exaGetPixmapPitch(pdpix); tmp_pitch = w * cpp; /* try hostdata transfer */ if (w * h * cpp < 16*1024) /* heuristic */ { if (pNv->Architecture < NV_TESLA) { if (NV04EXAUploadIFC(pScrn, src, src_pitch, pdpix, x, y, w, h, cpp)) { return TRUE; } } else if (pNv->Architecture < NV_FERMI) { if (NV50EXAUploadSIFC(src, src_pitch, pdpix, x, y, w, h, cpp)) { return TRUE; } } else { if (NVC0EXAUploadSIFC(src, src_pitch, pdpix, x, y, w, h, cpp)) { return TRUE; } } } while (h) { const int lines = (h > 2047) ? 2047 : h; struct nouveau_bo *tmp; int tmp_offset; if (nouveau_exa_scratch(pNv, lines * tmp_pitch, &tmp, &tmp_offset)) goto memcpy; if (src_pitch == tmp_pitch) { memcpy(tmp->map + tmp_offset, src, src_pitch * lines); src += src_pitch * lines; } else { dst = tmp->map + tmp_offset; for (i = 0; i < lines; i++) { memcpy(dst, src, tmp_pitch); src += src_pitch; dst += tmp_pitch; } } if (!NVAccelM2MF(pNv, w, lines, cpp, tmp_offset, 0, tmp, NOUVEAU_BO_GART, tmp_pitch, lines, 0, 0, nouveau_pixmap_bo(pdpix), NOUVEAU_BO_VRAM, dst_pitch, pdpix->drawable.height, x, y)) goto memcpy; /* next! */ h -= lines; y += lines; } return TRUE; /* fallback to memcpy-based transfer */ memcpy: bo = nouveau_pixmap_bo(pdpix); if (nv50_style_tiled_pixmap(pdpix)) ErrorF("%s:%d - falling back to memcpy ignores tiling\n", __func__, __LINE__); if (nouveau_bo_map(bo, NOUVEAU_BO_WR, pNv->client)) return FALSE; dst = (char *)bo->map + (y * dst_pitch) + (x * cpp); ret = NVAccelMemcpyRect(dst, src, h, dst_pitch, src_pitch, w*cpp); return ret; } Bool nouveau_exa_pixmap_is_onscreen(PixmapPtr ppix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); if (pScrn->pScreen->GetScreenPixmap(pScrn->pScreen) == ppix) return TRUE; return FALSE; } static void nouveau_exa_flush(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); nouveau_pushbuf_kick(pNv->pushbuf, pNv->pushbuf->channel); } Bool nouveau_exa_init(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); ExaDriverPtr exa; if (!xf86LoadSubModule(pScrn, "exa")) return FALSE; exa = exaDriverAlloc(); if (!exa) return FALSE; exa->exa_major = EXA_VERSION_MAJOR; exa->exa_minor = EXA_VERSION_MINOR; exa->flags = EXA_OFFSCREEN_PIXMAPS; #ifdef EXA_SUPPORTS_PREPARE_AUX exa->flags |= EXA_SUPPORTS_PREPARE_AUX; #endif exa->PixmapIsOffscreen = nouveau_exa_pixmap_is_offscreen; exa->PrepareAccess = nouveau_exa_prepare_access; exa->FinishAccess = nouveau_exa_finish_access; exa->flags |= (EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS); exa->pixmapOffsetAlign = 256; exa->pixmapPitchAlign = 64; exa->CreatePixmap2 = nouveau_exa_create_pixmap; exa->DestroyPixmap = nouveau_exa_destroy_pixmap; #ifdef NOUVEAU_PIXMAP_SHARING exa->SharePixmapBacking = nouveau_exa_share_pixmap_backing; exa->SetSharedPixmapBacking = nouveau_exa_set_shared_pixmap_backing; #endif if (pNv->Architecture >= NV_TESLA) { exa->maxX = 8192; exa->maxY = 8192; } else if (pNv->Architecture >= NV_ARCH_10) { exa->maxX = 4096; exa->maxY = 4096; } else { exa->maxX = 2048; exa->maxY = 2048; } exa->MarkSync = nouveau_exa_mark_sync; exa->WaitMarker = nouveau_exa_wait_marker; exa->DownloadFromScreen = nouveau_exa_download_from_screen; exa->UploadToScreen = nouveau_exa_upload_to_screen; if (pNv->Architecture < NV_TESLA) { exa->PrepareCopy = NV04EXAPrepareCopy; exa->Copy = NV04EXACopy; exa->DoneCopy = NV04EXADoneCopy; exa->PrepareSolid = NV04EXAPrepareSolid; exa->Solid = NV04EXASolid; exa->DoneSolid = NV04EXADoneSolid; } else if (pNv->Architecture < NV_FERMI) { exa->PrepareCopy = NV50EXAPrepareCopy; exa->Copy = NV50EXACopy; exa->DoneCopy = NV50EXADoneCopy; exa->PrepareSolid = NV50EXAPrepareSolid; exa->Solid = NV50EXASolid; exa->DoneSolid = NV50EXADoneSolid; } else { exa->PrepareCopy = NVC0EXAPrepareCopy; exa->Copy = NVC0EXACopy; exa->DoneCopy = NVC0EXADoneCopy; exa->PrepareSolid = NVC0EXAPrepareSolid; exa->Solid = NVC0EXASolid; exa->DoneSolid = NVC0EXADoneSolid; } switch (pNv->Architecture) { case NV_ARCH_10: case NV_ARCH_20: exa->CheckComposite = NV10EXACheckComposite; exa->PrepareComposite = NV10EXAPrepareComposite; exa->Composite = NV10EXAComposite; exa->DoneComposite = NV10EXADoneComposite; break; case NV_ARCH_30: exa->CheckComposite = NV30EXACheckComposite; exa->PrepareComposite = NV30EXAPrepareComposite; exa->Composite = NV30EXAComposite; exa->DoneComposite = NV30EXADoneComposite; break; case NV_ARCH_40: exa->CheckComposite = NV40EXACheckComposite; exa->PrepareComposite = NV40EXAPrepareComposite; exa->Composite = NV40EXAComposite; exa->DoneComposite = NV40EXADoneComposite; break; case NV_TESLA: exa->CheckComposite = NV50EXACheckComposite; exa->PrepareComposite = NV50EXAPrepareComposite; exa->Composite = NV50EXAComposite; exa->DoneComposite = NV50EXADoneComposite; break; case NV_FERMI: case NV_KEPLER: case NV_MAXWELL: case NV_PASCAL: exa->CheckComposite = NVC0EXACheckComposite; exa->PrepareComposite = NVC0EXAPrepareComposite; exa->Composite = NVC0EXAComposite; exa->DoneComposite = NVC0EXADoneComposite; break; default: break; } if (!exaDriverInit(pScreen, exa)) return FALSE; pNv->EXADriverPtr = exa; pNv->Flush = nouveau_exa_flush; return TRUE; } xf86-video-nouveau-1.0.18/src/vl_hwmc.h0000644000175000017500000000044514713424663013255 #ifndef vl_hwmc_h #define vl_hwmc_h #include XF86MCAdaptorPtr vlCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name); void vlDestroyAdaptorXvMC(XF86MCAdaptorPtr adaptor); void vlInitXvMC(ScreenPtr pScreen, unsigned int num_adaptors, XF86MCAdaptorPtr *adaptors); #endif xf86-video-nouveau-1.0.18/src/nouveau_present.c0000644000175000017500000002025114713424663015030 /* * Copyright 2013 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Ben Skeggs */ #include "nouveau_present.h" #if defined(DRI3) #include "nv_include.h" #include "xf86drmMode.h" struct nouveau_present { struct present_screen_info info; }; static RRCrtcPtr nouveau_present_crtc(WindowPtr window) { return randr_crtc_covering_drawable(&window->drawable); } static int nouveau_present_ust_msc(RRCrtcPtr rrcrtc, uint64_t *ust, uint64_t *msc) { xf86CrtcPtr crtc = rrcrtc->devPrivate; NVPtr pNv = NVPTR(crtc->scrn); drmVBlank args; int ret; args.request.type = DRM_VBLANK_RELATIVE; args.request.type |= drmmode_head(crtc) << DRM_VBLANK_HIGH_CRTC_SHIFT; args.request.sequence = 0, args.request.signal = 0, ret = drmWaitVBlank(pNv->dev->fd, &args); if (ret) { *ust = *msc = 0; return BadMatch; } *ust = (CARD64)args.reply.tval_sec * 1000000 + args.reply.tval_usec; *msc = args.reply.sequence; return Success; } struct nouveau_present_vblank { uint64_t msc; }; static void nouveau_present_vblank(void *priv, uint64_t name, uint64_t ust, uint32_t msc_lo) { struct nouveau_present_vblank *event = priv; uint64_t msc; msc = (event->msc & 0xffffffff00000000ULL) | msc_lo; if (msc < event->msc) event->msc += 1ULL << 32; present_event_notify(name, ust, msc); } static int nouveau_present_vblank_queue(RRCrtcPtr rrcrtc, uint64_t event_id, uint64_t msc) { xf86CrtcPtr crtc = rrcrtc->devPrivate; NVPtr pNv = NVPTR(crtc->scrn); drmVBlank args; struct nouveau_present_vblank *event; void *token; int ret; event = drmmode_event_queue(crtc->scrn, event_id, sizeof(*event), nouveau_present_vblank, &token); if (!event) return BadAlloc; event->msc = msc; args.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; args.request.type |= drmmode_head(crtc) << DRM_VBLANK_HIGH_CRTC_SHIFT; args.request.sequence = msc; args.request.signal = (unsigned long)token; while ((ret = drmWaitVBlank(pNv->dev->fd, &args)) != 0) { if (errno != EBUSY) { xf86DrvMsgVerb(crtc->scrn->scrnIndex, X_WARNING, 4, "PRESENT: Wait for VBlank failed: %s\n", strerror(errno)); drmmode_event_abort(crtc->scrn, event_id, false); return BadAlloc; } ret = drmmode_event_flush(crtc->scrn); if (ret < 0) { xf86DrvMsgVerb(crtc->scrn->scrnIndex, X_WARNING, 4, "PRESENT: Event flush failed\n"); drmmode_event_abort(crtc->scrn, event_id, false); return BadAlloc; } } return Success; } static void nouveau_present_vblank_abort(RRCrtcPtr rrcrtc, uint64_t event_id, uint64_t msc) { xf86CrtcPtr crtc = rrcrtc->devPrivate; drmmode_event_abort(crtc->scrn, event_id, true); } static void nouveau_present_flush(WindowPtr window) { ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen); NVPtr pNv = NVPTR(scrn); if (pNv->Flush) pNv->Flush(scrn); } struct nouveau_present_flip { uint64_t msc; uint32_t old; int fd; }; static Bool nouveau_present_flip_check(RRCrtcPtr rrcrtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip) { ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen); NVPtr pNv = NVPTR(scrn); xf86CrtcPtr crtc = rrcrtc->devPrivate; struct nouveau_pixmap *priv = nouveau_pixmap(pixmap); if (!scrn->vtSema || !xf86_crtc_on(crtc) || crtc->rotatedData) return FALSE; if (!priv) { /* The pixmap may not have had backing for low-memory GPUs, or * if we ran out of VRAM. Make sure it's properly backed for * flipping. */ pNv->exa_force_cp = TRUE; exaMoveInPixmap(pixmap); pNv->exa_force_cp = FALSE; priv = nouveau_pixmap(pixmap); } return priv ? TRUE : FALSE; } static void nouveau_present_flip(void *priv, uint64_t name, uint64_t ust, uint32_t msc_lo) { struct nouveau_present_flip *flip = priv; uint64_t msc; msc = (flip->msc & ~0xffffffffULL) | msc_lo; if (msc < flip->msc) msc += 1ULL << 32; present_event_notify(name, ust, msc); drmModeRmFB(flip->fd, flip->old); } static Bool nouveau_present_flip_exec(ScrnInfoPtr scrn, uint64_t event_id, int sync, uint64_t target_msc, PixmapPtr pixmap, Bool vsync) { struct nouveau_pixmap *priv = nouveau_pixmap(pixmap); NVPtr pNv = NVPTR(scrn); uint32_t next_fb; void *token; int ret; ret = drmModeAddFB(pNv->dev->fd, pixmap->drawable.width, pixmap->drawable.height, pixmap->drawable.depth, pixmap->drawable.bitsPerPixel, pixmap->devKind, priv->bo->handle, &next_fb); if (ret == 0) { struct nouveau_present_flip *flip = drmmode_event_queue(scrn, event_id, sizeof(*flip), nouveau_present_flip, &token); if (flip) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int last = 0, i; drmmode_swap(scrn, next_fb, &flip->old); flip->fd = pNv->dev->fd; flip->msc = target_msc; for (i = 0; i < config->num_crtc; i++) { if (xf86_crtc_on(config->crtc[i])) last = i; } for (i = 0; i < config->num_crtc; i++) { int type = vsync ? 0 : DRM_MODE_PAGE_FLIP_ASYNC; int crtc = drmmode_crtc(config->crtc[i]); void *user = NULL; if (!xf86_crtc_on(config->crtc[i])) continue; if (token && ((crtc == sync) || (i == last))) { type |= DRM_MODE_PAGE_FLIP_EVENT; user = token; } ret = drmModePageFlip(pNv->dev->fd, crtc, next_fb, type, user); if (ret == 0 && user) { token = NULL; } } if (token == NULL) { return TRUE; } drmmode_swap(scrn, flip->old, &next_fb); drmmode_event_abort(scrn, event_id, false); } drmModeRmFB(pNv->dev->fd, next_fb); } return FALSE; } static Bool nouveau_present_flip_next(RRCrtcPtr rrcrtc, uint64_t event_id, uint64_t target_msc, PixmapPtr pixmap, Bool vsync) { xf86CrtcPtr crtc = rrcrtc->devPrivate; ScrnInfoPtr scrn = crtc->scrn; return nouveau_present_flip_exec(scrn, event_id, drmmode_crtc(crtc), target_msc, pixmap, vsync); } static void nouveau_present_flip_stop(ScreenPtr screen, uint64_t event_id) { PixmapPtr pixmap = screen->GetScreenPixmap(screen); ScrnInfoPtr scrn = xf86ScreenToScrn(screen); nouveau_present_flip_exec(scrn, event_id, 0, 0, pixmap, TRUE); } void nouveau_present_fini(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(scrn); if (pNv->present) { free(pNv->present); pNv->present = NULL; } } Bool nouveau_present_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); NVPtr pNv = NVPTR(scrn); struct nouveau_present *present; uint64_t value; int ret; present = pNv->present = calloc(1, sizeof(*present)); if (!present) return FALSE; present->info.version = PRESENT_SCREEN_INFO_VERSION; present->info.get_crtc = nouveau_present_crtc; present->info.get_ust_msc = nouveau_present_ust_msc; present->info.queue_vblank = nouveau_present_vblank_queue; present->info.abort_vblank = nouveau_present_vblank_abort; present->info.flush = nouveau_present_flush; if (pNv->has_pageflip) { #ifdef DRM_CAP_ASYNC_PAGE_FLIP ret = drmGetCap(pNv->dev->fd, DRM_CAP_ASYNC_PAGE_FLIP, &value); if (ret == 0 && value == 1) present->info.capabilities |= PresentCapabilityAsync; #endif present->info.check_flip = nouveau_present_flip_check; present->info.flip = nouveau_present_flip_next; present->info.unflip = nouveau_present_flip_stop; } return present_screen_init(screen, &present->info); } #endif xf86-video-nouveau-1.0.18/src/nouveau_sync.h0000644000175000017500000000232414713424663014332 #ifndef __NOUVEAU_SYNC_H__ #define __NOUVEAU_SYNC_H__ #include "xorg-server.h" #include "scrnintstr.h" #ifdef DRI3 #include "misync.h" #include "misyncshm.h" #include "misyncstr.h" #define wrap(priv, parn, name, func) { \ priv->name = parn->name; \ parn->name = func; \ } #define unwrap(priv, parn, name) { \ if (priv && priv->name) \ parn->name = priv->name; \ } #define swap(priv, parn, name) { \ void *tmp = priv->name; \ priv->name = parn->name; \ parn->name = tmp; \ } Bool nouveau_sync_init(ScreenPtr pScreen); void nouveau_sync_fini(ScreenPtr pScreen); #else static inline Bool nouveau_sync_init(ScreenPtr pScreen) { return FALSE; } static inline void nouveau_sync_fini(ScreenPtr pScreen) { } #endif #endif xf86-video-nouveau-1.0.18/src/drmmode_display.c0000644000175000017500000014237314713424663014774 /* * Copyright © 2007 Red Hat, Inc. * Copyright © 2008 Maarten Maathuis * * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xorgVersion.h" #include "nv_include.h" #include "xf86drmMode.h" #include "X11/Xatom.h" #include #ifdef HAVE_LIBUDEV #include "libudev.h" #endif static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height); typedef struct { int fd; uint32_t fb_id; int cpp; drmEventContext event_context; #ifdef HAVE_LIBUDEV struct udev_monitor *uevent_monitor; #endif } drmmode_rec, *drmmode_ptr; typedef struct { drmmode_ptr drmmode; drmModeCrtcPtr mode_crtc; int hw_crtc_index; struct nouveau_bo *cursor; struct nouveau_bo *rotate_bo; int rotate_pitch; PixmapPtr rotate_pixmap; uint32_t rotate_fb_id; Bool cursor_visible; int scanout_pixmap_x; int dpms_mode; } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; typedef struct { drmModePropertyPtr mode_prop; int index; /* Index within the kernel-side property arrays for * this connector. */ int num_atoms; /* if range prop, num_atoms == 1; if enum prop, * num_atoms == num_enums + 1 */ Atom *atoms; } drmmode_prop_rec, *drmmode_prop_ptr; typedef struct { drmmode_ptr drmmode; int output_id; drmModeConnectorPtr mode_output; drmModeEncoderPtr mode_encoder; drmModePropertyBlobPtr edid_blob; drmModePropertyBlobPtr tile_blob; int num_props; drmmode_prop_ptr props; } drmmode_output_private_rec, *drmmode_output_private_ptr; static void drmmode_output_dpms(xf86OutputPtr output, int mode); static drmmode_ptr drmmode_from_scrn(ScrnInfoPtr scrn) { if (scrn) { xf86CrtcConfigPtr conf = XF86_CRTC_CONFIG_PTR(scrn); drmmode_crtc_private_ptr crtc = conf->crtc[0]->driver_private; return crtc->drmmode; } return NULL; } static inline struct nouveau_pixmap * drmmode_pixmap(PixmapPtr ppix) { return nouveau_pixmap(ppix); } int drmmode_crtc(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->mode_crtc->crtc_id; } Bool xf86_crtc_on(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn; } int drmmode_head(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->hw_crtc_index; } void drmmode_swap(ScrnInfoPtr scrn, uint32_t next, uint32_t *prev) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); *prev = drmmode->fb_id; drmmode->fb_id = next; } struct drmmode_event { struct xorg_list head; drmmode_ptr drmmode; uint64_t name; void (*func)(void *, uint64_t, uint64_t, uint32_t); }; static struct xorg_list drmmode_events = { .next = &drmmode_events, .prev = &drmmode_events, }; static bool warned = false; static void drmmode_event_handler(int fd, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { const uint64_t ust = (uint64_t)tv_sec * 1000000 + tv_usec; struct drmmode_event *e = event_data; int counter = 0; xorg_list_for_each_entry(e, &drmmode_events, head) { counter++; if (e == event_data) { xorg_list_del(&e->head); e->func((void *)(e + 1), e->name, ust, frame); free(e); break; } } if (counter > 100 && !warned) { xf86DrvMsg(0, X_WARNING, "Event handler iterated %d times\n", counter); warned = true; } } void drmmode_event_abort(ScrnInfoPtr scrn, uint64_t name, bool pending) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); struct drmmode_event *e, *t; xorg_list_for_each_entry_safe(e, t, &drmmode_events, head) { if (e->drmmode == drmmode && e->name == name) { xorg_list_del(&e->head); if (!pending) free(e); break; } } } void * drmmode_event_queue(ScrnInfoPtr scrn, uint64_t name, unsigned size, void (*func)(void *, uint64_t, uint64_t, uint32_t), void **event_data) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); struct drmmode_event *e; e = *event_data = calloc(1, sizeof(*e) + size); if (e) { e->drmmode = drmmode; e->name = name; e->func = func; xorg_list_append(&e->head, &drmmode_events); return (void *)(e + 1); } return NULL; } int drmmode_event_flush(ScrnInfoPtr scrn) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); return drmHandleEvent(drmmode->fd, &drmmode->event_context); } void drmmode_event_fini(ScrnInfoPtr scrn) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); struct drmmode_event *e, *t; xorg_list_for_each_entry_safe(e, t, &drmmode_events, head) { if (e->drmmode == drmmode) { xorg_list_del(&e->head); free(e); } } } void drmmode_event_init(ScrnInfoPtr scrn) { drmmode_ptr drmmode = drmmode_from_scrn(scrn); drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION; drmmode->event_context.vblank_handler = drmmode_event_handler; drmmode->event_context.page_flip_handler = drmmode_event_handler; } static PixmapPtr drmmode_pixmap_wrap(ScreenPtr pScreen, int width, int height, int depth, int bpp, int pitch, struct nouveau_bo *bo, void *data) { NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen)); PixmapPtr ppix; if (pNv->AccelMethod > NONE) data = NULL; ppix = pScreen->CreatePixmap(pScreen, 0, 0, depth, 0); if (!ppix) return NULL; pScreen->ModifyPixmapHeader(ppix, width, height, depth, bpp, pitch, data); if (pNv->AccelMethod > NONE) nouveau_bo_ref(bo, &drmmode_pixmap(ppix)->bo); return ppix; } static void drmmode_ConvertFromKMode(ScrnInfoPtr scrn, drmModeModeInfo *kmode, DisplayModePtr mode) { memset(mode, 0, sizeof(DisplayModeRec)); mode->status = MODE_OK; mode->Clock = kmode->clock; mode->HDisplay = kmode->hdisplay; mode->HSyncStart = kmode->hsync_start; mode->HSyncEnd = kmode->hsync_end; mode->HTotal = kmode->htotal; mode->HSkew = kmode->hskew; mode->VDisplay = kmode->vdisplay; mode->VSyncStart = kmode->vsync_start; mode->VSyncEnd = kmode->vsync_end; mode->VTotal = kmode->vtotal; mode->VScan = kmode->vscan; mode->Flags = kmode->flags; //& FLAG_BITS; mode->name = strdup(kmode->name); if (kmode->type & DRM_MODE_TYPE_DRIVER) mode->type = M_T_DRIVER; if (kmode->type & DRM_MODE_TYPE_PREFERRED) mode->type |= M_T_PREFERRED; xf86SetModeCrtc (mode, scrn->adjustFlags); } static void drmmode_ConvertToKMode(ScrnInfoPtr scrn, drmModeModeInfo *kmode, DisplayModePtr mode) { memset(kmode, 0, sizeof(*kmode)); kmode->clock = mode->Clock; kmode->hdisplay = mode->HDisplay; kmode->hsync_start = mode->HSyncStart; kmode->hsync_end = mode->HSyncEnd; kmode->htotal = mode->HTotal; kmode->hskew = mode->HSkew; kmode->vdisplay = mode->VDisplay; kmode->vsync_start = mode->VSyncStart; kmode->vsync_end = mode->VSyncEnd; kmode->vtotal = mode->VTotal; kmode->vscan = mode->VScan; kmode->flags = mode->Flags; //& FLAG_BITS; if (mode->name) strncpy(kmode->name, mode->name, DRM_DISPLAY_MODE_LEN); kmode->name[DRM_DISPLAY_MODE_LEN-1] = 0; } static void drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->dpms_mode = mode; } void drmmode_fbcon_copy(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); if (nouveau_bo_map(pNv->scanout, NOUVEAU_BO_WR, pNv->client)) return; memset(pNv->scanout->map, 0x00, pNv->scanout->size); } static Bool drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; NVPtr pNv = NVPTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; uint32_t *output_ids; int output_count = 0; int ret = TRUE; int i; int fb_id; drmModeModeInfo kmode; if (drmmode->fb_id == 0) { unsigned int pitch = pScrn->displayWidth * (pScrn->bitsPerPixel / 8); ret = drmModeAddFB(drmmode->fd, pScrn->virtualX, pScrn->virtualY, pScrn->depth, pScrn->bitsPerPixel, pitch, pNv->scanout->handle, &drmmode->fb_id); if (ret < 0) { ErrorF("failed to add fb\n"); return FALSE; } } if (!xf86CrtcRotate(crtc)) return FALSE; output_ids = calloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) return FALSE; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; if (output->crtc != crtc) continue; drmmode_output = output->driver_private; if (drmmode_output->output_id == -1) continue; output_ids[output_count] = drmmode_output->mode_output->connector_id; output_count++; } drmmode_ConvertToKMode(crtc->scrn, &kmode, mode); fb_id = drmmode->fb_id; #ifdef NOUVEAU_PIXMAP_SHARING if (crtc->randr_crtc && crtc->randr_crtc->scanout_pixmap) { x = drmmode_crtc->scanout_pixmap_x; y = 0; } else #endif if (drmmode_crtc->rotate_fb_id) { fb_id = drmmode_crtc->rotate_fb_id; x = 0; y = 0; } ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, x, y, output_ids, output_count, &kmode); free(output_ids); if (ret) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "failed to set mode: %s\n", strerror(-ret)); return FALSE; } /* Work around some xserver stupidity */ for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc != crtc) continue; drmmode_output_dpms(output, DPMSModeOn); } crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); #ifdef HAVE_XF86_CURSOR_RESET_CURSOR xf86CursorResetCursor(crtc->scrn->pScreen); #else xf86_reload_cursors(crtc->scrn->pScreen); #endif return TRUE; } static void drmmode_set_cursor_position (xf86CrtcPtr crtc, int x, int y) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeMoveCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, x, y); } static void convert_cursor(CARD32 *dst, CARD32 *src, int dw, int sw) { int i, j; for (j = 0; j < sw; j++) { for (i = 0; i < sw; i++) { dst[j * dw + i] = src[j * sw + i]; } } } static void drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) { NVPtr pNv = NVPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; struct nouveau_bo *cursor = drmmode_crtc->cursor; drmmode_ptr drmmode = drmmode_crtc->drmmode; nouveau_bo_map(cursor, NOUVEAU_BO_WR, pNv->client); convert_cursor(cursor->map, image, 64, nv_cursor_width(pNv)); if (drmmode_crtc->cursor_visible) { drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, cursor->handle, 64, 64); } } static void drmmode_hide_cursor (xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 64, 64); drmmode_crtc->cursor_visible = FALSE; } static void drmmode_show_cursor (xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, drmmode_crtc->cursor->handle, 64, 64); drmmode_crtc->cursor_visible = TRUE; } static void * drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) { ScrnInfoPtr scrn = crtc->scrn; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; void *virtual; int ret; ret = nouveau_allocate_surface(scrn, width, height, scrn->bitsPerPixel, NOUVEAU_CREATE_PIXMAP_SCANOUT, &drmmode_crtc->rotate_pitch, &drmmode_crtc->rotate_bo); if (!ret) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Couldn't allocate shadow memory for rotated CRTC\n"); return NULL; } ret = nouveau_bo_map(drmmode_crtc->rotate_bo, NOUVEAU_BO_RDWR, NVPTR(scrn)->client); if (ret) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Couldn't get virtual address of shadow scanout\n"); nouveau_bo_ref(NULL, &drmmode_crtc->rotate_bo); return NULL; } virtual = drmmode_crtc->rotate_bo->map; ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth, crtc->scrn->bitsPerPixel, drmmode_crtc->rotate_pitch, drmmode_crtc->rotate_bo->handle, &drmmode_crtc->rotate_fb_id); if (ret) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Error adding FB for shadow scanout: %s\n", strerror(-ret)); nouveau_bo_ref(NULL, &drmmode_crtc->rotate_bo); return NULL; } return virtual; } static PixmapPtr drmmode_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) { ScrnInfoPtr pScrn = crtc->scrn; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; PixmapPtr rotate_pixmap; if (!data) data = drmmode_crtc_shadow_allocate (crtc, width, height); rotate_pixmap = drmmode_pixmap_wrap(pScrn->pScreen, width, height, pScrn->depth, pScrn->bitsPerPixel, drmmode_crtc->rotate_pitch, drmmode_crtc->rotate_bo, data); drmmode_crtc->rotate_pixmap = rotate_pixmap; return drmmode_crtc->rotate_pixmap; } static void drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (rotate_pixmap) FreeScratchPixmapHeader(rotate_pixmap); if (data) { drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id); drmmode_crtc->rotate_fb_id = 0; nouveau_bo_ref(NULL, &drmmode_crtc->rotate_bo); drmmode_crtc->rotate_pixmap = NULL; } } static void drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int ret; ret = drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, size, red, green, blue); if (ret != 0) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "failed to set gamma with %d entries: %s\n", size, strerror(-ret)); } } #ifdef NOUVEAU_PIXMAP_SHARING static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) { ScreenPtr screen = xf86ScrnToScreen(crtc->scrn); PixmapPtr screenpix = screen->GetScreenPixmap(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int c, total_width = 0, max_height = 0, this_x = 0; if (!ppix) { if (crtc->randr_crtc->scanout_pixmap) { #ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC PixmapStopDirtyTracking(&crtc->randr_crtc->scanout_pixmap->drawable, screenpix); #else PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix); #endif if (drmmode && drmmode->fb_id) { drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = 0; } } drmmode_crtc->scanout_pixmap_x = 0; return TRUE; } /* iterate over all the attached crtcs - work out bounding box */ for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr iter = xf86_config->crtc[c]; if (!iter->enabled && iter != crtc) continue; if (iter == crtc) { this_x = total_width; total_width += ppix->drawable.width; if (max_height < ppix->drawable.height) max_height = ppix->drawable.height; } else { total_width += iter->mode.HDisplay; if (max_height < iter->mode.VDisplay) max_height = iter->mode.VDisplay; } } if (total_width != screenpix->drawable.width || max_height != screenpix->drawable.height) { Bool ret; ret = drmmode_xf86crtc_resize(crtc->scrn, total_width, max_height); if (ret == FALSE) return FALSE; screenpix = screen->GetScreenPixmap(screen); screen->width = screenpix->drawable.width = total_width; screen->height = screenpix->drawable.height = max_height; } drmmode_crtc->scanout_pixmap_x = this_x; #ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC PixmapStartDirtyTracking(&ppix->drawable, screenpix, 0, 0, this_x, 0, RR_Rotate_0); #else PixmapStartDirtyTracking(ppix, screenpix, 0, 0, this_x, 0, RR_Rotate_0); #endif return TRUE; } #endif static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .dpms = drmmode_crtc_dpms, .set_mode_major = drmmode_set_mode_major, .set_cursor_position = drmmode_set_cursor_position, .show_cursor = drmmode_show_cursor, .hide_cursor = drmmode_hide_cursor, .load_cursor_argb = drmmode_load_cursor_argb, .shadow_create = drmmode_crtc_shadow_create, .shadow_allocate = drmmode_crtc_shadow_allocate, .shadow_destroy = drmmode_crtc_shadow_destroy, .gamma_set = drmmode_gamma_set, #ifdef NOUVEAU_PIXMAP_SHARING .set_scanout_pixmap = drmmode_set_scanout_pixmap, #endif }; static unsigned int drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num) { NVPtr pNv = NVPTR(pScrn); NVEntPtr pNVEnt = NVEntPriv(pScrn); xf86CrtcPtr crtc; drmmode_crtc_private_ptr drmmode_crtc; int ret; crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs); if (crtc == NULL) return 0; drmmode_crtc = XNFcallocarray(sizeof(drmmode_crtc_private_rec), 1); drmmode_crtc->mode_crtc = drmModeGetCrtc(drmmode->fd, mode_res->crtcs[num]); drmmode_crtc->drmmode = drmmode; drmmode_crtc->hw_crtc_index = num; ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, 64*64*4, NULL, &drmmode_crtc->cursor); assert(ret == 0); crtc->driver_private = drmmode_crtc; /* Mark num'th crtc as in use on this device. */ pNVEnt->assigned_crtcs |= (1 << num); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Allocated crtc nr. %d to this screen.\n", num); return 1; } static xf86OutputStatus drmmode_output_detect(xf86OutputPtr output) { /* go to the hw and retrieve a new output struct */ drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; xf86OutputStatus status; if (drmmode_output->output_id == -1) return XF86OutputStatusDisconnected; drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id); if (!drmmode_output->mode_output) { drmmode_output->output_id = -1; return XF86OutputStatusDisconnected; } switch (drmmode_output->mode_output->connection) { case DRM_MODE_CONNECTED: status = XF86OutputStatusConnected; break; case DRM_MODE_DISCONNECTED: status = XF86OutputStatusDisconnected; break; default: case DRM_MODE_UNKNOWNCONNECTION: status = XF86OutputStatusUnknown; break; } return status; } static Bool drmmode_output_mode_valid(xf86OutputPtr output, DisplayModePtr mode) { if (mode->type & M_T_DEFAULT) /* Default modes are harmful here. */ return MODE_BAD; return MODE_OK; } static int koutput_get_prop_idx(int fd, drmModeConnectorPtr koutput, int type, const char *name) { int idx = -1; for (int i = 0; i < koutput->count_props; i++) { drmModePropertyPtr prop = drmModeGetProperty(fd, koutput->props[i]); if (!prop) continue; if (drm_property_type_is(prop, type) && !strcmp(prop->name, name)) idx = i; drmModeFreeProperty(prop); if (idx > -1) break; } return idx; } static drmModePropertyBlobPtr koutput_get_prop_blob(int fd, drmModeConnectorPtr koutput, const char *name) { drmModePropertyBlobPtr blob = NULL; int idx = koutput_get_prop_idx(fd, koutput, DRM_MODE_PROP_BLOB, name); if (idx > -1) blob = drmModeGetPropertyBlob(fd, koutput->prop_values[idx]); return blob; } static void drmmode_output_attach_tile(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; struct xf86CrtcTileInfo tile_info, *set = NULL; if (!koutput) { xf86OutputSetTile(output, NULL); return; } drmModeFreePropertyBlob(drmmode_output->tile_blob); /* look for a TILE property */ drmmode_output->tile_blob = koutput_get_prop_blob(drmmode->fd, koutput, "TILE"); if (drmmode_output->tile_blob) { if (xf86OutputParseKMSTile(drmmode_output->tile_blob->data, drmmode_output->tile_blob->length, &tile_info) == TRUE) set = &tile_info; } xf86OutputSetTile(output, set); } static DisplayModePtr drmmode_output_get_modes(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; int i; DisplayModePtr Modes = NULL, Mode; xf86MonPtr ddc_mon = NULL; if (!koutput) return NULL; /* look for an EDID property */ drmmode_output->edid_blob = koutput_get_prop_blob(drmmode->fd, koutput, "EDID"); if (drmmode_output->edid_blob) { ddc_mon = xf86InterpretEDID(output->scrn->scrnIndex, drmmode_output->edid_blob->data); if (ddc_mon && drmmode_output->edid_blob->length > 128) ddc_mon->flags |= MONITOR_EDID_COMPLETE_RAWDATA; } xf86OutputSetEDID(output, ddc_mon); drmmode_output_attach_tile(output); /* modes should already be available */ for (i = 0; i < koutput->count_modes; i++) { Mode = XNFalloc(sizeof(DisplayModeRec)); drmmode_ConvertFromKMode(output->scrn, &koutput->modes[i], Mode); Modes = xf86ModesAdd(Modes, Mode); } return Modes; } static void drmmode_output_destroy(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; int i; if (drmmode_output->edid_blob) drmModeFreePropertyBlob(drmmode_output->edid_blob); if (drmmode_output->tile_blob) drmModeFreePropertyBlob(drmmode_output->tile_blob); for (i = 0; i < drmmode_output->num_props; i++) { drmModeFreeProperty(drmmode_output->props[i].mode_prop); free(drmmode_output->props[i].atoms); } drmModeFreeConnector(drmmode_output->mode_output); free(drmmode_output); output->driver_private = NULL; } static void drmmode_output_dpms(xf86OutputPtr output, int mode) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmModePropertyPtr props; drmmode_ptr drmmode = drmmode_output->drmmode; int mode_id = -1, i; if (!koutput) return; for (i = 0; i < koutput->count_props; i++) { props = drmModeGetProperty(drmmode->fd, koutput->props[i]); if (props && (props->flags & DRM_MODE_PROP_ENUM)) { if (!strcmp(props->name, "DPMS")) { mode_id = koutput->props[i]; drmModeFreeProperty(props); break; } drmModeFreeProperty(props); } } if (mode_id < 0) return; drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id, mode_id, mode); } static Bool drmmode_property_ignore(drmModePropertyPtr prop) { if (!prop) return TRUE; /* ignore blob prop */ if (prop->flags & DRM_MODE_PROP_BLOB) return TRUE; /* ignore standard property */ if (!strcmp(prop->name, "EDID") || !strcmp(prop->name, "DPMS")) return TRUE; return FALSE; } static void drmmode_output_create_resources(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr mode_output = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; drmModePropertyPtr drmmode_prop; uint32_t value; int i, j, err; drmmode_output->props = calloc(mode_output->count_props, sizeof(drmmode_prop_rec)); if (!drmmode_output->props) return; drmmode_output->num_props = 0; for (i = 0, j = 0; i < mode_output->count_props; i++) { drmmode_prop = drmModeGetProperty(drmmode->fd, mode_output->props[i]); if (drmmode_property_ignore(drmmode_prop)) { drmModeFreeProperty(drmmode_prop); continue; } drmmode_output->props[j].mode_prop = drmmode_prop; drmmode_output->props[j].index = i; drmmode_output->num_props++; j++; } for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; drmmode_prop = p->mode_prop; value = drmmode_output->mode_output->prop_values[p->index]; if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) { INT32 range[2]; p->num_atoms = 1; p->atoms = calloc(p->num_atoms, sizeof(Atom)); if (!p->atoms) continue; p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); range[0] = drmmode_prop->values[0]; range[1] = drmmode_prop->values[1]; err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], FALSE, TRUE, drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, 2, range); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_INTEGER, 32, PropModeReplace, 1, &value, FALSE, FALSE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) { p->num_atoms = drmmode_prop->count_enums + 1; p->atoms = calloc(p->num_atoms, sizeof(Atom)); if (!p->atoms) continue; p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); for (j = 1; j <= drmmode_prop->count_enums; j++) { struct drm_mode_property_enum *e = &drmmode_prop->enums[j-1]; p->atoms[j] = MakeAtom(e->name, strlen(e->name), TRUE); } err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], FALSE, FALSE, drmmode_prop->flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, p->num_atoms - 1, (INT32 *)&p->atoms[1]); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } for (j = 0; j < drmmode_prop->count_enums; j++) if (drmmode_prop->enums[j].value == value) break; /* there's always a matching value */ err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j+1], FALSE, FALSE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } } } static Bool drmmode_output_set_property(xf86OutputPtr output, Atom property, RRPropertyValuePtr value) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; int i, ret; for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; if (p->atoms[0] != property) continue; if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) { uint32_t val; if (value->type != XA_INTEGER || value->format != 32 || value->size != 1) return FALSE; val = *(uint32_t *)value->data; ret = drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, (uint64_t)val); if (ret) return FALSE; return TRUE; } else if (p->mode_prop->flags & DRM_MODE_PROP_ENUM) { Atom atom; const char *name; int j; if (value->type != XA_ATOM || value->format != 32 || value->size != 1) return FALSE; memcpy(&atom, value->data, 4); if (!(name = NameForAtom(atom))) return FALSE; /* search for matching name string, then set its value down */ for (j = 0; j < p->mode_prop->count_enums; j++) { if (!strcmp(p->mode_prop->enums[j].name, name)) { ret = drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, p->mode_prop->enums[j].value); if (ret) return FALSE; return TRUE; } } return FALSE; } } return TRUE; } static Bool drmmode_output_get_property(xf86OutputPtr output, Atom property) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; uint32_t value; int err, i; if (output->scrn->vtSema) { drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id); } if (!drmmode_output->mode_output) return FALSE; for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; if (p->atoms[0] != property) continue; value = drmmode_output->mode_output->prop_values[p->index]; if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) { err = RRChangeOutputProperty(output->randr_output, property, XA_INTEGER, 32, PropModeReplace, 1, &value, FALSE, FALSE); return !err; } else if (p->mode_prop->flags & DRM_MODE_PROP_ENUM) { int j; /* search for matching name string, then set its value down */ for (j = 0; j < p->mode_prop->count_enums; j++) { if (p->mode_prop->enums[j].value == value) break; } err = RRChangeOutputProperty(output->randr_output, property, XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j+1], FALSE, FALSE); return !err; } } return FALSE; } static const xf86OutputFuncsRec drmmode_output_funcs = { .create_resources = drmmode_output_create_resources, .dpms = drmmode_output_dpms, .detect = drmmode_output_detect, .mode_valid = drmmode_output_mode_valid, .get_modes = drmmode_output_get_modes, .set_property = drmmode_output_set_property, .get_property = drmmode_output_get_property, .destroy = drmmode_output_destroy }; static int subpixel_conv_table[7] = { 0, SubPixelUnknown, SubPixelHorizontalRGB, SubPixelHorizontalBGR, SubPixelVerticalRGB, SubPixelVerticalBGR, SubPixelNone }; const char *output_names[] = { "None", "VGA", "DVI-I", "DVI-D", "DVI-A", "Composite", "SVIDEO", "LVDS", "CTV", "DIN", "DP", "HDMI", "HDMI", "TV", "eDP", }; #define NUM_OUTPUT_NAMES (sizeof(output_names) / sizeof(output_names[0])) static Bool drmmode_zaphod_match(ScrnInfoPtr pScrn, const char *s, char *output_name) { int i = 0; char s1[20]; do { switch(*s) { case ',': s1[i] = '\0'; i = 0; if (strcmp(s1, output_name) == 0) return TRUE; break; case ' ': case '\t': case '\n': case '\r': break; default: s1[i] = *s; i++; break; } } while(*s++); s1[i] = '\0'; if (strcmp(s1, output_name) == 0) return TRUE; return FALSE; } static xf86OutputPtr find_output(ScrnInfoPtr pScrn, int id) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; if (drmmode_output->output_id == id) return output; } return NULL; } static int parse_path_blob(drmModePropertyBlobPtr path_blob, int *conn_base_id, char **path) { char *conn; char conn_id[5]; int id, len; char *blob_data; if (!path_blob) return -1; blob_data = path_blob->data; /* we only handle MST paths for now */ if (strncmp(blob_data, "mst:", 4)) return -1; conn = strchr(blob_data + 4, '-'); if (!conn) return -1; len = conn - (blob_data + 4); if (len + 1 > 5) return -1; memcpy(conn_id, blob_data + 4, len); conn_id[len] = '\0'; id = strtoul(conn_id, NULL, 10); *conn_base_id = id; *path = conn + 1; return 0; } static void drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name, drmModePropertyBlobPtr path_blob) { int ret; char *extra_path; int conn_id; xf86OutputPtr output; ret = parse_path_blob(path_blob, &conn_id, &extra_path); if (ret == -1) goto fallback; output = find_output(pScrn, conn_id); if (!output) goto fallback; snprintf(name, 32, "%s-%s", output->name, extra_path); return; fallback: if (koutput->connector_type >= ARRAY_SIZE(output_names)) snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id); else if (pScrn->is_gpu) snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id); else snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id); } static unsigned int drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num, Bool dynamic, int crtcshift) { NVPtr pNv = NVPTR(pScrn); xf86OutputPtr output; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); drmModeConnectorPtr koutput; drmModeEncoderPtr kencoder; drmmode_output_private_ptr drmmode_output; const char *s; char name[32]; drmModePropertyBlobPtr path_blob = NULL; int i; koutput = drmModeGetConnector(drmmode->fd, mode_res->connectors[num]); if (!koutput) return 0; path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH"); drmmode_create_name(pScrn, koutput, name, path_blob); if (path_blob) drmModeFreePropertyBlob(path_blob); if (path_blob && dynamic) { /* see if we have an output with this name already and hook stuff up */ for (i = 0; i < xf86_config->num_output; i++) { output = xf86_config->output[i]; if (strncmp(output->name, name, 32)) continue; drmmode_output = output->driver_private; drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->mode_output = koutput; return 1; } } kencoder = drmModeGetEncoder(drmmode->fd, koutput->encoders[0]); if (!kencoder) { drmModeFreeConnector(koutput); return 0; } if (xf86IsEntityShared(pScrn->entityList[0])) { s = xf86GetOptValString(pNv->Options, OPTION_ZAPHOD_HEADS); if (s) { if (!drmmode_zaphod_match(pScrn, s, name)) { drmModeFreeEncoder(kencoder); drmModeFreeConnector(koutput); return 0; } } else { if (pNv->Primary && (num != 0)) { drmModeFreeEncoder(kencoder); drmModeFreeConnector(koutput); return 0; } else if (pNv->Secondary && (num != 1)) { drmModeFreeEncoder(kencoder); drmModeFreeConnector(koutput); return 0; } } } output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name); if (!output) { drmModeFreeEncoder(kencoder); drmModeFreeConnector(koutput); return 0; } drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1); if (!drmmode_output) { xf86OutputDestroy(output); drmModeFreeConnector(koutput); drmModeFreeEncoder(kencoder); return 0; } drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->mode_output = koutput; drmmode_output->mode_encoder = kencoder; drmmode_output->drmmode = drmmode; output->mm_width = koutput->mmWidth; output->mm_height = koutput->mmHeight; output->subpixel_order = subpixel_conv_table[koutput->subpixel]; output->driver_private = drmmode_output; output->possible_crtcs = kencoder->possible_crtcs >> crtcshift; output->possible_clones = kencoder->possible_clones >> crtcshift; output->interlaceAllowed = true; output->doubleScanAllowed = true; if (dynamic) output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), output->name, strlen(output->name), output); return 1; } static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); ScreenPtr screen = xf86ScrnToScreen(scrn); NVPtr pNv = NVPTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = NULL; drmmode_ptr drmmode = NULL; uint32_t old_width, old_height, old_pitch, old_fb_id = 0; struct nouveau_bo *old_bo = NULL; int ret, i, pitch; PixmapPtr ppix; if (xf86_config->num_crtc) { drmmode_crtc = xf86_config->crtc[0]->driver_private; drmmode = drmmode_crtc->drmmode; } ErrorF("resize called %d %d\n", width, height); if (scrn->virtualX == width && scrn->virtualY == height) return TRUE; old_width = scrn->virtualX; old_height = scrn->virtualY; old_pitch = scrn->displayWidth; if (drmmode) old_fb_id = drmmode->fb_id; nouveau_bo_ref(pNv->scanout, &old_bo); nouveau_bo_ref(NULL, &pNv->scanout); ret = nouveau_allocate_surface(scrn, width, height, scrn->bitsPerPixel, NOUVEAU_CREATE_PIXMAP_SCANOUT, &pitch, &pNv->scanout); if (!ret) goto fail; scrn->virtualX = width; scrn->virtualY = height; scrn->displayWidth = pitch / (scrn->bitsPerPixel >> 3); nouveau_bo_map(pNv->scanout, NOUVEAU_BO_RDWR, pNv->client); if (drmmode) { ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth, scrn->bitsPerPixel, pitch, pNv->scanout->handle, &drmmode->fb_id); if (ret) goto fail; } if (pNv->ShadowPtr) { free(pNv->ShadowPtr); pNv->ShadowPitch = pitch; pNv->ShadowPtr = malloc(pNv->ShadowPitch * height); } ppix = screen->GetScreenPixmap(screen); if (pNv->AccelMethod > NONE) nouveau_bo_ref(pNv->scanout, &drmmode_pixmap(ppix)->bo); screen->ModifyPixmapHeader(ppix, width, height, -1, -1, pitch, (pNv->AccelMethod > NONE || pNv->ShadowPtr) ? pNv->ShadowPtr : pNv->scanout->map); if (pNv->AccelMethod == EXA) { pNv->EXADriverPtr->PrepareSolid(ppix, GXcopy, ~0, 0); pNv->EXADriverPtr->Solid(ppix, 0, 0, width, height); pNv->EXADriverPtr->DoneSolid(ppix); nouveau_bo_map(pNv->scanout, NOUVEAU_BO_RDWR, pNv->client); } else { memset(pNv->scanout->map, 0x00, pNv->scanout->size); } for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (!crtc->enabled) continue; drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); } if (old_fb_id) drmModeRmFB(drmmode->fd, old_fb_id); nouveau_bo_ref(NULL, &old_bo); return TRUE; fail: nouveau_bo_ref(old_bo, &pNv->scanout); scrn->virtualX = old_width; scrn->virtualY = old_height; scrn->displayWidth = old_pitch; if (drmmode) drmmode->fb_id = old_fb_id; return FALSE; } static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = { drmmode_xf86crtc_resize }; Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp) { drmmode_ptr drmmode; drmModeResPtr mode_res; NVEntPtr pNVEnt = NVEntPriv(pScrn); int i; unsigned int crtcs_needed = 0; int crtcshift; drmmode = XNFcallocarray(sizeof(*drmmode), 1); drmmode->fd = fd; drmmode->fb_id = 0; xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs); drmmode->cpp = cpp; mode_res = drmModeGetResources(drmmode->fd); if (!mode_res) return FALSE; xf86CrtcSetSizeRange(pScrn, 320, 200, mode_res->max_width, mode_res->max_height); if (!mode_res->count_connectors || !mode_res->count_crtcs) { free(drmmode); goto done; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing outputs ...\n"); crtcshift = ffs(pNVEnt->assigned_crtcs ^ 0xffffffff) - 1; for (i = 0; i < mode_res->count_connectors; i++) crtcs_needed += drmmode_output_init(pScrn, drmmode, mode_res, i, FALSE, crtcshift); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%d crtcs needed for screen.\n", crtcs_needed); for (i = 0; i < mode_res->count_crtcs; i++) { if (!xf86IsEntityShared(pScrn->entityList[0]) || (crtcs_needed && !(pNVEnt->assigned_crtcs & (1 << i)))) crtcs_needed -= drmmode_crtc_init(pScrn, drmmode, mode_res, i); } /* All ZaphodHeads outputs provided with matching crtcs? */ if (xf86IsEntityShared(pScrn->entityList[0]) && (crtcs_needed > 0)) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%d ZaphodHeads crtcs unavailable. Trouble!\n", crtcs_needed); done: drmModeFreeResources(mode_res); #ifdef NOUVEAU_PIXMAP_SHARING xf86ProviderSetup(pScrn, NULL, "nouveau"); #endif xf86InitialConfiguration(pScrn, TRUE); return TRUE; } void drmmode_adjust_frame(ScrnInfoPtr scrn, int x, int y) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86OutputPtr output = config->output[config->compat_output]; xf86CrtcPtr crtc = output->crtc; if (!crtc || !crtc->enabled) return; drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, x, y); } void drmmode_remove_fb(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc = NULL; drmmode_crtc_private_ptr drmmode_crtc; drmmode_ptr drmmode; if (config && config->num_crtc) crtc = config->crtc[0]; if (!crtc) return; drmmode_crtc = crtc->driver_private; drmmode = drmmode_crtc->drmmode; if (drmmode->fb_id) drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = 0; } int drmmode_cursor_init(ScreenPtr pScreen) { NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen)); int size = nv_cursor_width(pNv); int flags = HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 | (pNv->dev->chipset >= 0x11 ? HARDWARE_CURSOR_ARGB : 0) | HARDWARE_CURSOR_UPDATE_UNHIDDEN; return xf86_cursors_init(pScreen, size, size, flags); } #ifdef HAVE_LIBUDEV #define DRM_MODE_LINK_STATUS_GOOD 0 #define DRM_MODE_LINK_STATUS_BAD 1 static void drmmode_handle_uevents(ScrnInfoPtr scrn) { struct udev_device *dev; drmmode_ptr drmmode = drmmode_from_scrn(scrn); drmModeResPtr mode_res; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i, j; Bool found = FALSE; Bool changed = FALSE; while ((dev = udev_monitor_receive_device(drmmode->uevent_monitor))) { udev_device_unref(dev); found = TRUE; } if (!found) return; /* Try to re-set the mode on all the connectors with a BAD link-state: * This may happen if a link degrades and a new modeset is necessary, using * different link-training parameters. If the kernel found that the current * mode is not achievable anymore, it should have pruned the mode before * sending the hotplug event. Try to re-set the currently-set mode to keep * the display alive, this will fail if the mode has been pruned. * In any case, we will send randr events for the Desktop Environment to * deal with it, if it wants to. */ for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; xf86CrtcPtr crtc = output->crtc; drmmode_output_private_ptr drmmode_output = output->driver_private; uint32_t con_id, idx; drmModeConnectorPtr koutput; if (crtc == NULL || drmmode_output->mode_output == NULL) continue; con_id = drmmode_output->mode_output->connector_id; /* Get an updated view of the properties for the current connector and * look for the link-status property */ koutput = drmModeGetConnectorCurrent(drmmode->fd, con_id); if (!koutput) continue; idx = koutput_get_prop_idx(drmmode->fd, koutput, DRM_MODE_PROP_ENUM, "link-status"); if ((idx > -1) && (koutput->prop_values[idx] == DRM_MODE_LINK_STATUS_BAD)) { /* the connector got a link failure, re-set the current mode */ drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); xf86DrvMsg(scrn->scrnIndex, X_WARNING, "hotplug event: connector %u's link-state is BAD, " "tried resetting the current mode. You may be left" "with a black screen if this fails...\n", con_id); } drmModeFreeConnector(koutput); } mode_res = drmModeGetResources(drmmode->fd); if (!mode_res) goto out; if (mode_res->count_crtcs != config->num_crtc) { ErrorF("number of CRTCs changed - failed to handle, %d vs %d\n", mode_res->count_crtcs, config->num_crtc); goto out_free_res; } /* figure out if we have gotten rid of any connectors traverse old output list looking for outputs */ for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; found = FALSE; for (j = 0; j < mode_res->count_connectors; j++) { if (mode_res->connectors[j] == drmmode_output->output_id) { found = TRUE; break; } } if (found) continue; drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = NULL; drmmode_output->output_id = -1; changed = TRUE; } /* find new output ids we don't have outputs for */ for (i = 0; i < mode_res->count_connectors; i++) { found = FALSE; for (j = 0; j < config->num_output; j++) { xf86OutputPtr output = config->output[j]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; if (mode_res->connectors[i] == drmmode_output->output_id) { found = TRUE; break; } } if (found) continue; changed = TRUE; drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0); } if (changed) { RRSetChanged(xf86ScrnToScreen(scrn)); RRTellChanged(xf86ScrnToScreen(scrn)); } out_free_res: drmModeFreeResources(mode_res); out: RRGetInfo(xf86ScrnToScreen(scrn), TRUE); } #undef DRM_MODE_LINK_STATUS_BAD #undef DRM_MODE_LINK_STATUS_GOOD #endif #if HAVE_NOTIFY_FD static void drmmode_udev_notify(int fd, int notify, void *data) { ScrnInfoPtr scrn = data; drmmode_handle_uevents(scrn); } #endif static bool has_randr(void) { return dixPrivateKeyRegistered(rrPrivKey); } static void drmmode_uevent_init(ScrnInfoPtr scrn) { #ifdef HAVE_LIBUDEV drmmode_ptr drmmode = drmmode_from_scrn(scrn); struct udev *u; struct udev_monitor *mon; /* RandR will be disabled if Xinerama is active, and so generating * RR hotplug events is then forbidden. */ if (!has_randr()) return; u = udev_new(); if (!u) return; mon = udev_monitor_new_from_netlink(u, "udev"); if (!mon) { udev_unref(u); return; } if (udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", "drm_minor") < 0 || udev_monitor_enable_receiving(mon) < 0) { udev_monitor_unref(mon); udev_unref(u); return; } #if HAVE_NOTIFY_FD SetNotifyFd(udev_monitor_get_fd(mon), drmmode_udev_notify, X_NOTIFY_READ, scrn); #else AddGeneralSocket(udev_monitor_get_fd(mon)); #endif drmmode->uevent_monitor = mon; #endif } static void drmmode_uevent_fini(ScrnInfoPtr scrn) { #ifdef HAVE_LIBUDEV drmmode_ptr drmmode = drmmode_from_scrn(scrn); if (drmmode->uevent_monitor) { struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor); #if HAVE_NOTIFY_FD RemoveNotifyFd(udev_monitor_get_fd(drmmode->uevent_monitor)); #else RemoveGeneralSocket(udev_monitor_get_fd(drmmode->uevent_monitor)); #endif udev_monitor_unref(drmmode->uevent_monitor); udev_unref(u); } #endif } #if HAVE_NOTIFY_FD static void drmmode_notify_fd(int fd, int notify, void *data) { ScrnInfoPtr scrn = data; drmmode_ptr drmmode = drmmode_from_scrn(scrn); drmHandleEvent(drmmode->fd, &drmmode->event_context); } #else static void drmmode_wakeup_handler(pointer data, int err, pointer p) { ScrnInfoPtr scrn = data; drmmode_ptr drmmode = drmmode_from_scrn(scrn); fd_set *read_mask = p; if (scrn == NULL || err < 0) return; if (FD_ISSET(drmmode->fd, read_mask)) drmHandleEvent(drmmode->fd, &drmmode->event_context); #ifdef HAVE_LIBUDEV if (FD_ISSET(udev_monitor_get_fd(drmmode->uevent_monitor), read_mask)) drmmode_handle_uevents(scrn); #endif } #endif void drmmode_screen_init(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); drmmode_ptr drmmode = drmmode_from_scrn(scrn); NVEntPtr pNVEnt = NVEntPriv(scrn); /* Setup handler for DRM events */ drmmode_event_init(scrn); /* Setup handler for udevevents */ drmmode_uevent_init(scrn); /* Register wakeup handler only once per servergen, so ZaphodHeads work */ if (pNVEnt->fd_wakeup_registered != serverGeneration) { /* Register a wakeup handler to get informed on DRM events */ #if HAVE_NOTIFY_FD SetNotifyFd(drmmode->fd, drmmode_notify_fd, X_NOTIFY_READ, scrn); #else AddGeneralSocket(drmmode->fd); RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, drmmode_wakeup_handler, scrn); #endif pNVEnt->fd_wakeup_registered = serverGeneration; pNVEnt->fd_wakeup_ref = 1; } else pNVEnt->fd_wakeup_ref++; } void drmmode_screen_fini(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); drmmode_ptr drmmode = drmmode_from_scrn(scrn); NVEntPtr pNVEnt = NVEntPriv(scrn); /* Unregister wakeup handler after last x-screen for this servergen dies. */ if (pNVEnt->fd_wakeup_registered == serverGeneration && !--pNVEnt->fd_wakeup_ref) { #if HAVE_NOTIFY_FD RemoveNotifyFd(drmmode->fd); #else /* Unregister wakeup handler */ RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, drmmode_wakeup_handler, scrn); RemoveGeneralSocket(drmmode->fd); #endif } /* Tear down udev event handler */ drmmode_uevent_fini(scrn); /* Tear down DRM event handler */ drmmode_event_fini(scrn); } xf86-video-nouveau-1.0.18/src/nv50_xv.c0000644000175000017500000003266614713424663013130 /* * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" #include "nv50_accel.h" extern Atom xvSyncToVBlank, xvSetDefaults; extern Atom xvBrightness, xvContrast, xvHue, xvSaturation; extern Atom xvITURBT709; static Bool nv50_xv_check_image_put(PixmapPtr ppix) { switch (ppix->drawable.bitsPerPixel) { case 32: case 24: case 16: case 15: break; default: return FALSE; } if (!nv50_style_tiled_pixmap(ppix)) return FALSE; return TRUE; } int nv50_xv_image_put(ScrnInfoPtr pScrn, struct nouveau_bo *src, int packed_y, int uv, int id, int src_pitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, uint16_t width, uint16_t height, uint16_t src_w, uint16_t src_h, uint16_t drw_w, uint16_t drw_h, RegionPtr clipBoxes, PixmapPtr ppix, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); struct nouveau_bo *dst = nouveau_pixmap_bo(ppix); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_pushbuf_refn refs[] = { { pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR }, { src, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD }, { dst, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR }, }; uint32_t mode = 0xd0005000 | (src->config.nv50.tile_mode << 18); float X1, X2, Y1, Y2; BoxPtr pbox; int nbox; if (!nv50_xv_check_image_put(ppix)) return BadMatch; if (!PUSH_SPACE(push, 256)) return BadImplementation; BEGIN_NV04(push, NV50_3D(RT_ADDRESS_HIGH(0)), 5); PUSH_DATA (push, dst->offset >> 32); PUSH_DATA (push, dst->offset); switch (ppix->drawable.depth) { case 32: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGRA8_UNORM); break; case 30: PUSH_DATA (push, NV50_SURFACE_FORMAT_RGB10_A2_UNORM); break; case 24: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGRX8_UNORM); break; case 16: PUSH_DATA (push, NV50_SURFACE_FORMAT_B5G6R5_UNORM); break; case 15: PUSH_DATA (push, NV50_SURFACE_FORMAT_BGR5_X1_UNORM); break; } PUSH_DATA (push, dst->config.nv50.tile_mode); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_3D(RT_HORIZ(0)), 2); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); BEGIN_NV04(push, NV50_3D(RT_ARRAY_MODE), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 0); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET, 16); if (id == FOURCC_YV12 || id == FOURCC_I420) { PUSH_DATA (push, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8); PUSH_DATA (push, (src->offset + packed_y)); PUSH_DATA (push, (src->offset + packed_y) >> 32 | mode); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, width); PUSH_DATA (push, (1 << NV50TIC_0_5_DEPTH_SHIFT) | height); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8); PUSH_DATA (push, (src->offset + uv)); PUSH_DATA (push, (src->offset + uv) >> 32 | mode); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, width >> 1); PUSH_DATA (push, (1 << NV50TIC_0_5_DEPTH_SHIFT) | (height >> 1)); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); } else { if (id == FOURCC_UYVY) { PUSH_DATA (push, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8); } else { PUSH_DATA (push, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8); } PUSH_DATA (push, (src->offset + packed_y)); PUSH_DATA (push, (src->offset + packed_y) >> 32 | mode); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, width); PUSH_DATA (push, (1 << NV50TIC_0_5_DEPTH_SHIFT) | height); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); if (id == FOURCC_UYVY) { PUSH_DATA (push, NV50TIC_0_0_MAPA_C2 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8_8_8); } else { PUSH_DATA (push, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C1 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8_8_8); } PUSH_DATA (push, (src->offset + packed_y)); PUSH_DATA (push, (src->offset + packed_y) >> 32 | mode); PUSH_DATA (push, 0x00300000); PUSH_DATA (push, (width >> 1)); PUSH_DATA (push, (1 << NV50TIC_0_5_DEPTH_SHIFT) | height); PUSH_DATA (push, 0x03000000); PUSH_DATA (push, 0x00000000); } PUSH_DATAu(push, pNv->scratch, TSC_OFFSET, 16); PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE); PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE); PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV50_3D(FP_START_ID), 1); PUSH_DATA (push, PFP_NV12); BEGIN_NV04(push, NV50_3D(TIC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV50_3D(BIND_TIC(2)), 1); PUSH_DATA (push, 1); BEGIN_NV04(push, NV50_3D(BIND_TIC(2)), 1); PUSH_DATA (push, 0x203); PUSH_DATAu(push, pNv->scratch, PVP_DATA, 11); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0 / width); PUSH_DATAf(push, 1.0 / height); if (pPriv->SyncToVBlank) NV50SyncToVBlank(ppix, dstBox); /* These are fixed point values in the 16.16 format. */ X1 = (float)(x1>>16)+(float)(x1&0xFFFF)/(float)0x10000; Y1 = (float)(y1>>16)+(float)(y1&0xFFFF)/(float)0x10000; X2 = (float)(x2>>16)+(float)(x2&0xFFFF)/(float)0x10000; Y2 = (float)(y2>>16)+(float)(y2&0xFFFF)/(float)0x10000; pbox = REGION_RECTS(clipBoxes); nbox = REGION_NUM_RECTS(clipBoxes); while(nbox--) { float tx1=X1+(float)(pbox->x1 - dstBox->x1)*(X2-X1)/(float)(drw_w); float tx2=X1+(float)(pbox->x2 - dstBox->x1)*(src_w)/(float)(drw_w); float ty1=Y1+(float)(pbox->y1 - dstBox->y1)*(Y2-Y1)/(float)(drw_h); float ty2=Y1+(float)(pbox->y2 - dstBox->y1)*(src_h)/(float)(drw_h); int sx1=pbox->x1; int sx2=pbox->x2; int sy1=pbox->y1; int sy2=pbox->y2; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, refs, 3)) return BadImplementation; /* NV50_3D_SCISSOR_VERT_T_SHIFT is wrong, because it was deducted with * origin lying at the bottom left. This will be changed to _MIN_ and _MAX_ * later, because it is origin dependent. */ BEGIN_NV04(push, NV50_3D(SCISSOR_HORIZ(0)), 2); PUSH_DATA (push, sx2 << NV50_3D_SCISSOR_HORIZ_MAX__SHIFT | sx1); PUSH_DATA (push, sy2 << NV50_3D_SCISSOR_VERT_MAX__SHIFT | sy1 ); BEGIN_NV04(push, NV50_3D(VERTEX_BEGIN_GL), 1); PUSH_DATA (push, NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES); PUSH_VTX1s(push, tx1, ty1, sx1, sy1); PUSH_VTX1s(push, tx2+(tx2-tx1), ty1, sx2+(sx2-sx1), sy1); PUSH_VTX1s(push, tx1, ty2+(ty2-ty1), sx1, sy2+(sy2-sy1)); BEGIN_NV04(push, NV50_3D(VERTEX_END_GL), 1); PUSH_DATA (push, 0); pbox++; } PUSH_KICK(push); return Success; } void nv50_xv_video_stop(ScrnInfoPtr pScrn, pointer data, Bool exit) { } /* Reference color space transform data */ struct REF_TRANSFORM { float RefLuma; float RefRCb; float RefRCr; float RefGCb; float RefGCr; float RefBCb; float RefBCr; } trans[] = { { 1.1643, 0.0, 1.5960, -0.3918, -0.8129, 2.0172, 0.0 }, /* BT.601 */ { 1.1643, 0.0, 1.7927, -0.2132, -0.5329, 2.1124, 0.0 } /* BT.709 */ }; #define RTFSaturation(a) (1.0 + ((a)*1.0)/1000.0) #define RTFBrightness(a) (((a)*1.0)/2000.0) #define RTFContrast(a) (1.0 + ((a)*1.0)/1000.0) #define RTFHue(a) (((a)*3.1416)/1000.0) void nv50_xv_csc_update(ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; const float Loff = -0.0627; const float Coff = -0.502; float yco, off[3], uco[3], vco[3]; float uvcosf, uvsinf; float bright, cont; int ref = pPriv->iturbt_709; cont = RTFContrast(pPriv->contrast); bright = RTFBrightness(pPriv->brightness); uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); yco = trans[ref].RefLuma * cont; uco[0] = -trans[ref].RefRCr * uvsinf; uco[1] = trans[ref].RefGCb * uvcosf - trans[ref].RefGCr * uvsinf; uco[2] = trans[ref].RefBCb * uvcosf; vco[0] = trans[ref].RefRCr * uvcosf; vco[1] = trans[ref].RefGCb * uvsinf + trans[ref].RefGCr * uvcosf; vco[2] = trans[ref].RefBCb * uvsinf; off[0] = Loff * yco + Coff * (uco[0] + vco[0]) + bright; off[1] = Loff * yco + Coff * (uco[1] + vco[1]) + bright; off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright; if (pNv->Architecture >= NV_FERMI) { nvc0_xv_csc_update(pNv, yco, off, uco, vco); return; } if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, &(struct nouveau_pushbuf_refn) { pNv->scratch, NOUVEAU_BO_WR | NOUVEAU_BO_VRAM }, 1)) return; PUSH_DATAu(push, pNv->scratch, PFP_DATA, 10); PUSH_DATAf(push, yco); PUSH_DATAf(push, off[0]); PUSH_DATAf(push, off[1]); PUSH_DATAf(push, off[2]); PUSH_DATAf(push, uco[0]); PUSH_DATAf(push, uco[1]); PUSH_DATAf(push, uco[2]); PUSH_DATAf(push, vco[0]); PUSH_DATAf(push, vco[1]); PUSH_DATAf(push, vco[2]); } void nv50_xv_set_port_defaults(ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) { pPriv->videoStatus = 0; pPriv->grabbedByV4L = FALSE; pPriv->blitter = FALSE; pPriv->texture = TRUE; pPriv->doubleBuffer = FALSE; pPriv->SyncToVBlank = TRUE; pPriv->brightness = 0; pPriv->contrast = 0; pPriv->saturation = 0; pPriv->hue = 0; pPriv->iturbt_709 = 0; pPriv->max_image_dim = 8192; } int nv50_xv_port_attribute_set(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvSyncToVBlank) { if (value < 0 || value > 1) return BadValue; pPriv->SyncToVBlank = value; } else if (attribute == xvBrightness) { if (value < -1000 || value > 1000) return BadValue; pPriv->brightness = value; } else if (attribute == xvContrast) { if (value < -1000 || value > 1000) return BadValue; pPriv->contrast = value; } else if (attribute == xvSaturation) { if (value < -1000 || value > 1000) return BadValue; pPriv->saturation = value; } else if (attribute == xvHue) { if (value < -1000 || value > 1000) return BadValue; pPriv->hue = value; } else if (attribute == xvITURBT709) { if (value < 0 || value > 1) return BadValue; pPriv->iturbt_709 = value; } else if (attribute == xvSetDefaults) { nv50_xv_set_port_defaults(pScrn, pPriv); } else return BadMatch; nv50_xv_csc_update(pScrn, pPriv); return Success; } int nv50_xv_port_attribute_get(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvSyncToVBlank) *value = (pPriv->SyncToVBlank) ? 1 : 0; else if (attribute == xvBrightness) *value = pPriv->brightness; else if (attribute == xvContrast) *value = pPriv->contrast; else if (attribute == xvSaturation) *value = pPriv->saturation; else if (attribute == xvHue) *value = pPriv->hue; else if (attribute == xvITURBT709) *value = pPriv->iturbt_709; else return BadMatch; return Success; } xf86-video-nouveau-1.0.18/src/nv40_xv_tex.c0000644000175000017500000002675314713424663014007 /* * Copyright 2007-2008 Maarten Maathuis * Copyright 2008 Stephane Marchesin * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" #include "hwdefs/nv30-40_3d.xml.h" #include "nv04_accel.h" extern Atom xvSyncToVBlank, xvSetDefaults; #define SWIZZLE(ts0x,ts0y,ts0z,ts0w,ts1x,ts1y,ts1z,ts1w) ( \ NV30_3D_TEX_SWIZZLE_S0_X_##ts0x | NV30_3D_TEX_SWIZZLE_S0_Y_##ts0y | \ NV30_3D_TEX_SWIZZLE_S0_Z_##ts0z | NV30_3D_TEX_SWIZZLE_S0_W_##ts0w | \ NV30_3D_TEX_SWIZZLE_S1_X_##ts1x | NV30_3D_TEX_SWIZZLE_S1_Y_##ts1y | \ NV30_3D_TEX_SWIZZLE_S1_Z_##ts1z | NV30_3D_TEX_SWIZZLE_S1_W_##ts1w \ ) /* * Texture 0 : filter table * Texture 1 : Y data * Texture 2 : UV data */ static Bool NV40VideoTexture(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, uint16_t width, uint16_t height, uint16_t src_pitch, int unit) { NVPtr pNv = NVPTR(pScrn); unsigned reloc = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_RD; struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t card_fmt = 0; uint32_t card_swz = 0; switch(unit) { case 0: card_fmt = NV40_3D_TEX_FORMAT_FORMAT_A8R8G8B8; card_swz = SWIZZLE(S1, S1, S1, S1, X, Y, Z, W); break; case 1: card_fmt = NV40_3D_TEX_FORMAT_FORMAT_L8; card_swz = SWIZZLE(S1, S1, S1, S1, X, X, X, X); break; case 2: card_fmt = NV40_3D_TEX_FORMAT_FORMAT_A8L8; #if X_BYTE_ORDER == X_BIG_ENDIAN card_swz = SWIZZLE(S1, S1, S1, S1, Z, W, X, Y); #else card_swz = SWIZZLE(S1, S1, S1, S1, W, Z, Y, X); #endif break; } BEGIN_NV04(push, NV30_3D(TEX_OFFSET(unit)), 8); PUSH_MTHDl(push, NV30_3D(TEX_OFFSET(unit)), src, offset, reloc); if (unit==0) { PUSH_MTHDs(push, NV30_3D(TEX_FORMAT(unit)), src, card_fmt | 0x8000 | NV30_3D_TEX_FORMAT_DIMS_1D | NV30_3D_TEX_FORMAT_NO_BORDER | (1 << NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT), reloc | NOUVEAU_BO_OR, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); PUSH_DATA (push, NV30_3D_TEX_WRAP_S_REPEAT | NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE); } else { PUSH_MTHDs(push, NV30_3D(TEX_FORMAT(unit)), src, card_fmt | 0x8000 | NV40_3D_TEX_FORMAT_LINEAR | NV40_3D_TEX_FORMAT_RECT | NV30_3D_TEX_FORMAT_DIMS_2D | NV30_3D_TEX_FORMAT_NO_BORDER | (1 << NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT), reloc | NOUVEAU_BO_OR, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); PUSH_DATA (push, NV30_3D_TEX_WRAP_S_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE); } PUSH_DATA (push, NV40_3D_TEX_ENABLE_ENABLE); PUSH_DATA (push, card_swz); if (unit == 0) PUSH_DATA (push, NV30_3D_TEX_FILTER_SIGNED_ALPHA | NV30_3D_TEX_FILTER_SIGNED_RED | NV30_3D_TEX_FILTER_SIGNED_GREEN | NV30_3D_TEX_FILTER_SIGNED_BLUE | NV30_3D_TEX_FILTER_MIN_LINEAR | NV30_3D_TEX_FILTER_MAG_LINEAR | 0x3fd6); else PUSH_DATA (push, NV30_3D_TEX_FILTER_MIN_LINEAR | NV30_3D_TEX_FILTER_MAG_LINEAR | 0x3fd6); PUSH_DATA (push, (width << 16) | height); PUSH_DATA (push, 0); /* border ARGB */ BEGIN_NV04(push, NV40_3D(TEX_SIZE1(unit)), 1); PUSH_DATA (push, (1 << NV40_3D_TEX_SIZE1_DEPTH__SHIFT) | (uint16_t) src_pitch); return TRUE; } static Bool NV40GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) { switch (ppix->drawable.bitsPerPixel) { case 32: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_A8R8G8B8; break; case 24: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_X8R8G8B8; break; case 16: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_R5G6B5; break; case 8: *fmt_ret = NV30_3D_RT_FORMAT_COLOR_B8; break; default: return FALSE; } return TRUE; } void NV40StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) { } #define VERTEX_OUT(sx,sy,dx,dy) do { \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2F_X(8)), 4); \ PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy)); \ PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0); \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); \ PUSH_DATA (push, (((dy)&0xffff)<<16)|((dx)&0xffff)); \ } while(0) int NV40PutTextureImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset, int src_offset2, int id, int src_pitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, uint16_t width, uint16_t height, uint16_t src_w, uint16_t src_h, uint16_t drw_w, uint16_t drw_h, RegionPtr clipBoxes, PixmapPtr ppix, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); Bool bicubic = pPriv->bicubic; float X1, X2, Y1, Y2; BoxPtr pbox; int nbox, i; int dst_format = 0; if (drw_w > 4096 || drw_h > 4096) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "XV: Draw size too large.\n"); return BadAlloc; } if (!NV40GetSurfaceFormat(ppix, &dst_format)) { ErrorF("No surface format, bad.\n"); return BadImplementation; } pbox = REGION_RECTS(clipBoxes); nbox = REGION_NUM_RECTS(clipBoxes); if (!PUSH_SPACE(push, 128)) return BadImplementation; PUSH_RESET(push); BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(RT_FORMAT), 3); PUSH_DATA (push, NV30_3D_RT_FORMAT_TYPE_LINEAR | NV30_3D_RT_FORMAT_ZETA_Z24S8 | dst_format); PUSH_DATA (push, exaGetPixmapPitch(ppix)); PUSH_MTHDl(push, NV30_3D(COLOR0_OFFSET), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); if (!NV40VideoTexture(pScrn, pNv->scratch, XV_TABLE, XV_TABLE_SIZE, 1, 0, 0) || !NV40VideoTexture(pScrn, src, src_offset, src_w, src_h, src_pitch, 1)) { PUSH_RESET(push); return BadImplementation; } /* We've got NV12 format, which means half width and half height * texture of chroma channels. */ if (!NV40VideoTexture(pScrn, src, src_offset2, src_w/2, src_h/2, src_pitch, 2)) { PUSH_RESET(push); return BadImplementation; } if (drw_w / 2 < src_w || drw_h / 2 < src_h) bicubic = FALSE; BEGIN_NV04(push, NV30_3D(FP_ACTIVE_PROGRAM), 1); PUSH_MTHD (push, NV30_3D(FP_ACTIVE_PROGRAM), pNv->scratch, bicubic ? PFP_NV12_BICUBIC : PFP_NV12_BILINEAR, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR, NV30_3D_FP_ACTIVE_PROGRAM_DMA0, NV30_3D_FP_ACTIVE_PROGRAM_DMA1); BEGIN_NV04(push, NV30_3D(FP_CONTROL), 1); PUSH_DATA (push, 0x04000000); /* Appears to be some kind of cache flush, needed here at least * sometimes.. funky text rendering otherwise :) */ BEGIN_NV04(push, NV40_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV40_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 1); for (i = 0; i < 2; i++) { BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 17); PUSH_DATA (push, i * 4); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); } nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return BadAlloc; } /* Before rendering we wait for vblank in the non-composited case. */ if (pPriv->SyncToVBlank) NV11SyncToVBlank(ppix, dstBox); /* These are fixed point values in the 16.16 format. */ X1 = (float)(x1>>16)+(float)(x1&0xFFFF)/(float)0x10000; Y1 = (float)(y1>>16)+(float)(y1&0xFFFF)/(float)0x10000; X2 = (float)(x2>>16)+(float)(x2&0xFFFF)/(float)0x10000; Y2 = (float)(y2>>16)+(float)(y2&0xFFFF)/(float)0x10000; BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_TRIANGLES); while(nbox--) { float tx1=X1+(float)(pbox->x1 - dstBox->x1)*(X2-X1)/(float)(drw_w); float tx2=X1+(float)(pbox->x2 - dstBox->x1)*(src_w)/(float)(drw_w); float ty1=Y1+(float)(pbox->y1 - dstBox->y1)*(Y2-Y1)/(float)(drw_h); float ty2=Y1+(float)(pbox->y2 - dstBox->y1)*(src_h)/(float)(drw_h); int sx1=pbox->x1; int sx2=pbox->x2; int sy1=pbox->y1; int sy2=pbox->y2; if (!PUSH_SPACE(push, 64)) { nouveau_pushbuf_bufctx(push, NULL); return BadImplementation; } BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, (sx2 << 16) | 0); PUSH_DATA (push, (sy2 << 16) | 0); VERTEX_OUT(tx1, ty1, sx1, sy1); VERTEX_OUT(tx2+(tx2-tx1), ty1, sx2+(sx2-sx1), sy1); VERTEX_OUT(tx1, ty2+(ty2-ty1), sx1, sy2+(sy2-sy1)); pbox++; } BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_STOP); nouveau_pushbuf_bufctx(push, NULL); PUSH_KICK(push); return Success; } /** * NV40SetTexturePortAttribute * sets the attribute "attribute" of port "data" to value "value" * supported attributes: * Sync to vblank. * * @param pScrenInfo * @param attribute attribute to set * @param value value to which attribute is to be set * @param data port from which the attribute is to be set * * @return Success, if setting is successful * BadValue/BadMatch, if value/attribute are invalid */ int NV40SetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvSyncToVBlank) { if ((value < 0) || (value > 1)) return BadValue; pPriv->SyncToVBlank = value; } else if (attribute == xvSetDefaults) { pPriv->SyncToVBlank = TRUE; } else return BadMatch; return Success; } /** * NV40GetTexturePortAttribute * reads the value of attribute "attribute" from port "data" into INT32 "*value" * Sync to vblank. * * @param pScrn unused * @param attribute attribute to be read * @param value value of attribute will be stored here * @param data port from which attribute will be read * @return Success, if queried attribute exists */ int NV40GetTexturePortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if(attribute == xvSyncToVBlank) *value = (pPriv->SyncToVBlank) ? 1 : 0; else return BadMatch; return Success; } xf86-video-nouveau-1.0.18/src/nv04_accel.h0000644000175000017500000000646214713424663013541 #ifndef __NV04_ACCEL_H__ #define __NV04_ACCEL_H__ #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv01_2d.xml.h" #define XV_TABLE_SIZE 512 /* scratch buffer offsets */ #define PFP_PASS 0x00000000 #define PFP_S 0x00000100 #define PFP_C 0x00000200 #define PFP_CCA 0x00000300 #define PFP_CCASA 0x00000400 #define PFP_S_A8 0x00000500 #define PFP_C_A8 0x00000600 #define PFP_NV12_BILINEAR 0x00000700 #define PFP_NV12_BICUBIC 0x00000800 #define XV_TABLE 0x00001000 #define SOLID(i) (0x00002000 + (i) * 0x100) /* subchannel assignments */ #define SUBC_M2MF(mthd) 0, (mthd) #define NV03_M2MF(mthd) SUBC_M2MF(NV03_M2MF_##mthd) #define SUBC_NVSW(mthd) 1, (mthd) #define SUBC_SF2D(mthd) 2, (mthd) #define NV04_SF2D(mthd) SUBC_SF2D(NV04_SURFACE_2D_##mthd) #define NV10_SF2D(mthd) SUBC_SF2D(NV10_SURFACE_2D_##mthd) #define SUBC_RECT(mthd) 3, (mthd) #define NV04_RECT(mthd) SUBC_RECT(NV04_GDI_##mthd) #define SUBC_BLIT(mthd) 4, (mthd) #define NV01_BLIT(mthd) SUBC_BLIT(NV01_BLIT_##mthd) #define NV04_BLIT(mthd) SUBC_BLIT(NV04_BLIT_##mthd) #define NV15_BLIT(mthd) SUBC_BLIT(NV15_BLIT_##mthd) #define SUBC_IFC(mthd) 5, (mthd) #define NV01_IFC(mthd) SUBC_IFC(NV01_IFC_##mthd) #define NV04_IFC(mthd) SUBC_IFC(NV04_IFC_##mthd) #define SUBC_MISC(mthd) 6, (mthd) #define NV03_SIFM(mthd) SUBC_MISC(NV03_SIFM_##mthd) #define NV05_SIFM(mthd) SUBC_MISC(NV05_SIFM_##mthd) #define NV01_BETA(mthd) SUBC_MISC(NV01_BETA_##mthd) #define NV04_BETA4(mthd) SUBC_MISC(NV04_BETA4_##mthd) #define NV01_PATT(mthd) SUBC_MISC(NV01_PATTERN_##mthd) #define NV04_PATT(mthd) SUBC_MISC(NV04_PATTERN_##mthd) #define NV01_ROP(mthd) SUBC_MISC(NV01_ROP_##mthd) #define NV01_CLIP(mthd) SUBC_MISC(NV01_CLIP_##mthd) #define SUBC_3D(mthd) 7, (mthd) #define NV10_3D(mthd) SUBC_3D(NV10_3D_##mthd) #define NV30_3D(mthd) SUBC_3D(NV30_3D_##mthd) #define NV40_3D(mthd) SUBC_3D(NV40_3D_##mthd) static __inline__ void PUSH_DATAu(struct nouveau_pushbuf *push, struct nouveau_bo *bo, unsigned delta, unsigned dwords) { const uint32_t domain = NOUVEAU_BO_VRAM | NOUVEAU_BO_WR; struct nouveau_pushbuf_refn refs[] = { { bo, domain } }; unsigned pitch = ((dwords * 4) + 63) & ~63; if (nouveau_pushbuf_space(push, 32 + dwords, 2, 0) || nouveau_pushbuf_refn (push, refs, 1)) return; BEGIN_NV04(push, NV01_SUBC(MISC, OBJECT), 1); PUSH_DATA (push, NvClipRectangle); BEGIN_NV04(push, NV01_CLIP(POINT), 2); PUSH_DATA (push, (0 << 16) | 0); PUSH_DATA (push, (1 << 16) | dwords); BEGIN_NV04(push, NV04_SF2D(FORMAT), 4); PUSH_DATA (push, NV04_SURFACE_2D_FORMAT_A8R8G8B8); PUSH_DATA (push, (pitch << 16) | pitch); PUSH_RELOC(push, bo, delta, NOUVEAU_BO_LOW, 0, 0); PUSH_RELOC(push, bo, delta, NOUVEAU_BO_LOW, 0, 0); BEGIN_NV04(push, NV01_IFC(OPERATION), 5); PUSH_DATA (push, NV01_IFC_OPERATION_SRCCOPY); PUSH_DATA (push, NV01_IFC_COLOR_FORMAT_A8R8G8B8); PUSH_DATA (push, (0 << 16) | 0); PUSH_DATA (push, (1 << 16) | dwords); PUSH_DATA (push, (1 << 16) | dwords); BEGIN_NV04(push, NV01_IFC(COLOR(0)), dwords); } /* For NV40 FP upload, deal with the weird-arse big-endian swap */ static __inline__ void PUSH_DATAs(struct nouveau_pushbuf *push, unsigned data) { #if (X_BYTE_ORDER != X_LITTLE_ENDIAN) data = (data >> 16) | ((data & 0xffff) << 16); #endif PUSH_DATA(push, data); } #endif xf86-video-nouveau-1.0.18/src/nv10_xv_ovl.c0000644000175000017500000002502314713424663013771 /* * Copyright 2007 Arthur Huillet * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" extern Atom xvBrightness, xvContrast, xvColorKey, xvSaturation; extern Atom xvHue, xvAutopaintColorKey, xvSetDefaults, xvDoubleBuffer; extern Atom xvITURBT709, xvSyncToVBlank, xvOnCRTCNb; /** * NV10PutOverlayImage * program hardware to overlay image into front buffer * * @param pScrn screen * @param offset card offset to the pixel data * @param id format of image * @param dstPitch pitch of the pixel data in VRAM * @param dstBox destination box * @param x1 first source point - x * @param y1 first source point - y * @param x2 second source point - x * @param y2 second source point - y * @param width width of the source image = x2 - x1 * @param height height * @param src_w width of the image data in VRAM * @param src_h height * @param drw_w width of the image to draw to screen * @param drw_h height * @param clipBoxes ??? */ void NV10PutOverlayImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int offset, int uvoffset, int id, int dstPitch, BoxPtr dstBox, int x1, int y1, int x2, int y2, short width, short height, short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); #ifdef NVOVL_SUPPORT int buffer = pPriv->currentBuffer; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc = xf86_config->crtc[pPriv->overlayCRTC]; if (crtc->mode.Flags & V_DBLSCAN) { dstBox->y1 <<= 1; dstBox->y2 <<= 1; drw_h <<= 1; } /* paint the color key */ if(pPriv->autopaintColorKey && (pPriv->grabbedByV4L || !REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes))) { /* we always paint V4L's color key */ if (!pPriv->grabbedByV4L) REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes); { xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes); } } //xf86DrvMsg(0, X_INFO, "SIZE_IN h %d w %d, POINT_IN x %d y %d, DS_DX %d DT_DY %d, POINT_OUT x %d y %d SIZE_OUT h %d w %d\n", height, width, x1 >> //16,y1>>16, (src_w << 20) / drw_w, (src_h << 20) / drw_h, (dstBox->x1),(dstBox->y1), (dstBox->y2 - dstBox->y1), (dstBox->x2 - dstBox->x1)); nvWriteVIDEO(pNv, NV_PVIDEO_BASE(buffer) , 0); nvWriteVIDEO(pNv, NV_PVIDEO_OFFSET_BUFF(buffer), src->offset + offset); nvWriteVIDEO(pNv, NV_PVIDEO_SIZE_IN(buffer) , (height << 16) | width); nvWriteVIDEO(pNv, NV_PVIDEO_POINT_IN(buffer) , ((y1 << 4) & 0xffff0000) | (x1 >> 12)); nvWriteVIDEO(pNv, NV_PVIDEO_DS_DX(buffer) , (src_w << 20) / drw_w); nvWriteVIDEO(pNv, NV_PVIDEO_DT_DY(buffer) , (src_h << 20) / drw_h); nvWriteVIDEO(pNv, NV_PVIDEO_POINT_OUT(buffer), (dstBox->y1 << 16) | dstBox->x1); nvWriteVIDEO(pNv, NV_PVIDEO_SIZE_OUT(buffer) , ((dstBox->y2 - dstBox->y1) << 16) | (dstBox->x2 - dstBox->x1)); dstPitch |= NV_PVIDEO_FORMAT_DISPLAY_COLOR_KEY; /* use color key */ if(id != FOURCC_UYVY) dstPitch |= NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8; if(pPriv->iturbt_709) dstPitch |= NV_PVIDEO_FORMAT_MATRIX_ITURBT709; if( id == FOURCC_YV12 || id == FOURCC_I420 ) dstPitch |= NV_PVIDEO_FORMAT_PLANAR; /* Those are important only for planar formats (NV12) */ if (uvoffset) { nvWriteVIDEO(pNv, NV_PVIDEO_UVPLANE_BASE(buffer), 0); nvWriteVIDEO(pNv, NV_PVIDEO_UVPLANE_OFFSET_BUFF(buffer), src->offset + uvoffset); } nvWriteVIDEO(pNv, NV_PVIDEO_FORMAT(buffer), dstPitch); nvWriteVIDEO(pNv, NV_PVIDEO_STOP, 0); nvWriteVIDEO(pNv, NV_PVIDEO_BUFFER, buffer ? 0x10 : 0x1); #endif pPriv->videoStatus = CLIENT_VIDEO_ON; } /** * NV10SetOverlayPortAttribute * sets the attribute "attribute" of port "data" to value "value" * calls NVResetVideo(pScrn) to apply changes to hardware * * @param pScrenInfo * @param attribute attribute to set * @param value value to which attribute is to be set * @param data port from which the attribute is to be set * * @return Success, if setting is successful * BadValue/BadMatch, if value/attribute are invalid * @see NVResetVideo(ScrnInfoPtr pScrn) */ int NV10SetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvBrightness) { if ((value < -512) || (value > 512)) return BadValue; pPriv->brightness = value; } else if (attribute == xvDoubleBuffer) { if ((value < 0) || (value > 1)) return BadValue; pPriv->doubleBuffer = value; } else if (attribute == xvContrast) { if ((value < 0) || (value > 8191)) return BadValue; pPriv->contrast = value; } else if (attribute == xvHue) { value %= 360; if (value < 0) value += 360; pPriv->hue = value; } else if (attribute == xvSaturation) { if ((value < 0) || (value > 8191)) return BadValue; pPriv->saturation = value; } else if (attribute == xvColorKey) { pPriv->colorKey = value; REGION_EMPTY(pScrn->pScreen, &pPriv->clip); } else if (attribute == xvAutopaintColorKey) { if ((value < 0) || (value > 1)) return BadValue; pPriv->autopaintColorKey = value; } else if (attribute == xvITURBT709) { if ((value < 0) || (value > 1)) return BadValue; pPriv->iturbt_709 = value; } else if (attribute == xvSetDefaults) { NVSetPortDefaults(pScrn, pPriv); } else #ifdef NVOVL_SUPPORT if ( attribute == xvOnCRTCNb) { NVPtr pNv = NVPTR(pScrn); if ((value < 0) || (value > 1)) return BadValue; pPriv->overlayCRTC = value; NVWriteCRTC(pNv, value, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, value, NV_PCRTC_ENGINE_CTRL) | NV_CRTC_FSEL_OVERLAY); NVWriteCRTC(pNv, !value, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, !value, NV_PCRTC_ENGINE_CTRL) & ~NV_CRTC_FSEL_OVERLAY); } else #endif return BadMatch; NV10WriteOverlayParameters(pScrn); return Success; } /** * NV10GetOverlayPortAttribute * * @param pScrn unused * @param attribute attribute to be read * @param value value of attribute will be stored in this pointer * @param data port from which attribute will be read * @return Success, if queried attribute exists */ int NV10GetOverlayPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (attribute == xvBrightness) *value = pPriv->brightness; else if (attribute == xvDoubleBuffer) *value = (pPriv->doubleBuffer) ? 1 : 0; else if (attribute == xvContrast) *value = pPriv->contrast; else if (attribute == xvSaturation) *value = pPriv->saturation; else if (attribute == xvHue) *value = pPriv->hue; else if (attribute == xvColorKey) *value = pPriv->colorKey; else if (attribute == xvAutopaintColorKey) *value = (pPriv->autopaintColorKey) ? 1 : 0; else if (attribute == xvITURBT709) *value = (pPriv->iturbt_709) ? 1 : 0; else if (attribute == xvOnCRTCNb) *value = (pPriv->overlayCRTC) ? 1 : 0; else return BadMatch; return Success; } /** * NV10StopOverlay * Tell the hardware to stop the overlay */ void NV10StopOverlay (ScrnInfoPtr pScrn) { #ifdef NVOVL_SUPPORT NVPtr pNv = NVPTR(pScrn); nvWriteVIDEO(pNv, NV_PVIDEO_STOP, 1); #endif } /** * NV10WriteOverlayParameters * Tell the hardware about parameters that are too expensive to be set * on every frame */ void NV10WriteOverlayParameters (ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); int satSine, satCosine; double angle; angle = (double)pPriv->hue * 3.1415927 / 180.0; satSine = pPriv->saturation * sin(angle); if (satSine < -1024) satSine = -1024; satCosine = pPriv->saturation * cos(angle); if (satCosine < -1024) satCosine = -1024; #ifdef NVOVL_SUPPORT nvWriteVIDEO(pNv, NV_PVIDEO_LUMINANCE(0), (pPriv->brightness << 16) | pPriv->contrast); nvWriteVIDEO(pNv, NV_PVIDEO_LUMINANCE(1), (pPriv->brightness << 16) | pPriv->contrast); nvWriteVIDEO(pNv, NV_PVIDEO_CHROMINANCE(0), (satSine << 16) | (satCosine & 0xffff)); nvWriteVIDEO(pNv, NV_PVIDEO_CHROMINANCE(1), (satSine << 16) | (satCosine & 0xffff)); nvWriteVIDEO(pNv, NV_PVIDEO_COLOR_KEY, pPriv->colorKey); #endif } xf86-video-nouveau-1.0.18/src/nvc0_accel.h0000644000175000017500000001340214713424663013610 #ifndef __NVC0_ACCEL_H__ #define __NVC0_ACCEL_H__ #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv50_2d.xml.h" #include "hwdefs/nvc0_3d.xml.h" #include "hwdefs/nvc0_m2mf.xml.h" #include "hwdefs/nv50_defs.xml.h" #include "hwdefs/nv50_texture.h" #include "hwdefs/gm107_texture.xml.h" #include "hwdefs/nv_3ddefs.xml.h" /* subchannel assignments, compatible with kepler's fixed layout */ #define SUBC_3D(mthd) 0, (mthd) #define NVC0_3D(mthd) SUBC_3D(NVC0_3D_##mthd) #define NVE4_3D(mthd) SUBC_3D(NVE4_3D_##mthd) #define SUBC_M2MF(mthd) 2, (mthd) #define SUBC_P2MF(mthd) 2, (mthd) #define NVC0_M2MF(mthd) SUBC_M2MF(NVC0_M2MF_##mthd) #define SUBC_2D(mthd) 3, (mthd) #define NV50_2D(mthd) SUBC_2D(NV50_2D_##mthd) #define NVC0_2D(mthd) SUBC_2D(NVC0_2D_##mthd) #define SUBC_COPY(mthd) 4, (mthd) #define SUBC_NVSW(mthd) 5, (mthd) /* scratch buffer offsets */ #define CODE_OFFSET 0x00000 /* Code */ #define PVP_DATA 0x01000 /* VP constants */ #define PFP_DATA 0x01100 /* FP constants */ #define TB_OFFSET 0x01800 /* Texture bindings (kepler) */ #define TIC_OFFSET 0x02000 /* Texture Image Control */ #define TSC_OFFSET 0x03000 /* Texture Sampler Control */ #define SOLID(i) (0x04000 + (i) * 0x100) #define NTFY_OFFSET 0x08000 #define SEMA_OFFSET 0x08100 #define MISC_OFFSET 0x10000 /* vertex/fragment programs */ #define SPO ((pNv->Architecture < NV_KEPLER) ? 0x0000 : 0x0030) #define PVP_PASS (0x0000 + SPO) /* vertex pass-through shader */ #define PFP_S (0x0200 + SPO) /* (src) */ #define PFP_C (0x0400 + SPO) /* (src IN mask) */ #define PFP_CCA (0x0600 + SPO) /* (src IN mask) component-alpha */ #define PFP_CCASA (0x0800 + SPO) /* (src IN mask) component-alpha src-alpha */ #define PFP_S_A8 (0x0a00 + SPO) /* (src) a8 rt */ #define PFP_C_A8 (0x0c00 + SPO) /* (src IN mask) a8 rt - same for CCA/CCASA */ #define PFP_NV12 (0x0e00 + SPO) /* NV12 YUV->RGB */ #define VTX_ATTR(a, c, t, s) \ ((NVC0_3D_VTX_ATTR_DEFINE_TYPE_##t) | \ ((a) << NVC0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT) | \ ((c) << NVC0_3D_VTX_ATTR_DEFINE_COMP__SHIFT) | \ ((s) << NVC0_3D_VTX_ATTR_DEFINE_SIZE__SHIFT)) static __inline__ void PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float sy, int dx, int dy) { BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(1, 2, FLOAT, 4)); PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(0, 2, SSCALED, 4)); PUSH_DATA (push, dx); PUSH_DATA (push, dy); } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x0, int y0, int x1, int y1, int dx, int dy) { BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(1, 2, SSCALED, 4)); PUSH_DATA (push, x0); PUSH_DATA (push, y0); BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(2, 2, SSCALED, 4)); PUSH_DATA (push, x1); PUSH_DATA (push, y1); BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(0, 2, SSCALED, 4)); PUSH_DATA (push, dx); PUSH_DATA (push, dy); } static __inline__ void PUSH_DATAu(struct nouveau_pushbuf *push, struct nouveau_bo *bo, unsigned delta, unsigned dwords) { if (push->client->device->chipset < 0xe0) { BEGIN_NVC0(push, NVC0_M2MF(OFFSET_OUT_HIGH), 2); PUSH_DATA (push, (bo->offset + delta) >> 32); PUSH_DATA (push, (bo->offset + delta)); BEGIN_NVC0(push, NVC0_M2MF(LINE_LENGTH_IN), 2); PUSH_DATA (push, dwords * 4); PUSH_DATA (push, 1); BEGIN_NVC0(push, NVC0_M2MF(EXEC), 1); PUSH_DATA (push, 0x100111); BEGIN_NIC0(push, NVC0_M2MF(DATA), dwords); } else { BEGIN_NVC0(push, SUBC_P2MF(0x0180), 4); PUSH_DATA (push, dwords * 4); PUSH_DATA (push, 1); PUSH_DATA (push, (bo->offset + delta) >> 32); PUSH_DATA (push, (bo->offset + delta)); BEGIN_1IC0(push, SUBC_P2MF(0x01b0), 1 + dwords); PUSH_DATA (push, 0x001001); } } static __inline__ void PUSH_TIC(struct nouveau_pushbuf *push, struct nouveau_bo *bo, unsigned offset, unsigned width, unsigned height, unsigned pitch, unsigned format) { if (push->client->device->chipset < 0x110) { unsigned tic2 = 0xd0001000; if (pitch == 0) tic2 |= 0x00004000; else tic2 |= 0x0005c000; PUSH_DATA(push, format); PUSH_DATA(push, bo->offset + offset); PUSH_DATA(push, ((bo->offset + offset) >> 32) | (bo->config.nvc0.tile_mode << 18) | tic2); PUSH_DATA(push, 0x00300000); PUSH_DATA(push, 0x80000000 | width); PUSH_DATA(push, 0x00010000 | height); PUSH_DATA(push, 0x03000000); PUSH_DATA(push, 0x00000000); } else { unsigned tile_mode = bo->config.nvc0.tile_mode; PUSH_DATA(push, (format & 0x3f) | ((format & ~0x3f) << 1)); PUSH_DATA(push, bo->offset + offset); if (pitch == 0) { PUSH_DATA(push, ((bo->offset + offset) >> 32) | GM107_TIC2_2_HEADER_VERSION_BLOCKLINEAR); PUSH_DATA(push, GM107_TIC2_3_LOD_ANISO_QUALITY_2 | ((tile_mode & 0x007)) | ((tile_mode & 0x070) >> (4 - 3)) | ((tile_mode & 0x700) >> (8 - 6))); PUSH_DATA(push, GM107_TIC2_4_SECTOR_PROMOTION_PROMOTE_TO_2_V | GM107_TIC2_4_BORDER_SIZE_SAMPLER_COLOR | GM107_TIC2_4_TEXTURE_TYPE_TWO_D | (width - 1)); PUSH_DATA(push, GM107_TIC2_5_NORMALIZED_COORDS | ((height - 1) & 0xffff)); PUSH_DATA(push, GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_TWO | GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_ONE); PUSH_DATA(push, 0x00000000); } else { PUSH_DATA(push, ((bo->offset + offset) >> 32) | GM107_TIC2_2_HEADER_VERSION_PITCH); PUSH_DATA(push, GM107_TIC2_3_LOD_ANISO_QUALITY_2 | (pitch >> 5)); PUSH_DATA(push, GM107_TIC2_4_BORDER_SIZE_SAMPLER_COLOR | GM107_TIC2_4_TEXTURE_TYPE_TWO_D_NO_MIPMAP | (width - 1)); PUSH_DATA(push, GM107_TIC2_5_NORMALIZED_COORDS | (height - 1)); PUSH_DATA(push, 0x000000000); PUSH_DATA(push, 0x000000000); } } } #endif xf86-video-nouveau-1.0.18/src/shader/0000755000175000017500000000000014713424676012774 5xf86-video-nouveau-1.0.18/src/shader/exascnvc0.fpc0000644000175000017500000000020414713424663015270 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exas8nv110.fp0000644000175000017500000000130114713424663015050 #ifndef ENVYAS static uint32_t NV110FP_Source_A8[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exas8nv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r1 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r0 a[0x80] $r0 0x0 0x1 tex nodep $r0 $r0 0x0 0x0 t2d 0x8 depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) mov $r3 $r0 0xf mov $r2 $r0 0xf mov $r1 $r0 0xf sched (st 0x0) (st 0x0) (st 0x0) exit #endif xf86-video-nouveau-1.0.18/src/shader/exacmnv110.fp0000644000175000017500000000154014713424663015122 #ifndef ENVYAS static uint32_t NV110FP_Composite[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exacmnv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r3 a[0x94] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r2 a[0x90] $r0 0x0 0x1 tex nodep $r4 $r2 0x0 0x1 t2d 0x8 ipa $r1 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r0 a[0x80] $r0 0x0 0x1 tex nodep $r0 $r0 0x0 0x0 t2d 0xf depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r3 $r3 $r4 fmul ftz $r2 $r2 $r4 fmul ftz $r1 $r1 $r4 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exacanv110.fpc0000644000175000017500000000071014713424663015247 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff03, 0xe043ff89, 0xfc0007e0, 0x001f8000, 0x0007ff02, 0xe043ff89, 0xaff70204, 0xc03a0017, 0x4007ff01, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff00, 0xe043ff88, 0xaff70000, 0xc03a0007, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00770303, 0x5c681000, 0x00670202, 0x5c681000, 0x00570101, 0x5c681000, 0xfc0007e0, 0x001f8000, 0x00470000, 0x5c681000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exacanv110.fp0000644000175000017500000000245614713424663015115 #ifndef ENVYAS static uint32_t NV110FP_CAComposite[] = { 0x00001462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, /* FRAG_COORD_UMASK = 0x8 */ 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */ 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */ 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */ 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */ 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */ 0x00000000, /* FP_INTERP[0x1c0] */ 0x00000000, /* FP_INTERP[0x200] */ 0x00000000, /* FP_INTERP[0x240] */ 0x00000000, /* FP_INTERP[0x280] */ 0x00000000, /* FP_INTERP[0x2c0] */ 0x00000000, /* FP_INTERP[0x300] */ 0x00000000, 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */ 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */ #include "exacanv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r3 a[0x94] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r2 a[0x90] $r0 0x0 0x1 tex nodep $r4 $r2 0x0 0x1 t2d 0xf ipa $r1 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r0 a[0x80] $r0 0x0 0x1 tex nodep $r0 $r0 0x0 0x0 t2d 0xf depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r3 $r3 $r7 fmul ftz $r2 $r2 $r6 fmul ftz $r1 $r1 $r5 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/xfrm2nvf0.vpc0000644000175000017500000000207014713424663015251 0x401ffc02, 0x7ec3fc00, 0x421ffc06, 0x7ec3fc00, 0x441ffc0a, 0x7ec3fc00, 0x461ffc0e, 0x7ec3fc00, 0x381ffc02, 0x7f03fc00, 0x3a1ffc06, 0x7f03fc00, 0x3c1ffc0a, 0x7f03fc00, 0x3e1ffc0e, 0x7f03fc00, 0x481ffc02, 0x7ec3fc00, 0x4a1ffc06, 0x7ec3fc00, 0x001c000a, 0x63408000, 0x019c000e, 0x63408000, 0x031c0012, 0x63408000, 0x009c040a, 0x4d000800, 0x021c040e, 0x4d000c00, 0x039c0412, 0x4d001000, 0x011c080a, 0x62c08000, 0x029c0c0e, 0x62c08000, 0x041c1012, 0x62c08000, 0x021c1012, 0x84000000, 0x021c080a, 0xe3408000, 0x021c0c0e, 0xe3408000, 0x049c0802, 0x63408000, 0x051c0c06, 0x63408000, 0x401ffc02, 0x7f03fc00, 0x421ffc06, 0x7f03fc00, 0x501ffc02, 0x7ec3fc00, 0x521ffc06, 0x7ec3fc00, 0x059c000a, 0x63408000, 0x071c000e, 0x63408000, 0x089c0012, 0x63408000, 0x061c040a, 0x4d000800, 0x079c040e, 0x4d000c00, 0x091c0412, 0x4d001000, 0x069c080a, 0x62c08000, 0x081c0c0e, 0x62c08000, 0x099c1012, 0x62c08000, 0x021c1012, 0x84000000, 0x021c080a, 0xe3408000, 0x021c0c0e, 0xe3408000, 0x0a1c0802, 0x63408000, 0x0a9c0c06, 0x63408000, 0x481ffc02, 0x7f03fc00, 0x4a1ffc06, 0x7f03fc00, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exacanvf0.fp0000644000175000017500000000240414713424663015112 #ifndef ENVYAS static uint32_t NVF0FP_CAComposite[] = { 0x00001462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, /* FRAG_COORD_UMASK = 0x8 */ 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */ 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */ 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */ 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */ 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */ 0x00000000, /* FP_INTERP[0x1c0] */ 0x00000000, /* FP_INTERP[0x200] */ 0x00000000, /* FP_INTERP[0x240] */ 0x00000000, /* FP_INTERP[0x280] */ 0x00000000, /* FP_INTERP[0x2c0] */ 0x00000000, /* FP_INTERP[0x300] */ 0x00000000, 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */ 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */ #include "exacanvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 0x0 tex t lauto live dfp $r4:$r5:$r6:$r7 t2d c[0x4] xy__ $r2:$r3 0x0 interp mul f32 $r1 a[0x84] $r0 0x0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0 texbar 0x0 mul ftz rn f32 $r3 $r3 $r7 mul ftz rn f32 $r2 $r2 $r6 mul ftz rn f32 $r1 $r1 $r5 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exac8nve0.fpc0000644000175000017500000000052014713424663015200 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00205e86, 0x80120001, 0x03f0dc40, 0xc07e0084, 0x03f09c40, 0xc07e0080, 0x00201e86, 0x80120000, 0x00001de6, 0xf0000000, 0x0400dc40, 0x58000000, 0x0c009de4, 0x28000000, 0x0c005de4, 0x28000000, 0x0c001de4, 0x28000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exac8nve0.fp0000644000175000017500000000140214713424663015035 #ifndef ENVYAS static uint32_t NVE0FP_Composite_A8[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exac8nve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp #:#:#:$r1 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r3 a[0x84] $r0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r0 t2d $t0 $s0 $r2:$r3 () texbar 0x0 mul ftz rn f32 $r3 $r0 $r1 long mov b32 $r2 $r3 long mov b32 $r1 $r3 long mov b32 $r0 $r3 long exit #endif xf86-video-nouveau-1.0.18/src/shader/exas8nve0.fp0000644000175000017500000000115014713424663015055 #ifndef ENVYAS static uint32_t NVE0FP_Source_A8[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exas8nve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r0 t2d $t0 $s0 $r0:$r1 () texbar 0x0 long mov b32 $r3 $r0 long mov b32 $r2 $r0 long mov b32 $r1 $r0 long exit #endif xf86-video-nouveau-1.0.18/src/shader/xfrm2nv110.vp0000644000175000017500000000360514713424663015107 #ifndef ENVYAS static uint32_t NV110VP_Transform2[] = { 0x02000461, 0x00000000, 0x00000000, 0x00000000, 0x000ff000, 0x00000000, /* VP_ATTR_EN[0x000] */ 0x00000000, /* VP_ATTR_EN[0x080] */ 0x00000000, /* VP_ATTR_EN[0x100] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x200] */ 0x80000000, /* VERTEXID */ 0x00000000, /* VP_ATTR_EN[0x300] */ 0x00000000, 0x0033f000, /* VP_EXPORT_EN[0x040] */ 0x00000000, /* VP_EXPORT_EN[0x0c0] */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* VP_EXPORT_EN[0x2c0] */ 0x00000000, #include "xfrm2nv110.vpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ld b32 $r5 a[0x2fc] 0x0 shl $r5 $r5 0x5 ld b64 $r0 c0[$r5+0x80] sched (st 0x0) (st 0x0) (st 0x0) ld b64 $r2 c0[$r5+0x88] st b128 a[0x70] $r0 0x0 ld b64 $r0 c0[$r5+0x90] sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r2 $r0 c0[0x0] fmul ftz $r3 $r0 c0[0xc] fmul ftz $r4 $r0 c0[0x18] sched (st 0x0) (st 0x0) (st 0x0) ffma ftz $r2 $r1 c0[0x4] $r2 ffma ftz $r3 $r1 c0[0x10] $r3 ffma ftz $r4 $r1 c0[0x1c] $r4 sched (st 0x0) (st 0x0) (st 0x0) fadd ftz $r2 $r2 c0[0x8] fadd ftz $r3 $r3 c0[0x14] fadd ftz $r4 $r4 c0[0x20] sched (st 0x0) (st 0x0) (st 0x0) mufu rcp $r4 $r4 fmul ftz $r2 $r2 $r4 fmul ftz $r3 $r3 $r4 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r0 $r2 c0[0x24] fmul ftz $r1 $r3 c0[0x28] st b64 a[0x80] $r0 0x0 sched (st 0x0) (st 0x0) (st 0x0) ld b64 $r0 c0[$r5+0x98] fmul ftz $r2 $r0 c0[0x2c] fmul ftz $r3 $r0 c0[0x38] sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r4 $r0 c0[0x44] ffma ftz $r2 $r1 c0[0x30] $r2 ffma ftz $r3 $r1 c0[0x3c] $r3 sched (st 0x0) (st 0x0) (st 0x0) ffma ftz $r4 $r1 c0[0x48] $r4 fadd ftz $r2 $r2 c0[0x34] fadd ftz $r3 $r3 c0[0x40] sched (st 0x0) (st 0x0) (st 0x0) fadd ftz $r4 $r4 c0[0x4c] mufu rcp $r4 $r4 fmul ftz $r2 $r2 $r4 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r3 $r3 $r4 fmul ftz $r0 $r2 c0[0x50] fmul ftz $r1 $r3 c0[0x54] sched (st 0x0) (st 0x0) (st 0x0) st b64 a[0x90] $r0 0x0 exit #endif xf86-video-nouveau-1.0.18/src/shader/exasanvf0.fp0000644000175000017500000000147214713424663015136 #ifndef ENVYAS static uint32_t NVF0FP_CACompositeSrcAlpha[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exasanvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x84] $r0 0x0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 0x0 tex t lauto live dfp #:#:#:$r4 t2d c[0x0] xy__ $r2:$r3 0x0 interp mul f32 $r1 a[0x94] $r0 0x0 0x0 interp mul f32 $r0 a[0x90] $r0 0x0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d c[0x4] xy__ $r0:$r1 0x0 texbar 0x0 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exasanve0.fpc0000644000175000017500000000052014713424663015271 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0084, 0x03f09c40, 0xc07e0080, 0x00211e86, 0x80120000, 0x03f05c40, 0xc07e0094, 0x03f01c40, 0xc07e0090, 0x00001e86, 0x8013c001, 0x00001de6, 0xf0000000, 0x1030dc40, 0x58000000, 0x10209c40, 0x58000000, 0x10105c40, 0x58000000, 0x10001c40, 0x58000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/xfrm2nv110.vpc0000644000175000017500000000231014713424663015242 0xfc0007e0, 0x001f8000, 0x2fc7ff05, 0xefd87f80, 0x00570505, 0x38480000, 0x08070500, 0xef950000, 0xfc0007e0, 0x001f8000, 0x08870502, 0xef950000, 0x0707ff00, 0xeff1ff80, 0x09070500, 0xef950000, 0xfc0007e0, 0x001f8000, 0x00070002, 0x4c681000, 0x00370003, 0x4c681000, 0x00670004, 0x4c681000, 0xfc0007e0, 0x001f8000, 0x00170102, 0x49a00100, 0x00470103, 0x49a00180, 0x00770104, 0x49a00200, 0xfc0007e0, 0x001f8000, 0x00270202, 0x4c581000, 0x00570303, 0x4c581000, 0x00870404, 0x4c581000, 0xfc0007e0, 0x001f8000, 0x00470404, 0x50800000, 0x00470202, 0x5c681000, 0x00470303, 0x5c681000, 0xfc0007e0, 0x001f8000, 0x00970200, 0x4c681000, 0x00a70301, 0x4c681000, 0x0807ff00, 0xeff0ff80, 0xfc0007e0, 0x001f8000, 0x09870500, 0xef950000, 0x00b70002, 0x4c681000, 0x00e70003, 0x4c681000, 0xfc0007e0, 0x001f8000, 0x01170004, 0x4c681000, 0x00c70102, 0x49a00100, 0x00f70103, 0x49a00180, 0xfc0007e0, 0x001f8000, 0x01270104, 0x49a00200, 0x00d70202, 0x4c581000, 0x01070303, 0x4c581000, 0xfc0007e0, 0x001f8000, 0x01370404, 0x4c581000, 0x00470404, 0x50800000, 0x00470202, 0x5c681000, 0xfc0007e0, 0x001f8000, 0x00470303, 0x5c681000, 0x01470200, 0x4c681000, 0x01570301, 0x4c681000, 0xfc0007e0, 0x001f8000, 0x0907ff00, 0xeff0ff80, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/Makefile0000644000175000017500000000342514713424663014354 NVC0_SHADERS = xfrm2nvc0.vpc \ exascnvc0.fpc \ exacmnvc0.fpc \ exacanvc0.fpc \ exasanvc0.fpc \ exas8nvc0.fpc \ exac8nvc0.fpc \ videonvc0.fpc NVE0_SHADERS = xfrm2nve0.vpc \ exascnve0.fpc \ exacmnve0.fpc \ exacanve0.fpc \ exasanve0.fpc \ exas8nve0.fpc \ exac8nve0.fpc \ videonve0.fpc NVF0_SHADERS = xfrm2nvf0.vpc \ exascnvf0.fpc \ exacmnvf0.fpc \ exacanvf0.fpc \ exasanvf0.fpc \ exas8nvf0.fpc \ exac8nvf0.fpc \ videonvf0.fpc NV110_SHADERS = xfrm2nv110.vpc \ exascnv110.fpc \ exacmnv110.fpc \ exacanv110.fpc \ exasanv110.fpc \ exas8nv110.fpc \ exac8nv110.fpc \ videonv110.fpc SHADERS = $(NVC0_SHADERS) $(NVE0_SHADERS) $(NVF0_SHADERS) $(NV110_SHADERS) ENVYAS ?= envyas all: $(SHADERS) $(filter %nvc0.vpc,$(SHADERS)): %.vpc: %.vp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gf100 -V gf100 -o $@ $(filter %nvc0.fpc,$(SHADERS)): %.fpc: %.fp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gf100 -V gf100 -o $@ $(filter %nve0.vpc,$(SHADERS)): %.vpc: %.vp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gf100 -V gk104 -o $@ $(filter %nve0.fpc,$(SHADERS)): %.fpc: %.fp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gf100 -V gk104 -o $@ $(filter %nvf0.vpc,$(SHADERS)): %.vpc: %.vp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gk110 -o $@ $(filter %nvf0.fpc,$(SHADERS)): %.fpc: %.fp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gk110 -o $@ $(filter %nv110.vpc,$(SHADERS)): %.vpc: %.vp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gm107 -o $@ $(filter %nv110.fpc,$(SHADERS)): %.fpc: %.fp cpp -DENVYAS $< | sed -e '/^#/d' | $(ENVYAS) -w -m gm107 -o $@ xf86-video-nouveau-1.0.18/src/shader/videonvc0.fpc0000644000175000017500000000067414713424663015306 0xfff09c00, 0xc07e007c, 0x10209c00, 0xc8000000, 0x0bf01c40, 0xc07e0080, 0x0bf05c40, 0xc07e0084, 0x00001e86, 0x80120000, 0x00015c40, 0x58004000, 0x1050dc20, 0x50004000, 0x20511c20, 0x50004000, 0x30515c20, 0x50004000, 0x0bf01c40, 0xc07e0080, 0x0bf05c40, 0xc07e0084, 0x00001e86, 0x80130001, 0x4000dc40, 0x30064000, 0x50011c40, 0x30084000, 0x60015c40, 0x300a4000, 0x70101c40, 0x30064000, 0x90109c40, 0x300a4000, 0x80105c40, 0x30084000, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exacmnve0.fp0000644000175000017500000000142714713424663015131 #ifndef ENVYAS static uint32_t NVE0FP_Composite[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exacmnve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp #:#:#:$r4 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () texbar 0x0 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 long exit #endif xf86-video-nouveau-1.0.18/src/shader/xfrm2nve0.vp0000644000175000017500000000315514713424663015112 #ifndef ENVYAS static uint32_t NVE0VP_Transform2[] = { 0x00020461, 0x00000000, 0x00000000, 0x00000000, 0x000ff000, 0x00000000, /* VP_ATTR_EN[0x000] */ 0x0001033f, /* VP_ATTR_EN[0x080] */ 0x00000000, /* VP_ATTR_EN[0x100] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x200] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x300] */ 0x00000000, 0x0033f000, /* VP_EXPORT_EN[0x040] */ 0x00000000, /* VP_EXPORT_EN[0x0c0] */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* VP_EXPORT_EN[0x2c0] */ 0x00000000, #include "xfrm2nve0.vpc" }; #else ld b128 $r0:$r1:$r2:$r3 a[0x80] 0x0 unk39 st b128 a[0x70] $r0:$r1:$r2:$r3 0x0 unk39 ld b64 $r0:$r1 a[0x90] 0x0 unk39 mul ftz rn f32 $r2 $r0 c0[0x0] mul ftz rn f32 $r3 $r0 c0[0xc] mul ftz rn f32 $r4 $r0 c0[0x18] fma ftz rn f32 $r2 $r1 c0[0x4] $r2 fma ftz rn f32 $r3 $r1 c0[0x10] $r3 fma ftz rn f32 $r4 $r1 c0[0x1c] $r4 add ftz rn f32 $r2 $r2 c0[0x8] add ftz rn f32 $r3 $r3 c0[0x14] add ftz rn f32 $r4 $r4 c0[0x20] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x24] mul ftz rn f32 $r1 $r3 c0[0x28] st b64 a[0x80] $r0:$r1 0x0 unk39 ld b64 $r0:$r1 a[0xa0] 0x0 unk39 mul ftz rn f32 $r2 $r0 c0[0x2c] mul ftz rn f32 $r3 $r0 c0[0x38] mul ftz rn f32 $r4 $r0 c0[0x44] fma ftz rn f32 $r2 $r1 c0[0x30] $r2 fma ftz rn f32 $r3 $r1 c0[0x3c] $r3 fma ftz rn f32 $r4 $r1 c0[0x48] $r4 add ftz rn f32 $r2 $r2 c0[0x34] add ftz rn f32 $r3 $r3 c0[0x40] add ftz rn f32 $r4 $r4 c0[0x4c] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x50] mul ftz rn f32 $r1 $r3 c0[0x54] st b64 a[0x90] $r0:$r1 0x0 unk39 long exit #endif xf86-video-nouveau-1.0.18/src/shader/exascnv110.fpc0000644000175000017500000000036014713424663015272 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff01, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff00, 0xe043ff88, 0xaff70000, 0xc03a0007, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exascnvf0.fp0000644000175000017500000000107014713424663015132 #ifndef ENVYAS static uint32_t NVF0FP_Source[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exascnvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0 texbar 0x0 exit #endif xf86-video-nouveau-1.0.18/src/shader/exas8nvc0.fp0000644000175000017500000000111114713424663015050 #ifndef ENVYAS static uint32_t NVC0FP_Source_A8[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exas8nvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r0 t2d $t0 $s0 $r0:$r1 () mov b32 $r3 $r0 mov b32 $r2 $r0 mov b32 $r1 $r0 exit #endif xf86-video-nouveau-1.0.18/src/shader/exas8nve0.fpc0000644000175000017500000000036014713424663015222 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x80120000, 0x00001de6, 0xf0000000, 0x0000dde4, 0x28000000, 0x00009de4, 0x28000000, 0x00005de4, 0x28000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exacmnve0.fpc0000644000175000017500000000052014713424663015265 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00211e86, 0x80120001, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x00001de6, 0xf0000000, 0x1030dc40, 0x58000000, 0x10209c40, 0x58000000, 0x10105c40, 0x58000000, 0x10001c40, 0x58000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exac8nvc0.fp0000644000175000017500000000134314713424663015037 #ifndef ENVYAS static uint32_t NVC0FP_Composite_A8[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exac8nvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp #:#:#:$r1 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r3 a[0x84] $r0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r0 t2d $t0 $s0 $r2:$r3 () mul ftz rn f32 $r3 $r0 $r1 mov b32 $r2 $r3 mov b32 $r1 $r3 mov b32 $r0 $r3 exit #endif xf86-video-nouveau-1.0.18/src/shader/exacanve0.fpc0000644000175000017500000000052014713424663015251 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00211e86, 0x8013c001, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x00001de6, 0xf0000000, 0x1c30dc40, 0x58000000, 0x18209c40, 0x58000000, 0x14105c40, 0x58000000, 0x10001c40, 0x58000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/videonvf0.fpc0000644000175000017500000000071014713424663015300 0x7f9ffc0a, 0x7483fc3e, 0x021c080a, 0x84000000, 0x011ffc02, 0x74a3fc40, 0x011ffc06, 0x74a3fc42, 0xff9c0011, 0x600000a1, 0xff9c0001, 0x600080b2, 0x009c0002, 0x77000000, 0x001c1016, 0x63408000, 0x009c140e, 0x62c08000, 0x011c1412, 0x62c08000, 0x019c1416, 0x62c08000, 0x001c0002, 0x77000000, 0x021c000e, 0x4d000c00, 0x029c0012, 0x4d001000, 0x031c0016, 0x4d001400, 0x039c0402, 0x4d000c00, 0x049c040a, 0x4d001400, 0x041c0406, 0x4d001000, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exac8nv110.fp0000644000175000017500000000152414713424663015037 #ifndef ENVYAS static uint32_t NV110FP_Composite_A8[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exac8nv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r3 a[0x94] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r2 a[0x90] $r0 0x0 0x1 tex nodep $r1 $r2 0x0 0x1 t2d 0x8 ipa $r3 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r2 a[0x80] $r0 0x0 0x1 tex nodep $r0 $r2 0x0 0x0 t2d 0x8 depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r3 $r0 $r1 mov $r2 $r3 0xf mov $r1 $r3 0xf sched (st 0x0) (st 0x0) (st 0x0) mov $r0 $r3 0xf exit #endif xf86-video-nouveau-1.0.18/src/shader/exasanv110.fp0000644000175000017500000000155214713424663015131 #ifndef ENVYAS static uint32_t NV110FP_CACompositeSrcAlpha[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exasanv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r3 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r2 a[0x80] $r0 0x0 0x1 tex nodep $r4 $r2 0x0 0x0 t2d 0x8 ipa $r1 a[0x94] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r0 a[0x90] $r0 0x0 0x1 tex nodep $r0 $r0 0x0 0x1 t2d 0xf depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r3 $r3 $r4 fmul ftz $r2 $r2 $r4 fmul ftz $r1 $r1 $r4 sched (st 0x0) (st 0x0) (st 0x0) fmul ftz $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exas8nv110.fpc0000644000175000017500000000052014713424663015215 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff01, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff00, 0xe043ff88, 0x2ff70000, 0xc03a0004, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00070003, 0x5c980780, 0x00070002, 0x5c980780, 0x00070001, 0x5c980780, 0xfc0007e0, 0x001f8000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/videonvf0.fp0000644000175000017500000000171414713424663015142 #ifndef ENVYAS static uint32_t NVF0FP_NV12[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "videonvf0.fpc" }; #else interp pass f32 $r2 a[0x7c] 0x0 0x0 0x0 rcp f32 $r2 $r2 interp mul f32 $r0 a[0x80] $r2 0x0 0x0 interp mul f32 $r1 a[0x84] $r2 0x0 0x0 tex t lauto live dfp #:#:#:$r4 t2d c[0x0] xy__ $r0:$r1 0x0 tex p lauto live dfp #:#:$r0:$r1 t2d c[0x4] xy__ $r0:$r1 0x0 texbar 0x1 mul ftz rn f32 $r5 $r4 c0[0x0] add ftz rn f32 $r3 $r5 c0[0x4] add ftz rn f32 $r4 $r5 c0[0x8] add ftz rn f32 $r5 $r5 c0[0xc] texbar 0x0 fma ftz rn f32 $r3 $r0 c0[0x10] $r3 fma ftz rn f32 $r4 $r0 c0[0x14] $r4 fma ftz rn f32 $r5 $r0 c0[0x18] $r5 fma ftz rn f32 $r0 $r1 c0[0x1c] $r3 fma ftz rn f32 $r2 $r1 c0[0x24] $r5 fma ftz rn f32 $r1 $r1 c0[0x20] $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exascnvf0.fpc0000644000175000017500000000025014713424663015274 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc06, 0x74a3fc42, 0x001ffc02, 0x74a3fc40, 0xff9c0001, 0x600000bd, 0x001c0002, 0x77000000, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/xfrm2nvc0.vpc0000644000175000017500000000147414713424663015255 0xfff01c66, 0x06000080, 0x03f01c66, 0x0a7e0070, 0xfff01c26, 0x06000090, 0x00009c40, 0x58004000, 0x3000dc40, 0x58004000, 0x60011c40, 0x58004000, 0x10109c40, 0x30044000, 0x4010dc40, 0x30064000, 0x70111c40, 0x30084000, 0x20209c20, 0x50004000, 0x5030dc20, 0x50004000, 0x80411c20, 0x50004000, 0x10411c00, 0xc8000000, 0x10209c40, 0x58000000, 0x1030dc40, 0x58000000, 0x90201c40, 0x58004000, 0xa0305c40, 0x58004000, 0x03f01c26, 0x0a7e0080, 0xfff01c26, 0x060000a0, 0xb0009c40, 0x58004000, 0xe000dc40, 0x58004000, 0x10011c40, 0x58004001, 0xc0109c40, 0x30044000, 0xf010dc40, 0x30064000, 0x20111c40, 0x30084001, 0xd0209c20, 0x50004000, 0x0030dc20, 0x50004001, 0x30411c20, 0x50004001, 0x10411c00, 0xc8000000, 0x10209c40, 0x58000000, 0x1030dc40, 0x58000000, 0x40201c40, 0x58004001, 0x50305c40, 0x58004001, 0x03f01c26, 0x0a7e0090, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/xfrm2nvc0.vp0000644000175000017500000000315014713424663015103 #ifndef ENVYAS static uint32_t NVC0VP_Transform2[] = { 0x00020461, 0x00000000, 0x00000000, 0x00000000, 0x000ff000, 0x00000000, /* VP_ATTR_EN[0x000] */ 0x0001033f, /* VP_ATTR_EN[0x080] */ 0x00000000, /* VP_ATTR_EN[0x100] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x200] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x300] */ 0x00000000, 0x0033f000, /* VP_EXPORT_EN[0x040] */ 0x00000000, /* VP_EXPORT_EN[0x0c0] */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* VP_EXPORT_EN[0x2c0] */ 0x00000000, #include "xfrm2nvc0.vpc" }; #else ld b128 $r0:$r1:$r2:$r3 a[0x80] 0x0 unk39 st b128 a[0x70] $r0:$r1:$r2:$r3 0x0 unk39 ld b64 $r0:$r1 a[0x90] 0x0 unk39 mul ftz rn f32 $r2 $r0 c0[0x0] mul ftz rn f32 $r3 $r0 c0[0xc] mul ftz rn f32 $r4 $r0 c0[0x18] fma ftz rn f32 $r2 $r1 c0[0x4] $r2 fma ftz rn f32 $r3 $r1 c0[0x10] $r3 fma ftz rn f32 $r4 $r1 c0[0x1c] $r4 add ftz rn f32 $r2 $r2 c0[0x8] add ftz rn f32 $r3 $r3 c0[0x14] add ftz rn f32 $r4 $r4 c0[0x20] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x24] mul ftz rn f32 $r1 $r3 c0[0x28] st b64 a[0x80] $r0:$r1 0x0 unk39 ld b64 $r0:$r1 a[0xa0] 0x0 unk39 mul ftz rn f32 $r2 $r0 c0[0x2c] mul ftz rn f32 $r3 $r0 c0[0x38] mul ftz rn f32 $r4 $r0 c0[0x44] fma ftz rn f32 $r2 $r1 c0[0x30] $r2 fma ftz rn f32 $r3 $r1 c0[0x3c] $r3 fma ftz rn f32 $r4 $r1 c0[0x48] $r4 add ftz rn f32 $r2 $r2 c0[0x34] add ftz rn f32 $r3 $r3 c0[0x40] add ftz rn f32 $r4 $r4 c0[0x4c] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x50] mul ftz rn f32 $r1 $r3 c0[0x54] st b64 a[0x90] $r0:$r1 0x0 unk39 exit #endif xf86-video-nouveau-1.0.18/src/shader/exacmnvc0.fp0000644000175000017500000000140714713424663015125 #ifndef ENVYAS static uint32_t NVC0FP_Composite[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exacmnvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp #:#:#:$r4 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exascnvc0.fp0000644000175000017500000000103414713424663015127 #ifndef ENVYAS static uint32_t NVC0FP_Source[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exascnvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () exit #endif xf86-video-nouveau-1.0.18/src/shader/videonve0.fp0000644000175000017500000000206014713424663015134 #ifndef ENVYAS static uint32_t NVE0FP_NV12[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "videonve0.fpc" }; #else sched 0x2e 0x28 0x23 0x2e 0x20 0x20 0xc2 interp pass f32 $r2 a[0x7c] 0x0 0x0 rcp f32 $r2 $r2 interp mul f32 $r0 a[0x80] $r2 0x0 interp mul f32 $r1 a[0x84] $r2 0x0 tex t lauto live dfp #:#:#:$r4 t2d $t0 $s0 $r0:$r1 () tex p lauto live dfp #:#:$r0:$r1 t2d $t1 $s0 $r0:$r1 () texbar 0x1 sched 0x28 0x4 0x20 0x20 0xa2 0x4 0x20 mul ftz rn f32 $r5 $r4 c0[0x0] add ftz rn f32 $r3 $r5 c0[0x4] add ftz rn f32 $r4 $r5 c0[0x8] add ftz rn f32 $r5 $r5 c0[0xc] texbar 0x0 fma ftz rn f32 $r3 $r0 c0[0x10] $r3 fma ftz rn f32 $r4 $r0 c0[0x14] $r4 sched 0x28 0x4 0x20 0x4 0x2e 0x0 0x0 fma ftz rn f32 $r5 $r0 c0[0x18] $r5 fma ftz rn f32 $r0 $r1 c0[0x1c] $r3 fma ftz rn f32 $r2 $r1 c0[0x24] $r5 fma ftz rn f32 $r1 $r1 c0[0x20] $r4 long exit #endif xf86-video-nouveau-1.0.18/src/shader/exas8nvc0.fpc0000644000175000017500000000025014713424663015216 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x80120000, 0x0000dc28, 0x00009c28, 0x00005c28, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exasanv110.fpc0000644000175000017500000000071014713424663015267 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff03, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff02, 0xe043ff88, 0x2ff70204, 0xc03a0004, 0x4007ff01, 0xe043ff89, 0xfc0007e0, 0x001f8000, 0x0007ff00, 0xe043ff89, 0xaff70000, 0xc03a0017, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00470303, 0x5c681000, 0x00470202, 0x5c681000, 0x00470101, 0x5c681000, 0xfc0007e0, 0x001f8000, 0x00470000, 0x5c681000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exascnv110.fp0000644000175000017500000000115514713424663015132 #ifndef ENVYAS static uint32_t NV110FP_Source[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exascnv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r0 a[0x7c] 0x0 0x0 0x1 mufu rcp $r0 $r0 ipa $r1 a[0x84] $r0 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r0 a[0x80] $r0 0x0 0x1 tex nodep $r0 $r0 0x0 0x0 t2d 0xf depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) exit #endif xf86-video-nouveau-1.0.18/src/shader/exacanvc0.fpc0000644000175000017500000000045414713424663015255 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00211e86, 0x8013c001, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x1c30dc40, 0x58000000, 0x18209c40, 0x58000000, 0x14105c40, 0x58000000, 0x10001c40, 0x58000000, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exacmnvc0.fpc0000644000175000017500000000045414713424663015271 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00211e86, 0x80120001, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x1030dc40, 0x58000000, 0x10209c40, 0x58000000, 0x10105c40, 0x58000000, 0x10001c40, 0x58000000, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exasanvc0.fp0000644000175000017500000000142114713424663015125 #ifndef ENVYAS static uint32_t NVC0FP_CACompositeSrcAlpha[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exasanvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x84] $r0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r4 t2d $t0 $s0 $r2:$r3 () interp mul f32 $r1 a[0x94] $r0 0x0 interp mul f32 $r0 a[0x90] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t1 $s0 $r0:$r1 () mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/xfrm2nve0.vpc0000644000175000017500000000151014713424663015246 0xfff01c66, 0x06000080, 0x03f01c66, 0x0a7e0070, 0xfff01c26, 0x06000090, 0x00009c40, 0x58004000, 0x3000dc40, 0x58004000, 0x60011c40, 0x58004000, 0x10109c40, 0x30044000, 0x4010dc40, 0x30064000, 0x70111c40, 0x30084000, 0x20209c20, 0x50004000, 0x5030dc20, 0x50004000, 0x80411c20, 0x50004000, 0x10411c00, 0xc8000000, 0x10209c40, 0x58000000, 0x1030dc40, 0x58000000, 0x90201c40, 0x58004000, 0xa0305c40, 0x58004000, 0x03f01c26, 0x0a7e0080, 0xfff01c26, 0x060000a0, 0xb0009c40, 0x58004000, 0xe000dc40, 0x58004000, 0x10011c40, 0x58004001, 0xc0109c40, 0x30044000, 0xf010dc40, 0x30064000, 0x20111c40, 0x30084001, 0xd0209c20, 0x50004000, 0x0030dc20, 0x50004001, 0x30411c20, 0x50004001, 0x10411c00, 0xc8000000, 0x10209c40, 0x58000000, 0x1030dc40, 0x58000000, 0x40201c40, 0x58004001, 0x50305c40, 0x58004001, 0x03f01c26, 0x0a7e0090, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exacanvc0.fp0000644000175000017500000000233314713424663015110 #ifndef ENVYAS static uint32_t NVC0FP_CAComposite[] = { 0x00021462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, /* FRAG_COORD_UMASK = 0x8 */ 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */ 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */ 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */ 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */ 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */ 0x00000000, /* FP_INTERP[0x1c0] */ 0x00000000, /* FP_INTERP[0x200] */ 0x00000000, /* FP_INTERP[0x240] */ 0x00000000, /* FP_INTERP[0x280] */ 0x00000000, /* FP_INTERP[0x2c0] */ 0x00000000, /* FP_INTERP[0x300] */ 0x00000000, 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */ 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */ #include "exacanvc0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp $r4:$r5:$r6:$r7 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () mul ftz rn f32 $r3 $r3 $r7 mul ftz rn f32 $r2 $r2 $r6 mul ftz rn f32 $r1 $r1 $r5 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/videonv110.fp0000644000175000017500000000207714713424663015141 #ifndef ENVYAS static uint32_t NV110FP_NV12[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "videonv110.fpc" }; #else sched (st 0x0) (st 0x0) (st 0x0) ipa pass $r2 a[0x7c] 0x0 0x0 0x1 mufu rcp $r2 $r2 ipa $r0 a[0x80] $r2 0x0 0x1 sched (st 0x0) (st 0x0) (st 0x0) ipa $r1 a[0x84] $r2 0x0 0x1 tex nodep $r4 $r0 0x0 0x0 t2d 0x8 tex nodep $r0 $r0 0x0 0x1 t2d 0xc sched (st 0x0) (st 0x0) (st 0x0) depbar le 0x5 0x1 0x1 fmul ftz $r5 $r4 c0[0x0] fadd ftz $r3 $r5 c0[0x4] sched (st 0x0) (st 0x0) (st 0x0) fadd ftz $r4 $r5 c0[0x8] fadd ftz $r5 $r5 c0[0xc] depbar le 0x5 0x0 0x0 sched (st 0x0) (st 0x0) (st 0x0) ffma ftz $r3 $r0 c0[0x10] $r3 ffma ftz $r4 $r0 c0[0x14] $r4 ffma ftz $r5 $r0 c0[0x18] $r5 sched (st 0x0) (st 0x0) (st 0x0) ffma ftz $r0 $r1 c0[0x1c] $r3 ffma ftz $r2 $r1 c0[0x24] $r5 ffma ftz $r1 $r1 c0[0x20] $r4 sched (st 0x0) (st 0x0) (st 0x0) exit #endif xf86-video-nouveau-1.0.18/src/shader/exac8nvf0.fpc0000644000175000017500000000052014713424663015201 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc0e, 0x74a3fc4a, 0x001ffc0a, 0x74a3fc48, 0xff9c0805, 0x600080a1, 0x001ffc0e, 0x74a3fc42, 0x001ffc0a, 0x74a3fc40, 0xff9c0801, 0x600000a1, 0x001c0002, 0x77000000, 0x009c000e, 0xe3408000, 0x019c000a, 0xe4c03c00, 0x019c0006, 0xe4c03c00, 0x019c0002, 0xe4c03c00, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exasanvf0.fpc0000644000175000017500000000052014713424663015272 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc0e, 0x74a3fc42, 0x001ffc0a, 0x74a3fc40, 0xff9c0811, 0x600000a1, 0x001ffc06, 0x74a3fc4a, 0x001ffc02, 0x74a3fc48, 0xff9c0001, 0x600080bd, 0x001c0002, 0x77000000, 0x021c0c0e, 0xe3408000, 0x021c080a, 0xe3408000, 0x021c0406, 0xe3408000, 0x021c0002, 0xe3408000, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exac8nvc0.fpc0000644000175000017500000000041014713424663015174 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0094, 0x03f09c40, 0xc07e0090, 0x00205e86, 0x80120001, 0x03f0dc40, 0xc07e0084, 0x03f09c40, 0xc07e0080, 0x00201e86, 0x80120000, 0x0400dc40, 0x58000000, 0x00309c28, 0x00305c28, 0x00301c28, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/exacmnvf0.fp0000644000175000017500000000146014713424663015127 #ifndef ENVYAS static uint32_t NVF0FP_Composite[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exacmnvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 0x0 tex t lauto live dfp #:#:#:$r4 t2d c[0x4] xy__ $r2:$r3 0x0 interp mul f32 $r1 a[0x84] $r0 0x0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0 texbar 0x0 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/xfrm2nvf0.vp0000644000175000017500000000404714713424663015114 #ifndef ENVYAS static uint32_t NVF0VP_Transform2[] = { 0x02000461, 0x00000000, 0x00000000, 0x00000000, 0x000ff000, 0x00000000, /* VP_ATTR_EN[0x000] */ 0x0001033f, /* VP_ATTR_EN[0x080] */ 0x00000000, /* VP_ATTR_EN[0x100] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x200] */ 0x00000000, 0x00000000, /* VP_ATTR_EN[0x300] */ 0x00000000, 0x0033f000, /* VP_EXPORT_EN[0x040] */ 0x00000000, /* VP_EXPORT_EN[0x0c0] */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, /* VP_EXPORT_EN[0x2c0] */ 0x00000000, #include "xfrm2nvf0.vpc" }; #else //ld b128 $r0:$r1:$r2:$r3 a[0x80] 0x0 unk39 ld b32 $r0 a[0x80] 0x0 0x0 ld b32 $r1 a[0x84] 0x0 0x0 ld b32 $r2 a[0x88] 0x0 0x0 ld b32 $r3 a[0x8c] 0x0 0x0 //st b128 a[0x70] $r0:$r1:$r2:$r3 0x0 unk39 st b32 a[0x70] $r0 0x0 0x0 st b32 a[0x74] $r1 0x0 0x0 st b32 a[0x78] $r2 0x0 0x0 st b32 a[0x7c] $r3 0x0 0x0 //ld b64 $r0:$r1 a[0x90] 0x0 unk39 ld b32 $r0 a[0x90] 0x0 0x0 ld b32 $r1 a[0x94] 0x0 0x0 mul ftz rn f32 $r2 $r0 c0[0x0] mul ftz rn f32 $r3 $r0 c0[0xc] mul ftz rn f32 $r4 $r0 c0[0x18] fma ftz rn f32 $r2 $r1 c0[0x4] $r2 fma ftz rn f32 $r3 $r1 c0[0x10] $r3 fma ftz rn f32 $r4 $r1 c0[0x1c] $r4 add ftz rn f32 $r2 $r2 c0[0x8] add ftz rn f32 $r3 $r3 c0[0x14] add ftz rn f32 $r4 $r4 c0[0x20] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x24] mul ftz rn f32 $r1 $r3 c0[0x28] //st b64 a[0x80] $r0:$r1 0x0 unk39 st b32 a[0x80] $r0 0x0 0x0 st b32 a[0x84] $r1 0x0 0x0 //ld b64 $r0:$r1 a[0xa0] 0x0 unk39 ld b32 $r0 a[0xa0] 0x0 0x0 ld b32 $r1 a[0xa4] 0x0 0x0 mul ftz rn f32 $r2 $r0 c0[0x2c] mul ftz rn f32 $r3 $r0 c0[0x38] mul ftz rn f32 $r4 $r0 c0[0x44] fma ftz rn f32 $r2 $r1 c0[0x30] $r2 fma ftz rn f32 $r3 $r1 c0[0x3c] $r3 fma ftz rn f32 $r4 $r1 c0[0x48] $r4 add ftz rn f32 $r2 $r2 c0[0x34] add ftz rn f32 $r3 $r3 c0[0x40] add ftz rn f32 $r4 $r4 c0[0x4c] rcp f32 $r4 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r0 $r2 c0[0x50] mul ftz rn f32 $r1 $r3 c0[0x54] //st b64 a[0x90] $r0:$r1 0x0 unk39 st b32 a[0x90] $r0 0x0 0x0 st b32 a[0x94] $r1 0x0 0x0 exit #endif xf86-video-nouveau-1.0.18/src/shader/exasanvc0.fpc0000644000175000017500000000045414713424663015275 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f0dc40, 0xc07e0084, 0x03f09c40, 0xc07e0080, 0x00211e86, 0x80120000, 0x03f05c40, 0xc07e0094, 0x03f01c40, 0xc07e0090, 0x00001e86, 0x8013c001, 0x1030dc40, 0x58000000, 0x10209c40, 0x58000000, 0x10105c40, 0x58000000, 0x10001c40, 0x58000000, 0x88001dff, xf86-video-nouveau-1.0.18/src/shader/videonvc0.fp0000644000175000017500000000174614713424663015144 #ifndef ENVYAS static uint32_t NVC0FP_NV12[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "videonvc0.fpc" }; #else interp pass f32 $r2 a[0x7c] 0x0 0x0 rcp f32 $r2 $r2 interp mul f32 $r0 a[0x80] $r2 0x0 interp mul f32 $r1 a[0x84] $r2 0x0 tex t lauto live dfp #:#:#:$r0 t2d $t0 $s0 $r0:$r1 () mul ftz rn f32 $r5 $r0 c0[0x0] add ftz rn f32 $r3 $r5 c0[0x4] add ftz rn f32 $r4 $r5 c0[0x8] add ftz rn f32 $r5 $r5 c0[0xc] interp mul f32 $r0 a[0x80] $r2 0x0 interp mul f32 $r1 a[0x84] $r2 0x0 tex t lauto live dfp #:#:$r0:$r1 t2d $t1 $s0 $r0:$r1 () fma ftz rn f32 $r3 $r0 c0[0x10] $r3 fma ftz rn f32 $r4 $r0 c0[0x14] $r4 fma ftz rn f32 $r5 $r0 c0[0x18] $r5 fma ftz rn f32 $r0 $r1 c0[0x1c] $r3 fma ftz rn f32 $r2 $r1 c0[0x24] $r5 fma ftz rn f32 $r1 $r1 c0[0x20] $r4 exit #endif xf86-video-nouveau-1.0.18/src/shader/exascnve0.fpc0000644000175000017500000000025014713424663015273 0xfff01c00, 0xc07e007c, 0x10001c00, 0xc8000000, 0x03f05c40, 0xc07e0084, 0x03f01c40, 0xc07e0080, 0x00001e86, 0x8013c000, 0x00001de6, 0xf0000000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exascnve0.fp0000644000175000017500000000105414713424663015133 #ifndef ENVYAS static uint32_t NVE0FP_Source[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exascnve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () texbar 0x0 long exit #endif xf86-video-nouveau-1.0.18/src/shader/videonv110.fpc0000644000175000017500000000116014713424663015274 0xfc0007e0, 0x001f8000, 0xcff7ff02, 0xe003ff87, 0x00470202, 0x50800000, 0x0027ff00, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x4027ff01, 0xe043ff88, 0x2ff70004, 0xc03a0004, 0x2ff70000, 0xc03a0016, 0xfc0007e0, 0x001f8000, 0x34170001, 0xf0f00000, 0x00070405, 0x4c681000, 0x00170503, 0x4c581000, 0xfc0007e0, 0x001f8000, 0x00270504, 0x4c581000, 0x00370505, 0x4c581000, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00470003, 0x49a00180, 0x00570004, 0x49a00200, 0x00670005, 0x49a00280, 0xfc0007e0, 0x001f8000, 0x00770100, 0x49a00180, 0x00970102, 0x49a00280, 0x00870101, 0x49a00200, 0xfc0007e0, 0x001f8000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exas8nvf0.fpc0000644000175000017500000000036014713424663015223 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc06, 0x74a3fc42, 0x001ffc02, 0x74a3fc40, 0xff9c0001, 0x600000a1, 0x001c0002, 0x77000000, 0x001c000e, 0xe4c03c00, 0x001c000a, 0xe4c03c00, 0x001c0006, 0xe4c03c00, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exacmnvf0.fpc0000644000175000017500000000052014713424663015266 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc0e, 0x74a3fc4a, 0x001ffc0a, 0x74a3fc48, 0xff9c0811, 0x600080a1, 0x001ffc06, 0x74a3fc42, 0x001ffc02, 0x74a3fc40, 0xff9c0001, 0x600000bd, 0x001c0002, 0x77000000, 0x021c0c0e, 0xe3408000, 0x021c080a, 0xe3408000, 0x021c0406, 0xe3408000, 0x021c0002, 0xe3408000, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/exacanvf0.fpc0000644000175000017500000000052014713424663015252 0x7f9ffc02, 0x7483fc3e, 0x021c0002, 0x84000000, 0x001ffc0e, 0x74a3fc4a, 0x001ffc0a, 0x74a3fc48, 0xff9c0811, 0x600080bd, 0x001ffc06, 0x74a3fc42, 0x001ffc02, 0x74a3fc40, 0xff9c0001, 0x600000bd, 0x001c0002, 0x77000000, 0x039c0c0e, 0xe3408000, 0x031c080a, 0xe3408000, 0x029c0406, 0xe3408000, 0x021c0002, 0xe3408000, 0x001c003c, 0x18000000, xf86-video-nouveau-1.0.18/src/shader/videonve0.fpc0000644000175000017500000000102014713424663015272 0xe23282e7, 0x2c220202, 0xfff09c00, 0xc07e007c, 0x10209c00, 0xc8000000, 0x0bf01c40, 0xc07e0080, 0x0bf05c40, 0xc07e0084, 0x00011e86, 0x80120000, 0x00001f06, 0x80130001, 0x04001de6, 0xf0000000, 0x02004287, 0x22004a22, 0x00415c40, 0x58004000, 0x1050dc20, 0x50004000, 0x20511c20, 0x50004000, 0x30515c20, 0x50004000, 0x00001de6, 0xf0000000, 0x4000dc40, 0x30064000, 0x50011c40, 0x30084000, 0x42004287, 0x200002e0, 0x60015c40, 0x300a4000, 0x70101c40, 0x30064000, 0x90109c40, 0x300a4000, 0x80105c40, 0x30084000, 0x00001de7, 0x80000000, xf86-video-nouveau-1.0.18/src/shader/exac8nv110.fpc0000644000175000017500000000071014713424663015176 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff03, 0xe043ff89, 0xfc0007e0, 0x001f8000, 0x0007ff02, 0xe043ff89, 0x2ff70201, 0xc03a0014, 0x4007ff03, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff02, 0xe043ff88, 0x2ff70200, 0xc03a0004, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00170003, 0x5c681000, 0x00370002, 0x5c980780, 0x00370001, 0x5c980780, 0xfc0007e0, 0x001f8000, 0x00370000, 0x5c980780, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exac8nvf0.fp0000644000175000017500000000141414713424663015041 #ifndef ENVYAS static uint32_t NVF0FP_Composite_A8[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exac8nvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 0x0 tex t lauto live dfp #:#:#:$r1 t2d c[0x4] xy__ $r2:$r3 0x0 interp mul f32 $r3 a[0x84] $r0 0x0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 0x0 tex t lauto live dfp #:#:#:$r0 t2d c[0x0] xy__ $r2:$r3 0x0 texbar 0x0 mul ftz rn f32 $r3 $r0 $r1 mov b32 $r2 $r3 mov b32 $r1 $r3 mov b32 $r0 $r3 exit #endif xf86-video-nouveau-1.0.18/src/shader/exacanve0.fp0000644000175000017500000000235314713424663015114 #ifndef ENVYAS static uint32_t NVE0FP_CAComposite[] = { 0x00021462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, /* FRAG_COORD_UMASK = 0x8 */ 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */ 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */ 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */ 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */ 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */ 0x00000000, /* FP_INTERP[0x1c0] */ 0x00000000, /* FP_INTERP[0x200] */ 0x00000000, /* FP_INTERP[0x240] */ 0x00000000, /* FP_INTERP[0x280] */ 0x00000000, /* FP_INTERP[0x2c0] */ 0x00000000, /* FP_INTERP[0x300] */ 0x00000000, 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */ 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */ #include "exacanve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x94] $r0 0x0 interp mul f32 $r2 a[0x90] $r0 0x0 tex t lauto live dfp $r4:$r5:$r6:$r7 t2d $t1 $s0 $r2:$r3 () interp mul f32 $r1 a[0x84] $r0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t0 $s0 $r0:$r1 () texbar 0x0 mul ftz rn f32 $r3 $r3 $r7 mul ftz rn f32 $r2 $r2 $r6 mul ftz rn f32 $r1 $r1 $r5 mul ftz rn f32 $r0 $r0 $r4 long exit #endif xf86-video-nouveau-1.0.18/src/shader/exasanve0.fp0000644000175000017500000000144114713424663015131 #ifndef ENVYAS static uint32_t NVE0FP_CACompositeSrcAlpha[] = { 0x00021462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x00000a0a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exasanve0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r3 a[0x84] $r0 0x0 interp mul f32 $r2 a[0x80] $r0 0x0 tex t lauto live dfp #:#:#:$r4 t2d $t0 $s0 $r2:$r3 () interp mul f32 $r1 a[0x94] $r0 0x0 interp mul f32 $r0 a[0x90] $r0 0x0 tex t lauto live dfp $r0:$r1:$r2:$r3 t2d $t1 $s0 $r0:$r1 () texbar 0x0 mul ftz rn f32 $r3 $r3 $r4 mul ftz rn f32 $r2 $r2 $r4 mul ftz rn f32 $r1 $r1 $r4 mul ftz rn f32 $r0 $r0 $r4 long exit #endif xf86-video-nouveau-1.0.18/src/shader/exacmnv110.fpc0000644000175000017500000000071014713424663015263 0xfc0007e0, 0x001f8000, 0xcff7ff00, 0xe003ff87, 0x00470000, 0x50800000, 0x4007ff03, 0xe043ff89, 0xfc0007e0, 0x001f8000, 0x0007ff02, 0xe043ff89, 0x2ff70204, 0xc03a0014, 0x4007ff01, 0xe043ff88, 0xfc0007e0, 0x001f8000, 0x0007ff00, 0xe043ff88, 0xaff70000, 0xc03a0007, 0x34070000, 0xf0f00000, 0xfc0007e0, 0x001f8000, 0x00470303, 0x5c681000, 0x00470202, 0x5c681000, 0x00470101, 0x5c681000, 0xfc0007e0, 0x001f8000, 0x00470000, 0x5c681000, 0x0007000f, 0xe3000000, xf86-video-nouveau-1.0.18/src/shader/exas8nvf0.fp0000644000175000017500000000114514713424663015062 #ifndef ENVYAS static uint32_t NVF0FP_Source_A8[] = { 0x00001462, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0x0000000a, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000f, 0x00000000, #include "exas8nvf0.fpc" }; #else interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 rcp f32 $r0 $r0 interp mul f32 $r1 a[0x84] $r0 0x0 0x0 interp mul f32 $r0 a[0x80] $r0 0x0 0x0 tex t lauto live dfp #:#:#:$r0 t2d c[0x0] xy__ $r0:$r1 0x0 texbar 0x0 mov b32 $r3 $r0 mov b32 $r2 $r0 mov b32 $r1 $r0 exit #endif xf86-video-nouveau-1.0.18/src/hwdefs/0000755000175000017500000000000014713424676013006 5xf86-video-nouveau-1.0.18/src/hwdefs/nv50_defs.xml.h0000644000175000017500000001673514713424663015477 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_DEFS_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_DEFS_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv50_texture.xml ( 7947 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV50_SURFACE_FORMAT_BITMAP 0x0000001c #define NV50_SURFACE_FORMAT_UNK1D 0x0000001d #define NV50_SURFACE_FORMAT_RGBA32_FLOAT 0x000000c0 #define NV50_SURFACE_FORMAT_RGBA32_SINT 0x000000c1 #define NV50_SURFACE_FORMAT_RGBA32_UINT 0x000000c2 #define NV50_SURFACE_FORMAT_RGBX32_FLOAT 0x000000c3 #define NV50_SURFACE_FORMAT_RGBX32_SINT 0x000000c4 #define NV50_SURFACE_FORMAT_RGBX32_UINT 0x000000c5 #define NV50_SURFACE_FORMAT_RGBA16_UNORM 0x000000c6 #define NV50_SURFACE_FORMAT_RGBA16_SNORM 0x000000c7 #define NV50_SURFACE_FORMAT_RGBA16_SINT 0x000000c8 #define NV50_SURFACE_FORMAT_RGBA16_UINT 0x000000c9 #define NV50_SURFACE_FORMAT_RGBA16_FLOAT 0x000000ca #define NV50_SURFACE_FORMAT_RG32_FLOAT 0x000000cb #define NV50_SURFACE_FORMAT_RG32_SINT 0x000000cc #define NV50_SURFACE_FORMAT_RG32_UINT 0x000000cd #define NV50_SURFACE_FORMAT_RGBX16_FLOAT 0x000000ce #define NV50_SURFACE_FORMAT_BGRA8_UNORM 0x000000cf #define NV50_SURFACE_FORMAT_BGRA8_SRGB 0x000000d0 #define NV50_SURFACE_FORMAT_RGB10_A2_UNORM 0x000000d1 #define NV50_SURFACE_FORMAT_RGB10_A2_UINT 0x000000d2 #define NV50_SURFACE_FORMAT_RGBA8_UNORM 0x000000d5 #define NV50_SURFACE_FORMAT_RGBA8_SRGB 0x000000d6 #define NV50_SURFACE_FORMAT_RGBA8_SNORM 0x000000d7 #define NV50_SURFACE_FORMAT_RGBA8_SINT 0x000000d8 #define NV50_SURFACE_FORMAT_RGBA8_UINT 0x000000d9 #define NV50_SURFACE_FORMAT_RG16_UNORM 0x000000da #define NV50_SURFACE_FORMAT_RG16_SNORM 0x000000db #define NV50_SURFACE_FORMAT_RG16_SINT 0x000000dc #define NV50_SURFACE_FORMAT_RG16_UINT 0x000000dd #define NV50_SURFACE_FORMAT_RG16_FLOAT 0x000000de #define NV50_SURFACE_FORMAT_BGR10_A2_UNORM 0x000000df #define NV50_SURFACE_FORMAT_R11G11B10_FLOAT 0x000000e0 #define NV50_SURFACE_FORMAT_R32_SINT 0x000000e3 #define NV50_SURFACE_FORMAT_R32_UINT 0x000000e4 #define NV50_SURFACE_FORMAT_R32_FLOAT 0x000000e5 #define NV50_SURFACE_FORMAT_BGRX8_UNORM 0x000000e6 #define NV50_SURFACE_FORMAT_BGRX8_SRGB 0x000000e7 #define NV50_SURFACE_FORMAT_B5G6R5_UNORM 0x000000e8 #define NV50_SURFACE_FORMAT_BGR5_A1_UNORM 0x000000e9 #define NV50_SURFACE_FORMAT_RG8_UNORM 0x000000ea #define NV50_SURFACE_FORMAT_RG8_SNORM 0x000000eb #define NV50_SURFACE_FORMAT_RG8_SINT 0x000000ec #define NV50_SURFACE_FORMAT_RG8_UINT 0x000000ed #define NV50_SURFACE_FORMAT_R16_UNORM 0x000000ee #define NV50_SURFACE_FORMAT_R16_SNORM 0x000000ef #define NV50_SURFACE_FORMAT_R16_SINT 0x000000f0 #define NV50_SURFACE_FORMAT_R16_UINT 0x000000f1 #define NV50_SURFACE_FORMAT_R16_FLOAT 0x000000f2 #define NV50_SURFACE_FORMAT_R8_UNORM 0x000000f3 #define NV50_SURFACE_FORMAT_R8_SNORM 0x000000f4 #define NV50_SURFACE_FORMAT_R8_SINT 0x000000f5 #define NV50_SURFACE_FORMAT_R8_UINT 0x000000f6 #define NV50_SURFACE_FORMAT_A8_UNORM 0x000000f7 #define NV50_SURFACE_FORMAT_BGR5_X1_UNORM 0x000000f8 #define NV50_SURFACE_FORMAT_RGBX8_UNORM 0x000000f9 #define NV50_SURFACE_FORMAT_RGBX8_SRGB 0x000000fa #define NV50_SURFACE_FORMAT_BGR5_X1_UNORM_UNKFB 0x000000fb #define NV50_SURFACE_FORMAT_BGR5_X1_UNORM_UNKFC 0x000000fc #define NV50_SURFACE_FORMAT_BGRX8_UNORM_UNKFD 0x000000fd #define NV50_SURFACE_FORMAT_BGRX8_UNORM_UNKFE 0x000000fe #define NV50_SURFACE_FORMAT_Y32_UINT_UNKFF 0x000000ff #define NV50_ZETA_FORMAT_Z32_FLOAT 0x0000000a #define NV50_ZETA_FORMAT_Z16_UNORM 0x00000013 #define NV50_ZETA_FORMAT_S8_Z24_UNORM 0x00000014 #define NV50_ZETA_FORMAT_Z24_X8_UNORM 0x00000015 #define NV50_ZETA_FORMAT_Z24_S8_UNORM 0x00000016 #define NV50_ZETA_FORMAT_Z24_C8_UNORM 0x00000018 #define NV50_ZETA_FORMAT_Z32_S8_X24_FLOAT 0x00000019 #define NV50_ZETA_FORMAT_Z24_X8_S8_C8_X16_UNORM 0x0000001d #define NV50_ZETA_FORMAT_Z32_X8_C8_X16_FLOAT 0x0000001e #define NV50_ZETA_FORMAT_Z32_S8_C8_X16_FLOAT 0x0000001f #define NV50_QUERY__SIZE 0x00000010 #define NV50_QUERY_COUNTER 0x00000000 #define NV50_QUERY_RES 0x00000004 #define NV50_QUERY_TIME 0x00000008 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_DEFS_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv_3ddefs.xml.h0000644000175000017500000001060014713424663015542 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_3DDEFS_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_3DDEFS_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV50_BLEND_FACTOR_ZERO 0x00004000 #define NV50_BLEND_FACTOR_ONE 0x00004001 #define NV50_BLEND_FACTOR_SRC_COLOR 0x00004300 #define NV50_BLEND_FACTOR_ONE_MINUS_SRC_COLOR 0x00004301 #define NV50_BLEND_FACTOR_SRC_ALPHA 0x00004302 #define NV50_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA 0x00004303 #define NV50_BLEND_FACTOR_DST_ALPHA 0x00004304 #define NV50_BLEND_FACTOR_ONE_MINUS_DST_ALPHA 0x00004305 #define NV50_BLEND_FACTOR_DST_COLOR 0x00004306 #define NV50_BLEND_FACTOR_ONE_MINUS_DST_COLOR 0x00004307 #define NV50_BLEND_FACTOR_SRC_ALPHA_SATURATE 0x00004308 #define NV50_BLEND_FACTOR_CONSTANT_COLOR 0x0000c001 #define NV50_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR 0x0000c002 #define NV50_BLEND_FACTOR_CONSTANT_ALPHA 0x0000c003 #define NV50_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA 0x0000c004 #define NV50_BLEND_FACTOR_SRC1_COLOR 0x0000c900 #define NV50_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR 0x0000c901 #define NV50_BLEND_FACTOR_SRC1_ALPHA 0x0000c902 #define NV50_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA 0x0000c903 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_3DDEFS_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv50_2d.xml.h0000644000175000017500000004125314713424663015054 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_2D_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_2D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV50_2D_DMA_NOTIFY 0x00000180 #define NV50_2D_DMA_DST 0x00000184 #define NV50_2D_DMA_SRC 0x00000188 #define NV50_2D_DMA_COND 0x0000018c #define NV50_2D_DST_FORMAT 0x00000200 #define NV50_2D_DST_LINEAR 0x00000204 #define NV50_2D_DST_TILE_MODE 0x00000208 #define NV50_2D_DST_DEPTH 0x0000020c #define NV50_2D_DST_LAYER 0x00000210 #define NV50_2D_DST_PITCH 0x00000214 #define NV50_2D_DST_WIDTH 0x00000218 #define NV50_2D_DST_HEIGHT 0x0000021c #define NV50_2D_DST_ADDRESS_HIGH 0x00000220 #define NV50_2D_DST_ADDRESS_LOW 0x00000224 #define NV50_2D_UNK228 0x00000228 #define NVC0_2D_UNK228 0x00000228 #define NV50_2D_SRC_FORMAT 0x00000230 #define NV50_2D_SRC_LINEAR 0x00000234 #define NV50_2D_SRC_TILE_MODE 0x00000238 #define NV50_2D_SRC_DEPTH 0x0000023c #define NV50_2D_SRC_LAYER 0x00000240 #define NVC0_2D_UNK0240 0x00000240 #define NV50_2D_SRC_PITCH 0x00000244 #define NV50_2D_SRC_PITCH__MAX 0x00040000 #define NV50_2D_SRC_WIDTH 0x00000248 #define NV50_2D_SRC_WIDTH__MAX 0x00010000 #define NV50_2D_SRC_HEIGHT 0x0000024c #define NV50_2D_SRC_HEIGHT__MAX 0x00010000 #define NV50_2D_SRC_ADDRESS_HIGH 0x00000250 #define NV50_2D_SRC_ADDRESS_LOW 0x00000254 #define NV50_2D_UNK258 0x00000258 #define NV50_2D_UNK260 0x00000260 #define NV50_2D_COND_ADDRESS_HIGH 0x00000264 #define NV50_2D_COND_ADDRESS_LOW 0x00000268 #define NV50_2D_COND_MODE 0x0000026c #define NV50_2D_COND_MODE_NEVER 0x00000000 #define NV50_2D_COND_MODE_ALWAYS 0x00000001 #define NV50_2D_COND_MODE_RES_NON_ZERO 0x00000002 #define NV50_2D_COND_MODE_EQUAL 0x00000003 #define NV50_2D_COND_MODE_NOT_EQUAL 0x00000004 #define NV50_2D_CLIP_X 0x00000280 #define NV50_2D_CLIP_Y 0x00000284 #define NV50_2D_CLIP_W 0x00000288 #define NV50_2D_CLIP_H 0x0000028c #define NV50_2D_CLIP_ENABLE 0x00000290 #define NV50_2D_COLOR_KEY_FORMAT 0x00000294 #define NV50_2D_COLOR_KEY_FORMAT_16BPP 0x00000000 #define NV50_2D_COLOR_KEY_FORMAT_15BPP 0x00000001 #define NV50_2D_COLOR_KEY_FORMAT_24BPP 0x00000002 #define NV50_2D_COLOR_KEY_FORMAT_30BPP 0x00000003 #define NV50_2D_COLOR_KEY_FORMAT_8BPP 0x00000004 #define NV50_2D_COLOR_KEY_FORMAT_16BPP2 0x00000005 #define NV50_2D_COLOR_KEY_FORMAT_32BPP 0x00000006 #define NV50_2D_COLOR_KEY 0x00000298 #define NV50_2D_COLOR_KEY_ENABLE 0x0000029c #define NV50_2D_ROP 0x000002a0 #define NV50_2D_BETA1 0x000002a4 #define NV50_2D_BETA1_BETA1__MASK 0x7f800000 #define NV50_2D_BETA1_BETA1__SHIFT 23 #define NV50_2D_BETA4 0x000002a8 #define NV50_2D_BETA4_B__MASK 0x000000ff #define NV50_2D_BETA4_B__SHIFT 0 #define NV50_2D_BETA4_G__MASK 0x0000ff00 #define NV50_2D_BETA4_G__SHIFT 8 #define NV50_2D_BETA4_R__MASK 0x00ff0000 #define NV50_2D_BETA4_R__SHIFT 16 #define NV50_2D_BETA4_A__MASK 0xff000000 #define NV50_2D_BETA4_A__SHIFT 24 #define NV50_2D_OPERATION 0x000002ac #define NV50_2D_OPERATION_SRCCOPY_AND 0x00000000 #define NV50_2D_OPERATION_ROP_AND 0x00000001 #define NV50_2D_OPERATION_BLEND 0x00000002 #define NV50_2D_OPERATION_SRCCOPY 0x00000003 #define NV50_2D_OPERATION_ROP 0x00000004 #define NV50_2D_OPERATION_SRCCOPY_PREMULT 0x00000005 #define NV50_2D_OPERATION_BLEND_PREMULT 0x00000006 #define NV50_2D_PATTERN_OFFSET 0x000002b0 #define NV50_2D_PATTERN_OFFSET_X__MASK 0x0000003f #define NV50_2D_PATTERN_OFFSET_X__SHIFT 0 #define NV50_2D_PATTERN_OFFSET_Y__MASK 0x00003f00 #define NV50_2D_PATTERN_OFFSET_Y__SHIFT 8 #define NV50_2D_PATTERN_SELECT 0x000002b4 #define NV50_2D_PATTERN_SELECT_MONO_8X8 0x00000000 #define NV50_2D_PATTERN_SELECT_MONO_64X1 0x00000001 #define NV50_2D_PATTERN_SELECT_MONO_1X64 0x00000002 #define NV50_2D_PATTERN_SELECT_COLOR 0x00000003 #define NVC0_2D_UNK2DC 0x000002dc #define NVC0_2D_UNK2E0 0x000002e0 #define NV50_2D_PATTERN_COLOR_FORMAT 0x000002e8 #define NV50_2D_PATTERN_COLOR_FORMAT_16BPP 0x00000000 #define NV50_2D_PATTERN_COLOR_FORMAT_15BPP 0x00000001 #define NV50_2D_PATTERN_COLOR_FORMAT_32BPP 0x00000002 #define NV50_2D_PATTERN_COLOR_FORMAT_8BPP 0x00000003 #define NV50_2D_PATTERN_COLOR_FORMAT_UNK4 0x00000004 #define NV50_2D_PATTERN_COLOR_FORMAT_UNK5 0x00000005 #define NV50_2D_PATTERN_COLOR_FORMAT_UNK6 0x00000006 #define NV50_2D_PATTERN_MONO_FORMAT 0x000002ec #define NV50_2D_PATTERN_MONO_FORMAT_CGA6 0x00000000 #define NV50_2D_PATTERN_MONO_FORMAT_LE 0x00000001 #define NV50_2D_PATTERN_COLOR(i0) (0x000002f0 + 0x4*(i0)) #define NV50_2D_PATTERN_COLOR__ESIZE 0x00000004 #define NV50_2D_PATTERN_COLOR__LEN 0x00000002 #define NV50_2D_PATTERN_BITMAP(i0) (0x000002f8 + 0x4*(i0)) #define NV50_2D_PATTERN_BITMAP__ESIZE 0x00000004 #define NV50_2D_PATTERN_BITMAP__LEN 0x00000002 #define NV50_2D_PATTERN_X8R8G8B8(i0) (0x00000300 + 0x4*(i0)) #define NV50_2D_PATTERN_X8R8G8B8__ESIZE 0x00000004 #define NV50_2D_PATTERN_X8R8G8B8__LEN 0x00000040 #define NV50_2D_PATTERN_X8R8G8B8_B__MASK 0x000000ff #define NV50_2D_PATTERN_X8R8G8B8_B__SHIFT 0 #define NV50_2D_PATTERN_X8R8G8B8_G__MASK 0x0000ff00 #define NV50_2D_PATTERN_X8R8G8B8_G__SHIFT 8 #define NV50_2D_PATTERN_X8R8G8B8_R__MASK 0x00ff0000 #define NV50_2D_PATTERN_X8R8G8B8_R__SHIFT 16 #define NV50_2D_PATTERN_R5G6B5(i0) (0x00000400 + 0x4*(i0)) #define NV50_2D_PATTERN_R5G6B5__ESIZE 0x00000004 #define NV50_2D_PATTERN_R5G6B5__LEN 0x00000020 #define NV50_2D_PATTERN_R5G6B5_B0__MASK 0x0000001f #define NV50_2D_PATTERN_R5G6B5_B0__SHIFT 0 #define NV50_2D_PATTERN_R5G6B5_G0__MASK 0x000007e0 #define NV50_2D_PATTERN_R5G6B5_G0__SHIFT 5 #define NV50_2D_PATTERN_R5G6B5_R0__MASK 0x0000f800 #define NV50_2D_PATTERN_R5G6B5_R0__SHIFT 11 #define NV50_2D_PATTERN_R5G6B5_B1__MASK 0x001f0000 #define NV50_2D_PATTERN_R5G6B5_B1__SHIFT 16 #define NV50_2D_PATTERN_R5G6B5_G1__MASK 0x07e00000 #define NV50_2D_PATTERN_R5G6B5_G1__SHIFT 21 #define NV50_2D_PATTERN_R5G6B5_R1__MASK 0xf8000000 #define NV50_2D_PATTERN_R5G6B5_R1__SHIFT 27 #define NV50_2D_PATTERN_X1R5G5B5(i0) (0x00000480 + 0x4*(i0)) #define NV50_2D_PATTERN_X1R5G5B5__ESIZE 0x00000004 #define NV50_2D_PATTERN_X1R5G5B5__LEN 0x00000020 #define NV50_2D_PATTERN_X1R5G5B5_B0__MASK 0x0000001f #define NV50_2D_PATTERN_X1R5G5B5_B0__SHIFT 0 #define NV50_2D_PATTERN_X1R5G5B5_G0__MASK 0x000003e0 #define NV50_2D_PATTERN_X1R5G5B5_G0__SHIFT 5 #define NV50_2D_PATTERN_X1R5G5B5_R0__MASK 0x00007c00 #define NV50_2D_PATTERN_X1R5G5B5_R0__SHIFT 10 #define NV50_2D_PATTERN_X1R5G5B5_B1__MASK 0x001f0000 #define NV50_2D_PATTERN_X1R5G5B5_B1__SHIFT 16 #define NV50_2D_PATTERN_X1R5G5B5_G1__MASK 0x03e00000 #define NV50_2D_PATTERN_X1R5G5B5_G1__SHIFT 21 #define NV50_2D_PATTERN_X1R5G5B5_R1__MASK 0x7c000000 #define NV50_2D_PATTERN_X1R5G5B5_R1__SHIFT 26 #define NV50_2D_PATTERN_Y8(i0) (0x00000500 + 0x4*(i0)) #define NV50_2D_PATTERN_Y8__ESIZE 0x00000004 #define NV50_2D_PATTERN_Y8__LEN 0x00000010 #define NV50_2D_PATTERN_Y8_Y0__MASK 0x000000ff #define NV50_2D_PATTERN_Y8_Y0__SHIFT 0 #define NV50_2D_PATTERN_Y8_Y1__MASK 0x0000ff00 #define NV50_2D_PATTERN_Y8_Y1__SHIFT 8 #define NV50_2D_PATTERN_Y8_Y2__MASK 0x00ff0000 #define NV50_2D_PATTERN_Y8_Y2__SHIFT 16 #define NV50_2D_PATTERN_Y8_Y3__MASK 0xff000000 #define NV50_2D_PATTERN_Y8_Y3__SHIFT 24 #define NVC0_2D_DRAW_COLOR_LONG(i0) (0x00000540 + 0x4*(i0)) #define NVC0_2D_DRAW_COLOR_LONG__ESIZE 0x00000004 #define NVC0_2D_DRAW_COLOR_LONG__LEN 0x00000004 #define NV50_2D_DRAW_SHAPE 0x00000580 #define NV50_2D_DRAW_SHAPE_POINTS 0x00000000 #define NV50_2D_DRAW_SHAPE_LINES 0x00000001 #define NV50_2D_DRAW_SHAPE_LINE_STRIP 0x00000002 #define NV50_2D_DRAW_SHAPE_TRIANGLES 0x00000003 #define NV50_2D_DRAW_SHAPE_RECTANGLES 0x00000004 #define NV50_2D_DRAW_COLOR_FORMAT 0x00000584 #define NV50_2D_DRAW_COLOR 0x00000588 #define NV50_2D_UNK58C 0x0000058c #define NV50_2D_UNK58C_0 0x00000001 #define NV50_2D_UNK58C_1 0x00000010 #define NV50_2D_UNK58C_2 0x00000100 #define NV50_2D_UNK58C_3 0x00001000 #define NV50_2D_DRAW_POINT16 0x000005e0 #define NV50_2D_DRAW_POINT16_X__MASK 0x0000ffff #define NV50_2D_DRAW_POINT16_X__SHIFT 0 #define NV50_2D_DRAW_POINT16_Y__MASK 0xffff0000 #define NV50_2D_DRAW_POINT16_Y__SHIFT 16 #define NV50_2D_DRAW_POINT32_X(i0) (0x00000600 + 0x8*(i0)) #define NV50_2D_DRAW_POINT32_X__ESIZE 0x00000008 #define NV50_2D_DRAW_POINT32_X__LEN 0x00000040 #define NV50_2D_DRAW_POINT32_Y(i0) (0x00000604 + 0x8*(i0)) #define NV50_2D_DRAW_POINT32_Y__ESIZE 0x00000008 #define NV50_2D_DRAW_POINT32_Y__LEN 0x00000040 #define NV50_2D_SIFC_BITMAP_ENABLE 0x00000800 #define NV50_2D_SIFC_FORMAT 0x00000804 #define NV50_2D_SIFC_BITMAP_FORMAT 0x00000808 #define NV50_2D_SIFC_BITMAP_FORMAT_I1 0x00000000 #define NV50_2D_SIFC_BITMAP_FORMAT_I4 0x00000001 #define NV50_2D_SIFC_BITMAP_FORMAT_I8 0x00000002 #define NV50_2D_SIFC_BITMAP_LSB_FIRST 0x0000080c #define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE 0x00000810 #define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_PACKED 0x00000000 #define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_BYTE 0x00000001 #define NV50_2D_SIFC_BITMAP_LINE_PACK_MODE_ALIGN_WORD 0x00000002 #define NV50_2D_SIFC_BITMAP_COLOR_BIT0 0x00000814 #define NV50_2D_SIFC_BITMAP_COLOR_BIT1 0x00000818 #define NV50_2D_SIFC_BITMAP_WRITE_BIT0_ENABLE 0x0000081c #define NV50_2D_SIFC_WIDTH 0x00000838 #define NV50_2D_SIFC_HEIGHT 0x0000083c #define NV50_2D_SIFC_DX_DU_FRACT 0x00000840 #define NV50_2D_SIFC_DX_DU_INT 0x00000844 #define NV50_2D_SIFC_DY_DV_FRACT 0x00000848 #define NV50_2D_SIFC_DY_DV_INT 0x0000084c #define NV50_2D_SIFC_DST_X_FRACT 0x00000850 #define NV50_2D_SIFC_DST_X_INT 0x00000854 #define NV50_2D_SIFC_DST_Y_FRACT 0x00000858 #define NV50_2D_SIFC_DST_Y_INT 0x0000085c #define NV50_2D_SIFC_DATA 0x00000860 #define NV50_2D_UNK0870 0x00000870 #define NV50_2D_UNK0880 0x00000880 #define NV50_2D_UNK0884 0x00000884 #define NV50_2D_UNK0888 0x00000888 #define NV50_2D_BLIT_CONTROL 0x0000088c #define NV50_2D_BLIT_CONTROL_ORIGIN__MASK 0x00000001 #define NV50_2D_BLIT_CONTROL_ORIGIN__SHIFT 0 #define NV50_2D_BLIT_CONTROL_ORIGIN_CENTER 0x00000000 #define NV50_2D_BLIT_CONTROL_ORIGIN_CORNER 0x00000001 #define NV50_2D_BLIT_CONTROL_FILTER__MASK 0x00000010 #define NV50_2D_BLIT_CONTROL_FILTER__SHIFT 4 #define NV50_2D_BLIT_CONTROL_FILTER_POINT_SAMPLE 0x00000000 #define NV50_2D_BLIT_CONTROL_FILTER_BILINEAR 0x00000010 #define NV50_2D_BLIT_DST_X 0x000008b0 #define NV50_2D_BLIT_DST_Y 0x000008b4 #define NV50_2D_BLIT_DST_W 0x000008b8 #define NV50_2D_BLIT_DST_H 0x000008bc #define NV50_2D_BLIT_DU_DX_FRACT 0x000008c0 #define NV50_2D_BLIT_DU_DX_INT 0x000008c4 #define NV50_2D_BLIT_DV_DY_FRACT 0x000008c8 #define NV50_2D_BLIT_DV_DY_INT 0x000008cc #define NV50_2D_BLIT_SRC_X_FRACT 0x000008d0 #define NV50_2D_BLIT_SRC_X_INT 0x000008d4 #define NV50_2D_BLIT_SRC_Y_FRACT 0x000008d8 #define NV50_2D_BLIT_SRC_Y_INT 0x000008dc #define NVC0_2D_FIRMWARE(i0) (0x000008e0 + 0x4*(i0)) #define NVC0_2D_FIRMWARE__ESIZE 0x00000004 #define NVC0_2D_FIRMWARE__LEN 0x00000020 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_2D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nvc0_m2mf.xml.h0000644000175000017500000001750114713424663015465 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NVC0_M2MF_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NVC0_M2MF_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NVC0_M2MF_TILING_MODE_IN 0x00000204 #define NVC0_M2MF_TILING_PITCH_IN 0x00000208 #define NVC0_M2MF_TILING_HEIGHT_IN 0x0000020c #define NVC0_M2MF_TILING_DEPTH_IN 0x00000210 #define NVC0_M2MF_TILING_POSITION_IN_Z 0x00000214 #define NVC0_M2MF_TILING_MODE_OUT 0x00000220 #define NVC0_M2MF_TILING_PITCH_OUT 0x00000224 #define NVC0_M2MF_TILING_HEIGHT_OUT 0x00000228 #define NVC0_M2MF_TILING_DEPTH_OUT 0x0000022c #define NVC0_M2MF_TILING_POSITION_OUT_Z 0x00000230 #define NVC0_M2MF_OFFSET_OUT_HIGH 0x00000238 #define NVC0_M2MF_OFFSET_OUT_LOW 0x0000023c #define NVC0_M2MF_FIRMWARE(i0) (0x0000027c + 0x4*(i0)) #define NVC0_M2MF_FIRMWARE__ESIZE 0x00000004 #define NVC0_M2MF_FIRMWARE__LEN 0x00000020 #define NVC0_M2MF_EXEC 0x00000300 #define NVC0_M2MF_EXEC_PUSH 0x00000001 #define NVC0_M2MF_EXEC_LINEAR_IN 0x00000010 #define NVC0_M2MF_EXEC_LINEAR_OUT 0x00000100 #define NVC0_M2MF_EXEC_QUERY__MASK 0x00003000 #define NVC0_M2MF_EXEC_QUERY__SHIFT 12 #define NVC0_M2MF_EXEC_QUERY_NO 0x00000000 #define NVC0_M2MF_EXEC_QUERY_UNK1 0x00001000 #define NVC0_M2MF_EXEC_QUERY_YES 0x00002000 #define NVC0_M2MF_EXEC_BUF_NOTIFY 0x00030000 #define NVC0_M2MF_EXEC_QUERY_SHORT 0x00100000 #define NVC0_M2MF_DATA 0x00000304 #define NVC0_M2MF_UNK308 0x00000308 #define NVC0_M2MF_OFFSET_IN_HIGH 0x0000030c #define NVC0_M2MF_OFFSET_IN_LOW 0x00000310 #define NVC0_M2MF_PITCH_IN 0x00000314 #define NVC0_M2MF_PITCH_OUT 0x00000318 #define NVC0_M2MF_LINE_LENGTH_IN 0x0000031c #define NVC0_M2MF_LINE_COUNT 0x00000320 #define NVC0_M2MF_QUERY_ADDRESS_HIGH 0x0000032c #define NVC0_M2MF_QUERY_ADDRESS_LOW 0x00000330 #define NVC0_M2MF_QUERY_SEQUENCE 0x00000334 #define NVC0_M2MF_COND_ADDRESS_HIGH 0x00000338 #define NVC0_M2MF_COND_ADDRESS_LOW 0x0000033c #define NVC0_M2MF_COND_MODE 0x00000340 #define NVC0_M2MF_COND_MODE_NEVER 0x00000000 #define NVC0_M2MF_COND_MODE_ALWAYS 0x00000001 #define NVC0_M2MF_COND_MODE_RES_NON_ZERO 0x00000002 #define NVC0_M2MF_COND_MODE_EQUAL 0x00000003 #define NVC0_M2MF_COND_MODE_NOT_EQUAL 0x00000004 #define NVC0_M2MF_TILING_POSITION_IN_X 0x00000344 #define NVC0_M2MF_TILING_POSITION_IN_Y 0x00000348 #define NVC0_M2MF_TILING_POSITION_OUT_X 0x0000034c #define NVC0_M2MF_TILING_POSITION_OUT_Y 0x00000350 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NVC0_M2MF_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv01_2d.xml.h0000644000175000017500000015046214713424663015053 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV01_2D_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV01_2D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV01_BETA_DMA_NOTIFY 0x00000180 #define NV01_BETA_BETA_1D31 0x00000300 #define NV04_BETA4_DMA_NOTIFY 0x00000180 #define NV04_BETA4_BETA_FACTOR 0x00000300 #define NV01_CHROMA_DMA_NOTIFY 0x00000180 #define NV01_CHROMA_COLOR_FORMAT 0x00000300 #define NV01_CHROMA_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV01_CHROMA_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV01_CHROMA_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV01_CHROMA_COLOR 0x00000304 #define NV01_PATTERN_DMA_NOTIFY 0x00000180 #define NV01_PATTERN_COLOR_FORMAT 0x00000300 #define NV01_PATTERN_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV01_PATTERN_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV01_PATTERN_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV01_PATTERN_MONOCHROME_FORMAT 0x00000304 #define NV01_PATTERN_MONOCHROME_FORMAT_CGA6 0x00000001 #define NV01_PATTERN_MONOCHROME_FORMAT_LE 0x00000002 #define NV01_PATTERN_MONOCHROME_SHAPE 0x00000308 #define NV01_PATTERN_MONOCHROME_SHAPE_8X8 0x00000000 #define NV01_PATTERN_MONOCHROME_SHAPE_64X1 0x00000001 #define NV01_PATTERN_MONOCHROME_SHAPE_1X64 0x00000002 #define NV04_PATTERN_PATTERN_SELECT 0x0000030c #define NV04_PATTERN_PATTERN_SELECT_MONO 0x00000001 #define NV04_PATTERN_PATTERN_SELECT_COLOR 0x00000002 #define NV01_PATTERN_MONOCHROME_COLOR(i0) (0x00000310 + 0x4*(i0)) #define NV01_PATTERN_MONOCHROME_COLOR__ESIZE 0x00000004 #define NV01_PATTERN_MONOCHROME_COLOR__LEN 0x00000002 #define NV01_PATTERN_MONOCHROME_PATTERN(i0) (0x00000318 + 0x4*(i0)) #define NV01_PATTERN_MONOCHROME_PATTERN__ESIZE 0x00000004 #define NV01_PATTERN_MONOCHROME_PATTERN__LEN 0x00000002 #define NV04_PATTERN_PATTERN_Y8(i0) (0x00000400 + 0x4*(i0)) #define NV04_PATTERN_PATTERN_Y8__ESIZE 0x00000004 #define NV04_PATTERN_PATTERN_Y8__LEN 0x00000010 #define NV04_PATTERN_PATTERN_Y8_Y0__MASK 0x000000ff #define NV04_PATTERN_PATTERN_Y8_Y0__SHIFT 0 #define NV04_PATTERN_PATTERN_Y8_Y1__MASK 0x0000ff00 #define NV04_PATTERN_PATTERN_Y8_Y1__SHIFT 8 #define NV04_PATTERN_PATTERN_Y8_Y2__MASK 0x00ff0000 #define NV04_PATTERN_PATTERN_Y8_Y2__SHIFT 16 #define NV04_PATTERN_PATTERN_Y8_Y3__MASK 0xff000000 #define NV04_PATTERN_PATTERN_Y8_Y3__SHIFT 24 #define NV04_PATTERN_PATTERN_R5G6B5(i0) (0x00000500 + 0x4*(i0)) #define NV04_PATTERN_PATTERN_R5G6B5__ESIZE 0x00000004 #define NV04_PATTERN_PATTERN_R5G6B5__LEN 0x00000020 #define NV04_PATTERN_PATTERN_R5G6B5_B0__MASK 0x0000001f #define NV04_PATTERN_PATTERN_R5G6B5_B0__SHIFT 0 #define NV04_PATTERN_PATTERN_R5G6B5_G0__MASK 0x000007e0 #define NV04_PATTERN_PATTERN_R5G6B5_G0__SHIFT 5 #define NV04_PATTERN_PATTERN_R5G6B5_R0__MASK 0x0000f800 #define NV04_PATTERN_PATTERN_R5G6B5_R0__SHIFT 11 #define NV04_PATTERN_PATTERN_R5G6B5_B1__MASK 0x001f0000 #define NV04_PATTERN_PATTERN_R5G6B5_B1__SHIFT 16 #define NV04_PATTERN_PATTERN_R5G6B5_G1__MASK 0x07e00000 #define NV04_PATTERN_PATTERN_R5G6B5_G1__SHIFT 21 #define NV04_PATTERN_PATTERN_R5G6B5_R1__MASK 0xf8000000 #define NV04_PATTERN_PATTERN_R5G6B5_R1__SHIFT 27 #define NV04_PATTERN_PATTERN_X1R5G5B5(i0) (0x00000600 + 0x4*(i0)) #define NV04_PATTERN_PATTERN_X1R5G5B5__ESIZE 0x00000004 #define NV04_PATTERN_PATTERN_X1R5G5B5__LEN 0x00000020 #define NV04_PATTERN_PATTERN_X1R5G5B5_B0__MASK 0x0000001f #define NV04_PATTERN_PATTERN_X1R5G5B5_B0__SHIFT 0 #define NV04_PATTERN_PATTERN_X1R5G5B5_G0__MASK 0x000003e0 #define NV04_PATTERN_PATTERN_X1R5G5B5_G0__SHIFT 5 #define NV04_PATTERN_PATTERN_X1R5G5B5_R0__MASK 0x00007c00 #define NV04_PATTERN_PATTERN_X1R5G5B5_R0__SHIFT 10 #define NV04_PATTERN_PATTERN_X1R5G5B5_B1__MASK 0x001f0000 #define NV04_PATTERN_PATTERN_X1R5G5B5_B1__SHIFT 16 #define NV04_PATTERN_PATTERN_X1R5G5B5_G1__MASK 0x03e00000 #define NV04_PATTERN_PATTERN_X1R5G5B5_G1__SHIFT 21 #define NV04_PATTERN_PATTERN_X1R5G5B5_R1__MASK 0x7c000000 #define NV04_PATTERN_PATTERN_X1R5G5B5_R1__SHIFT 26 #define NV04_PATTERN_PATTERN_X8R8G8B8(i0) (0x00000700 + 0x4*(i0)) #define NV04_PATTERN_PATTERN_X8R8G8B8__ESIZE 0x00000004 #define NV04_PATTERN_PATTERN_X8R8G8B8__LEN 0x00000040 #define NV04_PATTERN_PATTERN_X8R8G8B8_B__MASK 0x000000ff #define NV04_PATTERN_PATTERN_X8R8G8B8_B__SHIFT 0 #define NV04_PATTERN_PATTERN_X8R8G8B8_G__MASK 0x0000ff00 #define NV04_PATTERN_PATTERN_X8R8G8B8_G__SHIFT 8 #define NV04_PATTERN_PATTERN_X8R8G8B8_R__MASK 0x00ff0000 #define NV04_PATTERN_PATTERN_X8R8G8B8_R__SHIFT 16 #define NV01_CLIP_DMA_NOTIFY 0x00000180 #define NV01_CLIP_POINT 0x00000300 #define NV01_CLIP_POINT_X__MASK 0x0000ffff #define NV01_CLIP_POINT_X__SHIFT 0 #define NV01_CLIP_POINT_Y__MASK 0xffff0000 #define NV01_CLIP_POINT_Y__SHIFT 16 #define NV01_CLIP_SIZE 0x00000304 #define NV01_CLIP_SIZE_W__MASK 0x0000ffff #define NV01_CLIP_SIZE_W__SHIFT 0 #define NV01_CLIP_SIZE_H__MASK 0xffff0000 #define NV01_CLIP_SIZE_H__SHIFT 16 #define NV01_ROP_DMA_NOTIFY 0x00000180 #define NV01_ROP_ROP 0x00000300 #define NV04_SURFACE_2D_DMA_NOTIFY 0x00000180 #define NV04_SURFACE_2D_DMA_IMAGE_SOURCE 0x00000184 #define NV04_SURFACE_2D_DMA_IMAGE_DESTIN 0x00000188 #define NV50_SURFACE_2D_SRC_LINEAR 0x00000200 #define NV50_SURFACE_2D_SRC_TILE_MODE 0x00000204 #define NV50_SURFACE_2D_SRC_WIDTH 0x00000208 #define NV50_SURFACE_2D_SRC_HEIGHT 0x0000020c #define NV50_SURFACE_2D_UNK0210 0x00000210 #define NV50_SURFACE_2D_UNK0214 0x00000214 #define NV50_SURFACE_2D_DST_LINEAR 0x00000218 #define NV50_SURFACE_2D_DST_TILE_MODE 0x0000021c #define NV50_SURFACE_2D_DST_WIDTH 0x00000220 #define NV50_SURFACE_2D_DST_HEIGHT 0x00000224 #define NV50_SURFACE_2D_UNK0228 0x00000228 #define NV50_SURFACE_2D_UNK022C 0x0000022c #define NV50_SURFACE_2D_OFFSET_SOURCE_HIGH 0x00000230 #define NV50_SURFACE_2D_OFFSET_DESTIN_HIGH 0x00000234 #define NV04_SURFACE_2D_FORMAT 0x00000300 #define NV04_SURFACE_2D_FORMAT_Y8 0x00000001 #define NV04_SURFACE_2D_FORMAT_X1R5G5B5_Z1R5G5B5 0x00000002 #define NV04_SURFACE_2D_FORMAT_X1R5G5B5_X1R5G5B5 0x00000003 #define NV04_SURFACE_2D_FORMAT_R5G6B5 0x00000004 #define NV04_SURFACE_2D_FORMAT_Y16 0x00000005 #define NV04_SURFACE_2D_FORMAT_X8R8G8B8_Z8R8G8B8 0x00000006 #define NV04_SURFACE_2D_FORMAT_X8R8G8B8_X8R8G8B8 0x00000007 #define NV04_SURFACE_2D_FORMAT_X1A7R8G8B8_Z1A7R8G8B8 0x00000008 #define NV04_SURFACE_2D_FORMAT_X1A7R8G8B8_X1A7R8G8B8 0x00000009 #define NV04_SURFACE_2D_FORMAT_A8R8G8B8 0x0000000a #define NV04_SURFACE_2D_FORMAT_Y32 0x0000000b #define NV04_SURFACE_2D_PITCH 0x00000304 #define NV04_SURFACE_2D_PITCH_SOURCE__MASK 0x0000ffff #define NV04_SURFACE_2D_PITCH_SOURCE__SHIFT 0 #define NV04_SURFACE_2D_PITCH_DESTIN__MASK 0xffff0000 #define NV04_SURFACE_2D_PITCH_DESTIN__SHIFT 16 #define NV04_SURFACE_2D_OFFSET_SOURCE 0x00000308 #define NV04_SURFACE_2D_OFFSET_DESTIN 0x0000030c #define NV04_SURFACE_SWZ_DMA_NOTIFY 0x00000180 #define NV04_SURFACE_SWZ_DMA_IMAGE 0x00000184 #define NV04_SURFACE_SWZ_FORMAT 0x00000300 #define NV04_SURFACE_SWZ_FORMAT_COLOR__MASK 0x000000ff #define NV04_SURFACE_SWZ_FORMAT_COLOR__SHIFT 0 #define NV04_SURFACE_SWZ_FORMAT_COLOR_Y8 0x00000001 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X1R5G5B5_Z1R5G5B5 0x00000002 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X1R5G5B5_X1R5G5B5 0x00000003 #define NV04_SURFACE_SWZ_FORMAT_COLOR_R5G6B5 0x00000004 #define NV04_SURFACE_SWZ_FORMAT_COLOR_Y16 0x00000005 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X8R8G8B8_Z8R8G8B8 0x00000006 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X8R8G8B8_X8R8G8B8 0x00000007 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X1A7R8G8B8_Z1A7R8G8B8 0x00000008 #define NV04_SURFACE_SWZ_FORMAT_COLOR_X1A7R8G8B8_X1A7R8G8B8 0x00000009 #define NV04_SURFACE_SWZ_FORMAT_COLOR_A8R8G8B8 0x0000000a #define NV04_SURFACE_SWZ_FORMAT_COLOR_Y32 0x0000000b #define NV04_SURFACE_SWZ_FORMAT_BASE_SIZE_U__MASK 0x00ff0000 #define NV04_SURFACE_SWZ_FORMAT_BASE_SIZE_U__SHIFT 16 #define NV04_SURFACE_SWZ_FORMAT_BASE_SIZE_V__MASK 0xff000000 #define NV04_SURFACE_SWZ_FORMAT_BASE_SIZE_V__SHIFT 24 #define NV04_SURFACE_SWZ_OFFSET 0x00000304 #define NV01_POINT_PATCH 0x0000010c #define NV01_POINT_DMA_NOTIFY 0x00000180 #define NV01_POINT_CLIP 0x00000184 #define NV01_POINT_PATTERN 0x00000188 #define NV01_POINT_ROP 0x0000018c #define NV01_POINT_BETA 0x00000190 #define NV01_POINT_SURFACE_DST 0x00000194 #define NV01_POINT_OPERATION 0x000002fc #define NV01_POINT_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_POINT_OPERATION_ROP_AND 0x00000001 #define NV01_POINT_OPERATION_BLEND_AND 0x00000002 #define NV01_POINT_OPERATION_SRCCOPY 0x00000003 #define NV01_POINT_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_POINT_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_POINT_COLOR_FORMAT 0x00000300 #define NV01_POINT_COLOR_FORMAT_X16A8Y8 0x00000001 #define NV01_POINT_COLOR_FORMAT_X24Y8 0x00000002 #define NV01_POINT_COLOR_FORMAT_X16A1R5G5B5 0x00000003 #define NV01_POINT_COLOR_FORMAT_X17R5G5B5 0x00000004 #define NV01_POINT_COLOR_FORMAT_A8R8G8B8 0x00000005 #define NV01_POINT_COLOR_FORMAT_X8R8G8B8 0x00000006 #define NV01_POINT_COLOR_FORMAT_A16Y16 0x00000007 #define NV01_POINT_COLOR_FORMAT_X16Y16 0x00000008 #define NV01_POINT_COLOR 0x00000304 #define NV01_POINT_POINT(i0) (0x00000400 + 0x4*(i0)) #define NV01_POINT_POINT__ESIZE 0x00000004 #define NV01_POINT_POINT__LEN 0x00000020 #define NV01_POINT_POINT_X__MASK 0x0000ffff #define NV01_POINT_POINT_X__SHIFT 0 #define NV01_POINT_POINT_Y__MASK 0xffff0000 #define NV01_POINT_POINT_Y__SHIFT 16 #define NV01_POINT_POINT32_X(i0) (0x00000480 + 0x8*(i0)) #define NV01_POINT_POINT32_X__ESIZE 0x00000008 #define NV01_POINT_POINT32_X__LEN 0x00000010 #define NV01_POINT_POINT32_Y(i0) (0x00000484 + 0x8*(i0)) #define NV01_POINT_POINT32_Y__ESIZE 0x00000008 #define NV01_POINT_POINT32_Y__LEN 0x00000010 #define NV01_POINT_CPOINT_COLOR(i0) (0x00000500 + 0x8*(i0)) #define NV01_POINT_CPOINT_COLOR__ESIZE 0x00000008 #define NV01_POINT_CPOINT_COLOR__LEN 0x00000010 #define NV01_POINT_CPOINT_POINT(i0) (0x00000504 + 0x8*(i0)) #define NV01_POINT_CPOINT_POINT__ESIZE 0x00000008 #define NV01_POINT_CPOINT_POINT__LEN 0x00000010 #define NV01_POINT_CPOINT_POINT_X__MASK 0x0000ffff #define NV01_POINT_CPOINT_POINT_X__SHIFT 0 #define NV01_POINT_CPOINT_POINT_Y__MASK 0xffff0000 #define NV01_POINT_CPOINT_POINT_Y__SHIFT 16 #define NV01_LINE_PATCH 0x0000010c #define NV01_LINE_DMA_NOTIFY 0x00000180 #define NV01_LINE_CLIP 0x00000184 #define NV01_LINE_PATTERN 0x00000188 #define NV04_LIN_PATTERN 0x00000188 #define NV01_LINE_ROP 0x0000018c #define NV01_LINE_BETA 0x00000190 #define NV01_LINE_SURFACE_DST 0x00000194 #define NV04_LIN_BETA4 0x00000194 #define NV04_LIN_SURFACE 0x00000198 #define NV01_LINE_OPERATION 0x000002fc #define NV01_LINE_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_LINE_OPERATION_ROP_AND 0x00000001 #define NV01_LINE_OPERATION_BLEND_AND 0x00000002 #define NV01_LINE_OPERATION_SRCCOPY 0x00000003 #define NV01_LINE_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_LINE_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_LINE_COLOR_FORMAT 0x00000300 #define NV01_LINE_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV01_LINE_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV01_LINE_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV01_LINE_COLOR 0x00000304 #define NV01_LINE_LINE_POINT0(i0) (0x00000400 + 0x8*(i0)) #define NV01_LINE_LINE_POINT0__ESIZE 0x00000008 #define NV01_LINE_LINE_POINT0__LEN 0x00000010 #define NV01_LINE_LINE_POINT0_X__MASK 0x0000ffff #define NV01_LINE_LINE_POINT0_X__SHIFT 0 #define NV01_LINE_LINE_POINT0_Y__MASK 0xffff0000 #define NV01_LINE_LINE_POINT0_Y__SHIFT 16 #define NV01_LINE_LINE_POINT1(i0) (0x00000404 + 0x8*(i0)) #define NV01_LINE_LINE_POINT1__ESIZE 0x00000008 #define NV01_LINE_LINE_POINT1__LEN 0x00000010 #define NV01_LINE_LINE_POINT1_X__MASK 0x0000ffff #define NV01_LINE_LINE_POINT1_X__SHIFT 0 #define NV01_LINE_LINE_POINT1_Y__MASK 0xffff0000 #define NV01_LINE_LINE_POINT1_Y__SHIFT 16 #define NV01_LINE_LINE32_POINT0_X(i0) (0x00000480 + 0x10*(i0)) #define NV01_LINE_LINE32_POINT0_X__ESIZE 0x00000010 #define NV01_LINE_LINE32_POINT0_X__LEN 0x00000008 #define NV01_LINE_LINE32_POINT0_Y(i0) (0x00000484 + 0x10*(i0)) #define NV01_LINE_LINE32_POINT0_Y__ESIZE 0x00000010 #define NV01_LINE_LINE32_POINT0_Y__LEN 0x00000008 #define NV01_LINE_LINE32_POINT1_X(i0) (0x00000488 + 0x10*(i0)) #define NV01_LINE_LINE32_POINT1_X__ESIZE 0x00000010 #define NV01_LINE_LINE32_POINT1_X__LEN 0x00000008 #define NV01_LINE_LINE32_POINT1_Y(i0) (0x0000048c + 0x10*(i0)) #define NV01_LINE_LINE32_POINT1_Y__ESIZE 0x00000010 #define NV01_LINE_LINE32_POINT1_Y__LEN 0x00000008 #define NV01_LINE_POLYLINE(i0) (0x00000500 + 0x4*(i0)) #define NV01_LINE_POLYLINE__ESIZE 0x00000004 #define NV01_LINE_POLYLINE__LEN 0x00000020 #define NV01_LINE_POLYLINE_X__MASK 0x0000ffff #define NV01_LINE_POLYLINE_X__SHIFT 0 #define NV01_LINE_POLYLINE_Y__MASK 0xffff0000 #define NV01_LINE_POLYLINE_Y__SHIFT 16 #define NV01_LINE_POLYLINE32_POINT_X(i0) (0x00000580 + 0x8*(i0)) #define NV01_LINE_POLYLINE32_POINT_X__ESIZE 0x00000008 #define NV01_LINE_POLYLINE32_POINT_X__LEN 0x00000010 #define NV01_LINE_POLYLINE32_POINT_Y(i0) (0x00000584 + 0x8*(i0)) #define NV01_LINE_POLYLINE32_POINT_Y__ESIZE 0x00000008 #define NV01_LINE_POLYLINE32_POINT_Y__LEN 0x00000010 #define NV01_LINE_CPOLYLINE_COLOR(i0) (0x00000600 + 0x8*(i0)) #define NV01_LINE_CPOLYLINE_COLOR__ESIZE 0x00000008 #define NV01_LINE_CPOLYLINE_COLOR__LEN 0x00000010 #define NV01_LINE_CPOLYLINE_POINT(i0) (0x00000604 + 0x8*(i0)) #define NV01_LINE_CPOLYLINE_POINT__ESIZE 0x00000008 #define NV01_LINE_CPOLYLINE_POINT__LEN 0x00000010 #define NV01_LINE_CPOLYLINE_POINT_X__MASK 0x0000ffff #define NV01_LINE_CPOLYLINE_POINT_X__SHIFT 0 #define NV01_LINE_CPOLYLINE_POINT_Y__MASK 0xffff0000 #define NV01_LINE_CPOLYLINE_POINT_Y__SHIFT 16 #define NV01_TRI_PATCH 0x0000010c #define NV01_TRI_DMA_NOTIFY 0x00000180 #define NV01_TRI_CLIP 0x00000184 #define NV01_TRI_PATTERN 0x00000188 #define NV04_TRI_PATTERN 0x00000188 #define NV01_TRI_ROP 0x0000018c #define NV01_TRI_BETA 0x00000190 #define NV01_TRI_SURFACE_DST 0x00000194 #define NV04_TRI_BETA4 0x00000194 #define NV04_TRI_SURFACE 0x00000198 #define NV01_TRI_OPERATION 0x000002fc #define NV01_TRI_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_TRI_OPERATION_ROP_AND 0x00000001 #define NV01_TRI_OPERATION_BLEND_AND 0x00000002 #define NV01_TRI_OPERATION_SRCCOPY 0x00000003 #define NV01_TRI_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_TRI_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_TRI_COLOR_FORMAT 0x00000300 #define NV01_TRI_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV01_TRI_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV01_TRI_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV01_TRI_COLOR 0x00000304 #define NV01_TRI_TRIANGLE_POINT0 0x00000310 #define NV01_TRI_TRIANGLE_POINT0_X__MASK 0x0000ffff #define NV01_TRI_TRIANGLE_POINT0_X__SHIFT 0 #define NV01_TRI_TRIANGLE_POINT0_Y__MASK 0xffff0000 #define NV01_TRI_TRIANGLE_POINT0_Y__SHIFT 16 #define NV01_TRI_TRIANGLE_POINT1 0x00000314 #define NV01_TRI_TRIANGLE_POINT1_X__MASK 0x0000ffff #define NV01_TRI_TRIANGLE_POINT1_X__SHIFT 0 #define NV01_TRI_TRIANGLE_POINT1_Y__MASK 0xffff0000 #define NV01_TRI_TRIANGLE_POINT1_Y__SHIFT 16 #define NV01_TRI_TRIANGLE_POINT2 0x00000318 #define NV01_TRI_TRIANGLE_POINT2_X__MASK 0x0000ffff #define NV01_TRI_TRIANGLE_POINT2_X__SHIFT 0 #define NV01_TRI_TRIANGLE_POINT2_Y__MASK 0xffff0000 #define NV01_TRI_TRIANGLE_POINT2_Y__SHIFT 16 #define NV01_TRI_TRIANGLE32_POINT0_X 0x00000320 #define NV01_TRI_TRIANGLE32_POINT0_Y 0x00000324 #define NV01_TRI_TRIANGLE32_POINT1_X 0x00000328 #define NV01_TRI_TRIANGLE32_POINT1_Y 0x0000032c #define NV01_TRI_TRIANGLE32_POINT2_X 0x00000330 #define NV01_TRI_TRIANGLE32_POINT2_Y 0x00000334 #define NV01_TRI_TRIMESH(i0) (0x00000400 + 0x4*(i0)) #define NV01_TRI_TRIMESH__ESIZE 0x00000004 #define NV01_TRI_TRIMESH__LEN 0x00000020 #define NV01_TRI_TRIMESH_X__MASK 0x0000ffff #define NV01_TRI_TRIMESH_X__SHIFT 0 #define NV01_TRI_TRIMESH_Y__MASK 0xffff0000 #define NV01_TRI_TRIMESH_Y__SHIFT 16 #define NV01_TRI_TRIMESH32_POINT_X(i0) (0x00000480 + 0x8*(i0)) #define NV01_TRI_TRIMESH32_POINT_X__ESIZE 0x00000008 #define NV01_TRI_TRIMESH32_POINT_X__LEN 0x00000010 #define NV01_TRI_TRIMESH32_POINT_Y(i0) (0x00000484 + 0x8*(i0)) #define NV01_TRI_TRIMESH32_POINT_Y__ESIZE 0x00000008 #define NV01_TRI_TRIMESH32_POINT_Y__LEN 0x00000010 #define NV01_TRI_CTRIANGLE_COLOR(i0) (0x00000500 + 0x10*(i0)) #define NV01_TRI_CTRIANGLE_COLOR__ESIZE 0x00000010 #define NV01_TRI_CTRIANGLE_COLOR__LEN 0x00000008 #define NV01_TRI_CTRIANGLE_POINT0(i0) (0x00000504 + 0x10*(i0)) #define NV01_TRI_CTRIANGLE_POINT0__ESIZE 0x00000010 #define NV01_TRI_CTRIANGLE_POINT0__LEN 0x00000008 #define NV01_TRI_CTRIANGLE_POINT0_X__MASK 0x0000ffff #define NV01_TRI_CTRIANGLE_POINT0_X__SHIFT 0 #define NV01_TRI_CTRIANGLE_POINT0_Y__MASK 0xffff0000 #define NV01_TRI_CTRIANGLE_POINT0_Y__SHIFT 16 #define NV01_TRI_CTRIANGLE_POINT1(i0) (0x00000508 + 0x10*(i0)) #define NV01_TRI_CTRIANGLE_POINT1__ESIZE 0x00000010 #define NV01_TRI_CTRIANGLE_POINT1__LEN 0x00000008 #define NV01_TRI_CTRIANGLE_POINT1_X__MASK 0x0000ffff #define NV01_TRI_CTRIANGLE_POINT1_X__SHIFT 0 #define NV01_TRI_CTRIANGLE_POINT1_Y__MASK 0xffff0000 #define NV01_TRI_CTRIANGLE_POINT1_Y__SHIFT 16 #define NV01_TRI_CTRIANGLE_POINT2(i0) (0x0000050c + 0x10*(i0)) #define NV01_TRI_CTRIANGLE_POINT2__ESIZE 0x00000010 #define NV01_TRI_CTRIANGLE_POINT2__LEN 0x00000008 #define NV01_TRI_CTRIANGLE_POINT2_X__MASK 0x0000ffff #define NV01_TRI_CTRIANGLE_POINT2_X__SHIFT 0 #define NV01_TRI_CTRIANGLE_POINT2_Y__MASK 0xffff0000 #define NV01_TRI_CTRIANGLE_POINT2_Y__SHIFT 16 #define NV01_TRI_CTRIMESH_COLOR(i0) (0x00000580 + 0x8*(i0)) #define NV01_TRI_CTRIMESH_COLOR__ESIZE 0x00000008 #define NV01_TRI_CTRIMESH_COLOR__LEN 0x00000010 #define NV01_TRI_CTRIMESH_POINT(i0) (0x00000584 + 0x8*(i0)) #define NV01_TRI_CTRIMESH_POINT__ESIZE 0x00000008 #define NV01_TRI_CTRIMESH_POINT__LEN 0x00000010 #define NV01_TRI_CTRIMESH_POINT_X__MASK 0x0000ffff #define NV01_TRI_CTRIMESH_POINT_X__SHIFT 0 #define NV01_TRI_CTRIMESH_POINT_Y__MASK 0xffff0000 #define NV01_TRI_CTRIMESH_POINT_Y__SHIFT 16 #define NV01_RECT_PATCH 0x0000010c #define NV01_RECT_DMA_NOTIFY 0x00000180 #define NV01_RECT_CLIP 0x00000184 #define NV01_RECT_PATTERN 0x00000188 #define NV04_RECT_PATTERN 0x00000188 #define NV01_RECT_ROP 0x0000018c #define NV01_RECT_BETA 0x00000190 #define NV01_RECT_SURFACE_DST 0x00000194 #define NV04_RECT_BETA4 0x00000194 #define NV04_RECT_SURFACE 0x00000198 #define NV01_RECT_OPERATION 0x000002fc #define NV01_RECT_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_RECT_OPERATION_ROP_AND 0x00000001 #define NV01_RECT_OPERATION_BLEND_AND 0x00000002 #define NV01_RECT_OPERATION_SRCCOPY 0x00000003 #define NV01_RECT_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_RECT_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_RECT_COLOR_FORMAT 0x00000300 #define NV01_RECT_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV01_RECT_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV01_RECT_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV01_RECT_COLOR 0x00000304 #define NV01_RECT_RECTANGLE_POINT(i0) (0x00000400 + 0x8*(i0)) #define NV01_RECT_RECTANGLE_POINT__ESIZE 0x00000008 #define NV01_RECT_RECTANGLE_POINT__LEN 0x00000010 #define NV01_RECT_RECTANGLE_POINT_X__MASK 0x0000ffff #define NV01_RECT_RECTANGLE_POINT_X__SHIFT 0 #define NV01_RECT_RECTANGLE_POINT_Y__MASK 0xffff0000 #define NV01_RECT_RECTANGLE_POINT_Y__SHIFT 16 #define NV01_RECT_RECTANGLE_SIZE(i0) (0x00000404 + 0x8*(i0)) #define NV01_RECT_RECTANGLE_SIZE__ESIZE 0x00000008 #define NV01_RECT_RECTANGLE_SIZE__LEN 0x00000010 #define NV01_RECT_RECTANGLE_SIZE_W__MASK 0x0000ffff #define NV01_RECT_RECTANGLE_SIZE_W__SHIFT 0 #define NV01_RECT_RECTANGLE_SIZE_H__MASK 0xffff0000 #define NV01_RECT_RECTANGLE_SIZE_H__SHIFT 16 #define NV01_BLIT_PATCH 0x0000010c #define NV15_BLIT_WAIT_FOR_IDLE 0x00000108 #define NV15_BLIT_FLIP_SET_READ 0x00000120 #define NV15_BLIT_FLIP_SET_WRITE 0x00000124 #define NV15_BLIT_FLIP_MAX 0x00000128 #define NV15_BLIT_FLIP_INCR_WRITE 0x0000012c #define NV15_BLIT_FLIP_WAIT 0x00000130 #define NV15_BLIT_FLIP_CRTC_INCR_READ 0x00000134 #define NV01_BLIT_DMA_NOTIFY 0x00000180 #define NV01_BLIT_COLOR_KEY 0x00000184 #define NV04_BLIT_COLOR_KEY 0x00000184 #define NV01_BLIT_CLIP 0x00000188 #define NV01_BLIT_PATTERN 0x0000018c #define NV04_BLIT_PATTERN 0x0000018c #define NV01_BLIT_ROP 0x00000190 #define NV01_BLIT_BETA 0x00000194 #define NV01_BLIT_SURFACE_SRC 0x00000198 #define NV01_BLIT_SURFACE_DST 0x0000019c #define NV04_BLIT_BETA4 0x00000198 #define NV04_BLIT_SURFACES 0x0000019c #define NV01_BLIT_OPERATION 0x000002fc #define NV01_BLIT_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_BLIT_OPERATION_ROP_AND 0x00000001 #define NV01_BLIT_OPERATION_BLEND_AND 0x00000002 #define NV01_BLIT_OPERATION_SRCCOPY 0x00000003 #define NV01_BLIT_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_BLIT_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_BLIT_POINT_IN 0x00000300 #define NV01_BLIT_POINT_IN_X__MASK 0x0000ffff #define NV01_BLIT_POINT_IN_X__SHIFT 0 #define NV01_BLIT_POINT_IN_Y__MASK 0xffff0000 #define NV01_BLIT_POINT_IN_Y__SHIFT 16 #define NV01_BLIT_POINT_OUT 0x00000304 #define NV01_BLIT_POINT_OUT_X__MASK 0x0000ffff #define NV01_BLIT_POINT_OUT_X__SHIFT 0 #define NV01_BLIT_POINT_OUT_Y__MASK 0xffff0000 #define NV01_BLIT_POINT_OUT_Y__SHIFT 16 #define NV01_BLIT_SIZE 0x00000308 #define NV01_BLIT_SIZE_W__MASK 0x0000ffff #define NV01_BLIT_SIZE_W__SHIFT 0 #define NV01_BLIT_SIZE_H__MASK 0xffff0000 #define NV01_BLIT_SIZE_H__SHIFT 16 #define NV04_INDEX_PATCH 0x0000010c #define NV04_INDEX_DMA_NOTIFY 0x00000180 #define NV04_INDEX_DMA_LUT 0x00000184 #define NV04_INDEX_COLOR_KEY 0x00000188 #define NV04_INDEX_CLIP 0x0000018c #define NV04_INDEX_PATTERN 0x00000190 #define NV04_INDEX_ROP 0x00000194 #define NV04_INDEX_BETA 0x00000198 #define NV04_INDEX_BETA4 0x0000019c #define NV04_INDEX_SURFACE 0x000001a0 #define NV05_INDEX_SURFACE 0x000001a0 #define NV05_INDEX_COLOR_CONVERSION 0x000003e0 #define NV04_INDEX_OPERATION 0x000003e4 #define NV04_INDEX_COLOR_FORMAT 0x000003e8 #define NV04_INDEX_INDEX_FORMAT 0x000003ec #define NV04_INDEX_LUT_OFFSET 0x000003f0 #define NV04_INDEX_POINT 0x000003f4 #define NV04_INDEX_SIZE_OUT 0x000003f8 #define NV04_INDEX_SIZE_IN 0x000003fc #define NV04_INDEX_COLOR(i0) (0x00000400 + 0x4*(i0)) #define NV04_INDEX_COLOR__ESIZE 0x00000004 #define NV04_INDEX_COLOR__LEN 0x00000700 #define NV10_IFC_WAIT_FOR_IDLE 0x00000108 #define NV01_IFC_PATCH 0x0000010c #define NV01_IFC_DMA_NOTIFY 0x00000180 #define NV01_IFC_COLOR_KEY 0x00000184 #define NV04_IFC_COLOR_KEY 0x00000184 #define NV01_IFC_CLIP 0x00000188 #define NV01_IFC_PATTERN 0x0000018c #define NV04_IFC_PATTERN 0x0000018c #define NV01_IFC_ROP 0x00000190 #define NV01_IFC_BETA 0x00000194 #define NV01_IFC_SURFACE_DST 0x00000198 #define NV04_IFC_BETA4 0x00000198 #define NV04_IFC_SURFACE 0x0000019c #define NV05_IFC_COLOR_CONVERSION 0x000002f8 #define NV01_IFC_OPERATION 0x000002fc #define NV01_IFC_OPERATION_SRCCOPY_AND 0x00000000 #define NV01_IFC_OPERATION_ROP_AND 0x00000001 #define NV01_IFC_OPERATION_BLEND_AND 0x00000002 #define NV01_IFC_OPERATION_SRCCOPY 0x00000003 #define NV01_IFC_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV01_IFC_OPERATION_BLEND_PREMULT 0x00000005 #define NV01_IFC_COLOR_FORMAT 0x00000300 #define NV01_IFC_COLOR_FORMAT_R5G6G5 0x00000001 #define NV01_IFC_COLOR_FORMAT_A1R5G5B5 0x00000002 #define NV01_IFC_COLOR_FORMAT_X1R5G5B5 0x00000003 #define NV01_IFC_COLOR_FORMAT_A8R8G8B8 0x00000004 #define NV01_IFC_COLOR_FORMAT_X8R8G8B8 0x00000005 #define NV01_IFC_POINT 0x00000304 #define NV01_IFC_POINT_X__MASK 0x0000ffff #define NV01_IFC_POINT_X__SHIFT 0 #define NV01_IFC_POINT_Y__MASK 0xffff0000 #define NV01_IFC_POINT_Y__SHIFT 16 #define NV01_IFC_SIZE_OUT 0x00000308 #define NV01_IFC_SIZE_OUT_W__MASK 0x0000ffff #define NV01_IFC_SIZE_OUT_W__SHIFT 0 #define NV01_IFC_SIZE_OUT_H__MASK 0xffff0000 #define NV01_IFC_SIZE_OUT_H__SHIFT 16 #define NV01_IFC_SIZE_IN 0x0000030c #define NV01_IFC_SIZE_IN_W__MASK 0x0000ffff #define NV01_IFC_SIZE_IN_W__SHIFT 0 #define NV01_IFC_SIZE_IN_H__MASK 0xffff0000 #define NV01_IFC_SIZE_IN_H__SHIFT 16 #define NV01_IFC_COLOR(i0) (0x00000400 + 0x4*(i0)) #define NV01_IFC_COLOR__ESIZE 0x00000004 #define NV01_IFC_COLOR__LEN 0x00000020 #define NV04_IFC_COLOR(i0) (0x00000400 + 0x4*(i0)) #define NV04_IFC_COLOR__ESIZE 0x00000004 #define NV04_IFC_COLOR__LEN 0x00000700 #define NV03_SIFC_PATCH 0x0000010c #define NV03_SIFC_DMA_NOTIFY 0x00000180 #define NV03_SIFC_COLOR_KEY 0x00000184 #define NV04_SIFC_COLOR_KEY 0x00000184 #define NV03_SIFC_PATTERN 0x00000188 #define NV04_SIFC_PATTERN 0x00000188 #define NV03_SIFC_ROP 0x0000018c #define NV03_SIFC_BETA 0x00000190 #define NV03_SIFC_SURFACE_DST 0x00000194 #define NV04_SIFC_BETA4 0x00000194 #define NV04_SIFC_SURFACE 0x00000198 #define NV05_SIFC_COLOR_CONVERSION 0x000002f8 #define NV03_SIFC_OPERATION 0x000002fc #define NV03_SIFC_COLOR_FORMAT 0x00000300 #define NV03_SIFC_SIZE_IN 0x00000304 #define NV03_SIFC_SIZE_IN_W__MASK 0x0000ffff #define NV03_SIFC_SIZE_IN_W__SHIFT 0 #define NV03_SIFC_SIZE_IN_H__MASK 0xffff0000 #define NV03_SIFC_SIZE_IN_H__SHIFT 16 #define NV03_SIFC_DX_DU 0x00000308 #define NV03_SIFC_DY_DV 0x0000030c #define NV03_SIFC_CLIP_POINT 0x00000310 #define NV03_SIFC_CLIP_POINT_X__MASK 0x0000ffff #define NV03_SIFC_CLIP_POINT_X__SHIFT 0 #define NV03_SIFC_CLIP_POINT_Y__MASK 0xffff0000 #define NV03_SIFC_CLIP_POINT_Y__SHIFT 16 #define NV03_SIFC_CLIP_SIZE 0x00000314 #define NV03_SIFC_CLIP_SIZE_W__MASK 0x0000ffff #define NV03_SIFC_CLIP_SIZE_W__SHIFT 0 #define NV03_SIFC_CLIP_SIZE_H__MASK 0xffff0000 #define NV03_SIFC_CLIP_SIZE_H__SHIFT 16 #define NV03_SIFC_POINT12D4 0x00000318 #define NV03_SIFC_POINT12D4_X__MASK 0x0000ffff #define NV03_SIFC_POINT12D4_X__SHIFT 0 #define NV03_SIFC_POINT12D4_Y__MASK 0xffff0000 #define NV03_SIFC_POINT12D4_Y__SHIFT 16 #define NV03_SIFC_COLOR(i0) (0x00000400 + 0x4*(i0)) #define NV03_SIFC_COLOR__ESIZE 0x00000004 #define NV03_SIFC_COLOR__LEN 0x00000700 #define NV10_SIFM_WAIT_FOR_IDLE 0x00000108 #define NV03_SIFM_DMA_NOTIFY 0x00000180 #define NV03_SIFM_DMA_IMAGE 0x00000184 #define NV03_SIFM_PATTERN 0x00000188 #define NV04_SIFM_PATTERN 0x00000188 #define NV03_SIFM_ROP 0x0000018c #define NV03_SIFM_BETA 0x00000190 #define NV03_SIFM_SURFACE_DST 0x00000194 #define NV04_SIFM_BETA4 0x00000194 #define NV04_SIFM_SURFACE 0x00000198 #define NV05_SIFM_SURFACE 0x00000198 #define NV05_SIFM_COLOR_CONVERSION 0x000002fc #define NV05_SIFM_COLOR_CONVERSION_DITHER 0x00000000 #define NV05_SIFM_COLOR_CONVERSION_TRUNCATE 0x00000001 #define NV05_SIFM_COLOR_CONVERSION_SUBTR_TRUNCATE 0x00000002 #define NV03_SIFM_COLOR_FORMAT 0x00000300 #define NV03_SIFM_COLOR_FORMAT_A1R5G5B5 0x00000001 #define NV03_SIFM_COLOR_FORMAT_X1R5G5B5 0x00000002 #define NV03_SIFM_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV03_SIFM_COLOR_FORMAT_X8R8G8B8 0x00000004 #define NV03_SIFM_COLOR_FORMAT_V8YB8U8YA8 0x00000005 #define NV03_SIFM_COLOR_FORMAT_YB8V8YA8U8 0x00000006 #define NV03_SIFM_COLOR_FORMAT_R5G6B5 0x00000007 #define NV03_SIFM_COLOR_FORMAT_Y8 0x00000008 #define NV03_SIFM_COLOR_FORMAT_AY8 0x00000009 #define NV03_SIFM_OPERATION 0x00000304 #define NV03_SIFM_OPERATION_SRCCOPY_AND 0x00000000 #define NV03_SIFM_OPERATION_ROP_AND 0x00000001 #define NV03_SIFM_OPERATION_BLEND_AND 0x00000002 #define NV03_SIFM_OPERATION_SRCCOPY 0x00000003 #define NV03_SIFM_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV03_SIFM_OPERATION_BLEND_PREMULT 0x00000005 #define NV03_SIFM_CLIP_POINT 0x00000308 #define NV03_SIFM_CLIP_POINT_X__MASK 0x0000ffff #define NV03_SIFM_CLIP_POINT_X__SHIFT 0 #define NV03_SIFM_CLIP_POINT_Y__MASK 0xffff0000 #define NV03_SIFM_CLIP_POINT_Y__SHIFT 16 #define NV03_SIFM_CLIP_SIZE 0x0000030c #define NV03_SIFM_CLIP_SIZE_W__MASK 0x0000ffff #define NV03_SIFM_CLIP_SIZE_W__SHIFT 0 #define NV03_SIFM_CLIP_SIZE_H__MASK 0xffff0000 #define NV03_SIFM_CLIP_SIZE_H__SHIFT 16 #define NV03_SIFM_OUT_POINT 0x00000310 #define NV03_SIFM_OUT_POINT_X__MASK 0x0000ffff #define NV03_SIFM_OUT_POINT_X__SHIFT 0 #define NV03_SIFM_OUT_POINT_Y__MASK 0xffff0000 #define NV03_SIFM_OUT_POINT_Y__SHIFT 16 #define NV03_SIFM_OUT_SIZE 0x00000314 #define NV03_SIFM_OUT_SIZE_W__MASK 0x0000ffff #define NV03_SIFM_OUT_SIZE_W__SHIFT 0 #define NV03_SIFM_OUT_SIZE_H__MASK 0xffff0000 #define NV03_SIFM_OUT_SIZE_H__SHIFT 16 #define NV03_SIFM_DU_DX 0x00000318 #define NV03_SIFM_DV_DY 0x0000031c #define NV03_SIFM_SIZE 0x00000400 #define NV03_SIFM_SIZE_W__MASK 0x0000ffff #define NV03_SIFM_SIZE_W__SHIFT 0 #define NV03_SIFM_SIZE_H__MASK 0xffff0000 #define NV03_SIFM_SIZE_H__SHIFT 16 #define NV03_SIFM_FORMAT 0x00000404 #define NV03_SIFM_FORMAT_PITCH__MASK 0x0000ffff #define NV03_SIFM_FORMAT_PITCH__SHIFT 0 #define NV03_SIFM_FORMAT_ORIGIN__MASK 0x00ff0000 #define NV03_SIFM_FORMAT_ORIGIN__SHIFT 16 #define NV03_SIFM_FORMAT_ORIGIN_CENTER 0x00010000 #define NV03_SIFM_FORMAT_ORIGIN_CORNER 0x00020000 #define NV03_SIFM_FORMAT_FILTER__MASK 0xff000000 #define NV03_SIFM_FORMAT_FILTER__SHIFT 24 #define NV03_SIFM_FORMAT_FILTER_POINT_SAMPLE 0x00000000 #define NV03_SIFM_FORMAT_FILTER_BILINEAR 0x01000000 #define NV03_SIFM_OFFSET 0x00000408 #define NV03_SIFM_POINT 0x0000040c #define NV03_SIFM_POINT_U__MASK 0x0000ffff #define NV03_SIFM_POINT_U__SHIFT 0 #define NV03_SIFM_POINT_V__MASK 0xffff0000 #define NV03_SIFM_POINT_V__SHIFT 16 #define NV50_SIFM_OFFSET_HIGH 0x00000410 #define NV50_SIFM_SRC_LINEAR 0x00000414 #define NV50_SIFM_SRC_TILE_MODE 0x00000418 #define NV03_GDI_DMA_NOTIFY 0x00000180 #define NV03_GDI_PATTERN 0x00000184 #define NV03_GDI_ROP 0x00000188 #define NV03_GDI_BETA 0x0000019c #define NV03_GDI_SURFACE_DST 0x00000190 #define NV03_GDI_OPERATION 0x000002fc #define NV03_GDI_COLOR_FORMAT 0x00000300 #define NV03_GDI_MONOCHROME_FORMAT 0x00000304 #define NV03_GDI_COLOR1_A 0x000003fc #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT(i0) (0x00000400 + 0x8*(i0)) #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT__ESIZE 0x00000008 #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT__LEN 0x00000040 #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT_Y__MASK 0x0000ffff #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT_Y__SHIFT 0 #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT_X__MASK 0xffff0000 #define NV03_GDI_UNCLIPPED_RECTANGLE_POINT_X__SHIFT 16 #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE(i0) (0x00000404 + 0x8*(i0)) #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE__ESIZE 0x00000008 #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE__LEN 0x00000040 #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE_H__MASK 0x0000ffff #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE_H__SHIFT 0 #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE_W__MASK 0xffff0000 #define NV03_GDI_UNCLIPPED_RECTANGLE_SIZE_W__SHIFT 16 #define NV03_GDI_CLIP_POINT0_B 0x000007f4 #define NV03_GDI_CLIP_POINT0_B_L__MASK 0x0000ffff #define NV03_GDI_CLIP_POINT0_B_L__SHIFT 0 #define NV03_GDI_CLIP_POINT0_B_T__MASK 0xffff0000 #define NV03_GDI_CLIP_POINT0_B_T__SHIFT 16 #define NV03_GDI_CLIP_POINT1_B 0x000007f8 #define NV03_GDI_CLIP_POINT1_B_R__MASK 0x0000ffff #define NV03_GDI_CLIP_POINT1_B_R__SHIFT 0 #define NV03_GDI_CLIP_POINT1_B_B__MASK 0xffff0000 #define NV03_GDI_CLIP_POINT1_B_B__SHIFT 16 #define NV03_GDI_COLOR1_B 0x000007fc #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0(i0) (0x00000800 + 0x8*(i0)) #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0__ESIZE 0x00000008 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0__LEN 0x00000040 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0_L__MASK 0x0000ffff #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0_L__SHIFT 0 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0_T__MASK 0xffff0000 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_0_T__SHIFT 16 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1(i0) (0x00000804 + 0x8*(i0)) #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1__ESIZE 0x00000008 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1__LEN 0x00000040 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1_R__MASK 0x0000ffff #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1_R__SHIFT 0 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1_B__MASK 0xffff0000 #define NV03_GDI_CLIPPED_RECTANGLE_POINT_1_B__SHIFT 16 #define NV03_GDI_CLIP_C_POINT0 0x00000bec #define NV03_GDI_CLIP_C_POINT0_L__MASK 0x0000ffff #define NV03_GDI_CLIP_C_POINT0_L__SHIFT 0 #define NV03_GDI_CLIP_C_POINT0_T__MASK 0xffff0000 #define NV03_GDI_CLIP_C_POINT0_T__SHIFT 16 #define NV03_GDI_CLIP_C_POINT1 0x00000bf0 #define NV03_GDI_CLIP_C_POINT1_R__MASK 0x0000ffff #define NV03_GDI_CLIP_C_POINT1_R__SHIFT 0 #define NV03_GDI_CLIP_C_POINT1_B__MASK 0xffff0000 #define NV03_GDI_CLIP_C_POINT1_B__SHIFT 16 #define NV03_GDI_COLOR1_C 0x00000bf4 #define NV03_GDI_SIZE_C 0x00000bf8 #define NV03_GDI_SIZE_C_W__MASK 0x0000ffff #define NV03_GDI_SIZE_C_W__SHIFT 0 #define NV03_GDI_SIZE_C_H__MASK 0xffff0000 #define NV03_GDI_SIZE_C_H__SHIFT 16 #define NV03_GDI_POINT_C 0x00000bfc #define NV03_GDI_POINT_C_X__MASK 0x0000ffff #define NV03_GDI_POINT_C_X__SHIFT 0 #define NV03_GDI_POINT_C_Y__MASK 0xffff0000 #define NV03_GDI_POINT_C_Y__SHIFT 16 #define NV03_GDI_MONOCHROME_COLOR1_C(i0) (0x00000c00 + 0x4*(i0)) #define NV03_GDI_MONOCHROME_COLOR1_C__ESIZE 0x00000004 #define NV03_GDI_MONOCHROME_COLOR1_C__LEN 0x00000080 #define NV03_GDI_CLIP_D_POINT0 0x00000fe8 #define NV03_GDI_CLIP_D_POINT0_L__MASK 0x0000ffff #define NV03_GDI_CLIP_D_POINT0_L__SHIFT 0 #define NV03_GDI_CLIP_D_POINT0_T__MASK 0xffff0000 #define NV03_GDI_CLIP_D_POINT0_T__SHIFT 16 #define NV03_GDI_CLIP_D_POINT1 0x00000fec #define NV03_GDI_CLIP_D_POINT1_R__MASK 0x0000ffff #define NV03_GDI_CLIP_D_POINT1_R__SHIFT 0 #define NV03_GDI_CLIP_D_POINT1_B__MASK 0xffff0000 #define NV03_GDI_CLIP_D_POINT1_B__SHIFT 16 #define NV03_GDI_COLOR1_D 0x00000ff0 #define NV03_GDI_SIZE_IN_D 0x00000ff4 #define NV03_GDI_SIZE_IN_D_W__MASK 0x0000ffff #define NV03_GDI_SIZE_IN_D_W__SHIFT 0 #define NV03_GDI_SIZE_IN_D_H__MASK 0xffff0000 #define NV03_GDI_SIZE_IN_D_H__SHIFT 16 #define NV03_GDI_SIZE_OUT_D 0x00000ff8 #define NV03_GDI_SIZE_OUT_D_W__MASK 0x0000ffff #define NV03_GDI_SIZE_OUT_D_W__SHIFT 0 #define NV03_GDI_SIZE_OUT_D_H__MASK 0xffff0000 #define NV03_GDI_SIZE_OUT_D_H__SHIFT 16 #define NV03_GDI_POINT_D 0x00000ffc #define NV03_GDI_POINT_D_X__MASK 0x0000ffff #define NV03_GDI_POINT_D_X__SHIFT 0 #define NV03_GDI_POINT_D_Y__MASK 0xffff0000 #define NV03_GDI_POINT_D_Y__SHIFT 16 #define NV03_GDI_MONOCHROME_COLOR1_D(i0) (0x00001000 + 0x4*(i0)) #define NV03_GDI_MONOCHROME_COLOR1_D__ESIZE 0x00000004 #define NV03_GDI_MONOCHROME_COLOR1_D__LEN 0x00000080 #define NV03_GDI_CLIP_E_POINT0 0x000013e4 #define NV03_GDI_CLIP_E_POINT0_L__MASK 0x0000ffff #define NV03_GDI_CLIP_E_POINT0_L__SHIFT 0 #define NV03_GDI_CLIP_E_POINT0_T__MASK 0xffff0000 #define NV03_GDI_CLIP_E_POINT0_T__SHIFT 16 #define NV03_GDI_CLIP_E_POINT1 0x000013e8 #define NV03_GDI_CLIP_E_POINT1_R__MASK 0x0000ffff #define NV03_GDI_CLIP_E_POINT1_R__SHIFT 0 #define NV03_GDI_CLIP_E_POINT1_B__MASK 0xffff0000 #define NV03_GDI_CLIP_E_POINT1_B__SHIFT 16 #define NV03_GDI_COLOR0_E 0x000013ec #define NV03_GDI_COLOR1_E 0x000013f0 #define NV03_GDI_SIZE_IN_E 0x000013f4 #define NV03_GDI_SIZE_IN_E_W__MASK 0x0000ffff #define NV03_GDI_SIZE_IN_E_W__SHIFT 0 #define NV03_GDI_SIZE_IN_E_H__MASK 0xffff0000 #define NV03_GDI_SIZE_IN_E_H__SHIFT 16 #define NV03_GDI_SIZE_OUT_E 0x000013f8 #define NV03_GDI_SIZE_OUT_E_W__MASK 0x0000ffff #define NV03_GDI_SIZE_OUT_E_W__SHIFT 0 #define NV03_GDI_SIZE_OUT_E_H__MASK 0xffff0000 #define NV03_GDI_SIZE_OUT_E_H__SHIFT 16 #define NV03_GDI_POINT_E 0x000013fc #define NV03_GDI_POINT_E_X__MASK 0x0000ffff #define NV03_GDI_POINT_E_X__SHIFT 0 #define NV03_GDI_POINT_E_Y__MASK 0xffff0000 #define NV03_GDI_POINT_E_Y__SHIFT 16 #define NV03_GDI_MONOCHROME_COLOR01_E(i0) (0x00001400 + 0x4*(i0)) #define NV03_GDI_MONOCHROME_COLOR01_E__ESIZE 0x00000004 #define NV03_GDI_MONOCHROME_COLOR01_E__LEN 0x00000080 #define NV04_GDI_PATCH 0x0000010c #define NV04_GDI_DMA_NOTIFY 0x00000180 #define NV04_GDI_DMA_FONTS 0x00000184 #define NV04_GDI_PATTERN 0x00000188 #define NV04_GDI_ROP 0x0000018c #define NV04_GDI_BETA 0x00000190 #define NV04_GDI_BETA4 0x00000194 #define NV04_GDI_SURFACE 0x00000198 #define NV04_GDI_OPERATION 0x000002fc #define NV04_GDI_OPERATION_SRCCOPY_AND 0x00000000 #define NV04_GDI_OPERATION_ROP_AND 0x00000001 #define NV04_GDI_OPERATION_BLEND_AND 0x00000002 #define NV04_GDI_OPERATION_SRCCOPY 0x00000003 #define NV04_GDI_OPERATION_SRCCOPY_PREMULT 0x00000004 #define NV04_GDI_OPERATION_BLEND_PREMULT 0x00000005 #define NV04_GDI_COLOR_FORMAT 0x00000300 #define NV04_GDI_COLOR_FORMAT_A16R5G6B5 0x00000001 #define NV04_GDI_COLOR_FORMAT_X16A1R5G5B5 0x00000002 #define NV04_GDI_COLOR_FORMAT_A8R8G8B8 0x00000003 #define NV04_GDI_MONOCHROME_FORMAT 0x00000304 #define NV04_GDI_MONOCHROME_FORMAT_CGA6 0x00000001 #define NV04_GDI_MONOCHROME_FORMAT_LE 0x00000002 #define NV04_GDI_COLOR1_A 0x000003fc #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT(i0) (0x00000400 + 0x8*(i0)) #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT__ESIZE 0x00000008 #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT__LEN 0x00000020 #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT_Y__MASK 0x0000ffff #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT_Y__SHIFT 0 #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT_X__MASK 0xffff0000 #define NV04_GDI_UNCLIPPED_RECTANGLE_POINT_X__SHIFT 16 #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE(i0) (0x00000404 + 0x8*(i0)) #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE__ESIZE 0x00000008 #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE__LEN 0x00000020 #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE_H__MASK 0x0000ffff #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE_H__SHIFT 0 #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE_W__MASK 0xffff0000 #define NV04_GDI_UNCLIPPED_RECTANGLE_SIZE_W__SHIFT 16 #define NV04_GDI_CLIP_B_POINT0 0x000005f4 #define NV04_GDI_CLIP_B_POINT0_L__MASK 0x0000ffff #define NV04_GDI_CLIP_B_POINT0_L__SHIFT 0 #define NV04_GDI_CLIP_B_POINT0_T__MASK 0xffff0000 #define NV04_GDI_CLIP_B_POINT0_T__SHIFT 16 #define NV04_GDI_CLIP_B_POINT1 0x000005f8 #define NV04_GDI_CLIP_B_POINT1_R__MASK 0x0000ffff #define NV04_GDI_CLIP_B_POINT1_R__SHIFT 0 #define NV04_GDI_CLIP_B_POINT1_B__MASK 0xffff0000 #define NV04_GDI_CLIP_B_POINT1_B__SHIFT 16 #define NV04_GDI_COLOR1_B 0x000005fc #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0(i0) (0x00000600 + 0x8*(i0)) #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0__ESIZE 0x00000008 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0__LEN 0x00000020 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0_L__MASK 0x0000ffff #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0_L__SHIFT 0 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0_T__MASK 0xffff0000 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_0_T__SHIFT 16 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1(i0) (0x00000604 + 0x8*(i0)) #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1__ESIZE 0x00000008 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1__LEN 0x00000020 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1_R__MASK 0x0000ffff #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1_R__SHIFT 0 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1_B__MASK 0xffff0000 #define NV04_GDI_CLIPPED_RECTANGLE_POINT_1_B__SHIFT 16 #define NV04_GDI_CLIP_C_POINT0 0x000007ec #define NV04_GDI_CLIP_C_POINT0_L__MASK 0x0000ffff #define NV04_GDI_CLIP_C_POINT0_L__SHIFT 0 #define NV04_GDI_CLIP_C_POINT0_T__MASK 0xffff0000 #define NV04_GDI_CLIP_C_POINT0_T__SHIFT 16 #define NV04_GDI_CLIP_C_POINT1 0x000007f0 #define NV04_GDI_CLIP_C_POINT1_R__MASK 0x0000ffff #define NV04_GDI_CLIP_C_POINT1_R__SHIFT 0 #define NV04_GDI_CLIP_C_POINT1_B__MASK 0xffff0000 #define NV04_GDI_CLIP_C_POINT1_B__SHIFT 16 #define NV04_GDI_COLOR1_C 0x000007f4 #define NV04_GDI_SIZE_C 0x000007f8 #define NV04_GDI_SIZE_C_W__MASK 0x0000ffff #define NV04_GDI_SIZE_C_W__SHIFT 0 #define NV04_GDI_SIZE_C_H__MASK 0xffff0000 #define NV04_GDI_SIZE_C_H__SHIFT 16 #define NV04_GDI_POINT_C 0x000007fc #define NV04_GDI_POINT_C_X__MASK 0x0000ffff #define NV04_GDI_POINT_C_X__SHIFT 0 #define NV04_GDI_POINT_C_Y__MASK 0xffff0000 #define NV04_GDI_POINT_C_Y__SHIFT 16 #define NV04_GDI_MONOCHROME_COLOR1_C(i0) (0x00000800 + 0x4*(i0)) #define NV04_GDI_MONOCHROME_COLOR1_C__ESIZE 0x00000004 #define NV04_GDI_MONOCHROME_COLOR1_C__LEN 0x00000080 #define NV04_GDI_CLIP_E_POINT0 0x00000be4 #define NV04_GDI_CLIP_E_POINT0_L__MASK 0x0000ffff #define NV04_GDI_CLIP_E_POINT0_L__SHIFT 0 #define NV04_GDI_CLIP_E_POINT0_T__MASK 0xffff0000 #define NV04_GDI_CLIP_E_POINT0_T__SHIFT 16 #define NV04_GDI_CLIP_E_POINT1 0x00000be8 #define NV04_GDI_CLIP_E_POINT1_R__MASK 0x0000ffff #define NV04_GDI_CLIP_E_POINT1_R__SHIFT 0 #define NV04_GDI_CLIP_E_POINT1_B__MASK 0xffff0000 #define NV04_GDI_CLIP_E_POINT1_B__SHIFT 16 #define NV04_GDI_COLOR0_E 0x00000bec #define NV04_GDI_COLOR1_E 0x00000bf0 #define NV04_GDI_SIZE_IN_E 0x00000bf4 #define NV04_GDI_SIZE_IN_E_W__MASK 0x0000ffff #define NV04_GDI_SIZE_IN_E_W__SHIFT 0 #define NV04_GDI_SIZE_IN_E_H__MASK 0xffff0000 #define NV04_GDI_SIZE_IN_E_H__SHIFT 16 #define NV04_GDI_SIZE_OUT_E 0x00000bf8 #define NV04_GDI_SIZE_OUT_E_W__MASK 0x0000ffff #define NV04_GDI_SIZE_OUT_E_W__SHIFT 0 #define NV04_GDI_SIZE_OUT_E_H__MASK 0xffff0000 #define NV04_GDI_SIZE_OUT_E_H__SHIFT 16 #define NV04_GDI_POINT_E 0x00000bfc #define NV04_GDI_POINT_E_X__MASK 0x0000ffff #define NV04_GDI_POINT_E_X__SHIFT 0 #define NV04_GDI_POINT_E_Y__MASK 0xffff0000 #define NV04_GDI_POINT_E_Y__SHIFT 16 #define NV04_GDI_MONOCHROME_COLOR01_E(i0) (0x00000c00 + 0x4*(i0)) #define NV04_GDI_MONOCHROME_COLOR01_E__ESIZE 0x00000004 #define NV04_GDI_MONOCHROME_COLOR01_E__LEN 0x00000080 #define NV04_GDI_FONT_F 0x00000ff0 #define NV04_GDI_FONT_F_OFFSET__MASK 0x0fffffff #define NV04_GDI_FONT_F_OFFSET__SHIFT 0 #define NV04_GDI_FONT_F_PITCH__MASK 0xf0000000 #define NV04_GDI_FONT_F_PITCH__SHIFT 28 #define NV04_GDI_CLIP_F_POINT0 0x00000ff4 #define NV04_GDI_CLIP_F_POINT0_L__MASK 0x0000ffff #define NV04_GDI_CLIP_F_POINT0_L__SHIFT 0 #define NV04_GDI_CLIP_F_POINT0_T__MASK 0xffff0000 #define NV04_GDI_CLIP_F_POINT0_T__SHIFT 16 #define NV04_GDI_CLIP_F_POINT1 0x00000ff8 #define NV04_GDI_CLIP_F_POINT1_R__MASK 0x0000ffff #define NV04_GDI_CLIP_F_POINT1_R__SHIFT 0 #define NV04_GDI_CLIP_F_POINT1_B__MASK 0xffff0000 #define NV04_GDI_CLIP_F_POINT1_B__SHIFT 16 #define NV04_GDI_COLOR1_F 0x00000ffc #define NV04_GDI_CHARACTER_COLOR1_F(i0) (0x00001000 + 0x4*(i0)) #define NV04_GDI_CHARACTER_COLOR1_F__ESIZE 0x00000004 #define NV04_GDI_CHARACTER_COLOR1_F__LEN 0x00000100 #define NV04_GDI_CHARACTER_COLOR1_F_INDEX__MASK 0x000000ff #define NV04_GDI_CHARACTER_COLOR1_F_INDEX__SHIFT 0 #define NV04_GDI_CHARACTER_COLOR1_F_X__MASK 0x000fff00 #define NV04_GDI_CHARACTER_COLOR1_F_X__SHIFT 8 #define NV04_GDI_CHARACTER_COLOR1_F_Y__MASK 0xfff00000 #define NV04_GDI_CHARACTER_COLOR1_F_Y__SHIFT 20 #define NV04_GDI_FONT_G 0x000017f0 #define NV04_GDI_FONT_G_OFFSET__MASK 0x0fffffff #define NV04_GDI_FONT_G_OFFSET__SHIFT 0 #define NV04_GDI_FONT_G_PITCH__MASK 0xf0000000 #define NV04_GDI_FONT_G_PITCH__SHIFT 28 #define NV04_GDI_CLIP_G_POINT0 0x000017f4 #define NV04_GDI_CLIP_G_POINT0_L__MASK 0x0000ffff #define NV04_GDI_CLIP_G_POINT0_L__SHIFT 0 #define NV04_GDI_CLIP_G_POINT0_T__MASK 0xffff0000 #define NV04_GDI_CLIP_G_POINT0_T__SHIFT 16 #define NV04_GDI_CLIP_G_POINT1 0x000017f8 #define NV04_GDI_CLIP_G_POINT1_R__MASK 0x0000ffff #define NV04_GDI_CLIP_G_POINT1_R__SHIFT 0 #define NV04_GDI_CLIP_G_POINT1_B__MASK 0xffff0000 #define NV04_GDI_CLIP_G_POINT1_B__SHIFT 16 #define NV04_GDI_COLOR1_G 0x000017fc #define NV04_GDI_CHARACTER_COLOR1_G_POINT(i0) (0x00001800 + 0x8*(i0)) #define NV04_GDI_CHARACTER_COLOR1_G_POINT__ESIZE 0x00000008 #define NV04_GDI_CHARACTER_COLOR1_G_POINT__LEN 0x00000100 #define NV04_GDI_CHARACTER_COLOR1_G_POINT_X__MASK 0x0000ffff #define NV04_GDI_CHARACTER_COLOR1_G_POINT_X__SHIFT 0 #define NV04_GDI_CHARACTER_COLOR1_G_POINT_Y__MASK 0xffff0000 #define NV04_GDI_CHARACTER_COLOR1_G_POINT_Y__SHIFT 16 #define NV04_GDI_CHARACTER_COLOR1_G_INDEX(i0) (0x00001804 + 0x8*(i0)) #define NV04_GDI_CHARACTER_COLOR1_G_INDEX__ESIZE 0x00000008 #define NV04_GDI_CHARACTER_COLOR1_G_INDEX__LEN 0x00000100 #define NV10_TEXUPLOAD_WAIT_FOR_IDLE 0x00000108 #define NV10_TEXUPLOAD_DMA_NOTIFY 0x00000180 #define NV10_TEXUPLOAD_SURFACE 0x00000184 #define NV10_TEXUPLOAD_COLOR_FORMAT 0x00000300 #define NV10_TEXUPLOAD_POINT 0x00000304 #define NV10_TEXUPLOAD_POINT_X__MASK 0x0000ffff #define NV10_TEXUPLOAD_POINT_X__SHIFT 0 #define NV10_TEXUPLOAD_POINT_Y__MASK 0xffff0000 #define NV10_TEXUPLOAD_POINT_Y__SHIFT 16 #define NV10_TEXUPLOAD_SIZE 0x00000308 #define NV10_TEXUPLOAD_SIZE_W__MASK 0x0000ffff #define NV10_TEXUPLOAD_SIZE_W__SHIFT 0 #define NV10_TEXUPLOAD_SIZE_H__MASK 0xffff0000 #define NV10_TEXUPLOAD_SIZE_H__SHIFT 16 #define NV10_TEXUPLOAD_CLIP_HORIZONTAL 0x0000030c #define NV10_TEXUPLOAD_CLIP_HORIZONTAL_X__MASK 0x0000ffff #define NV10_TEXUPLOAD_CLIP_HORIZONTAL_X__SHIFT 0 #define NV10_TEXUPLOAD_CLIP_HORIZONTAL_W__MASK 0xffff0000 #define NV10_TEXUPLOAD_CLIP_HORIZONTAL_W__SHIFT 16 #define NV10_TEXUPLOAD_CLIP_VERTICAL 0x00000310 #define NV10_TEXUPLOAD_CLIP_VERTICAL_Y__MASK 0x0000ffff #define NV10_TEXUPLOAD_CLIP_VERTICAL_Y__SHIFT 0 #define NV10_TEXUPLOAD_CLIP_VERTICAL_H__MASK 0xffff0000 #define NV10_TEXUPLOAD_CLIP_VERTICAL_H__SHIFT 16 #define NV10_TEXUPLOAD_COLOR(i0) (0x00000400 + 0x4*(i0)) #define NV10_TEXUPLOAD_COLOR__ESIZE 0x00000004 #define NV10_TEXUPLOAD_COLOR__LEN 0x00000700 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV01_2D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv_object.xml.h0000644000175000017500000002705514713424663015654 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_OBJECT_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_OBJECT_XML /* WARNING ABOUT NOT EDITING AUTOGENERATED FILE IGNORED, _CLASS SUFFIX HAS * BEEN ADDED TO ALL THE OBJECT CLASS DEFINITIONS TO AVOID CONFLICTS WITH * THE RING MACROS WE WANT TO USE */ /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV01_DMA_FROM_MEMORY_CLASS 0x00000002 #define NV01_DMA_TO_MEMORY_CLASS 0x00000003 #define NV01_NULL_CLASS 0x00000030 #define NV03_DMA_IN_MEMORY_CLASS 0x0000003d #define NV01_OP_CLIP_CLASS 0x00000010 #define NV01_OP_BLEND_AND_CLASS 0x00000011 #define NV01_BETA_CLASS 0x00000012 #define NV04_BETA4_CLASS 0x00000072 #define NV01_OP_ROP_AND_CLASS 0x00000013 #define NV01_ROP_CLASS 0x00000014 #define NV03_ROP_CLASS 0x00000043 #define NV01_OP_CHROMA_CLASS 0x00000015 #define NV01_OP_PLANE_SWITCH_CLASS 0x00000016 #define NV01_CHROMA_CLASS 0x00000017 #define NV04_CHROMA_CLASS 0x00000057 #define NV01_PATTERN_CLASS 0x00000018 #define NV04_PATTERN_CLASS 0x00000044 #define NV01_CLIP_CLASS 0x00000019 #define NV01_OP_SRCCOPY_AND_CLASS 0x00000064 #define NV03_OP_SRCCOPY_CLASS 0x00000065 #define NV04_OP_SRCCOPY_PREMULT_CLASS 0x00000066 #define NV04_OP_BLEND_PREMULT_CLASS 0x00000067 #define NV01_POINT_CLASS 0x0000001a #define NV01_LINE_CLASS 0x0000001b #define NV01_LIN_CLASS 0x0000001c #define NV04_LIN_CLASS 0x0000005c #define NV30_LIN_CLASS 0x0000035c #define NV40_LIN_CLASS 0x0000305c #define NV01_TRI_CLASS 0x0000001d #define NV04_TRI_CLASS 0x0000005d #define NV01_RECT_CLASS 0x0000001e #define NV04_RECT_CLASS 0x0000005e #define NV01_BLIT_CLASS 0x0000001f #define NV04_BLIT_CLASS 0x0000005f #define NV15_BLIT_CLASS 0x0000009f #define NV01_IFROMMEM_CLASS 0x00000020 #define NV01_IFC_CLASS 0x00000021 #define NV04_IFC_CLASS 0x00000061 #define NV05_IFC_CLASS 0x00000065 #define NV10_IFC_CLASS 0x0000008a #define NV30_IFC_CLASS 0x0000038a #define NV40_IFC_CLASS 0x0000308a #define NV01_BITMAP_CLASS 0x00000022 #define NV01_ITOMEM_CLASS 0x00000025 #define NV03_SIFC_CLASS 0x00000036 #define NV04_SIFC_CLASS 0x00000076 #define NV05_SIFC_CLASS 0x00000066 #define NV30_SIFC_CLASS 0x00000366 #define NV40_SIFC_CLASS 0x00003066 #define NV03_SIFM_CLASS 0x00000037 #define NV04_SIFM_CLASS 0x00000077 #define NV05_SIFM_CLASS 0x00000063 #define NV10_SIFM_CLASS 0x00000089 #define NV30_SIFM_CLASS 0x00000389 #define NV40_SIFM_CLASS 0x00003089 #define NV50_SIFM_CLASS 0x00005089 #define NV03_SYFM_CLASS 0x00000038 #define NV03_GDI_CLASS 0x0000004b #define NV04_GDI_CLASS 0x0000004a #define NV04_SURFACE_SWZ_CLASS 0x00000052 #define NV20_SURFACE_SWZ_CLASS 0x0000009e #define NV30_SURFACE_SWZ_CLASS 0x0000039e #define NV40_SURFACE_SWZ_CLASS 0x0000309e #define NV03_SURFACE_DST_CLASS 0x00000058 #define NV03_SURFACE_SRC_CLASS 0x00000059 #define NV04_SURFACE_2D_CLASS 0x00000042 #define NV10_SURFACE_2D_CLASS 0x00000062 #define NV30_SURFACE_2D_CLASS 0x00000362 #define NV40_SURFACE_2D_CLASS 0x00003062 #define NV50_SURFACE_2D_CLASS 0x00005062 #define NV04_INDEX_CLASS 0x00000060 #define NV05_INDEX_CLASS 0x00000064 #define NV30_INDEX_CLASS 0x00000364 #define NV40_INDEX_CLASS 0x00003064 #define NV10_TEXUPLOAD_CLASS 0x0000007b #define NV30_TEXUPLOAD_CLASS 0x0000037b #define NV40_TEXUPLOAD_CLASS 0x0000307b #define NV04_DVD_SUBPICTURE_CLASS 0x00000038 #define NV10_DVD_SUBPICTURE_CLASS 0x00000088 #define NV03_M2MF_CLASS 0x00000039 #define NV50_M2MF_CLASS 0x00005039 #define NVC0_M2MF_CLASS 0x00009039 #define NV03_SURFACE_COLOR_CLASS 0x0000005a #define NV03_SURFACE_ZETA_CLASS 0x0000005b #define NV03_TEXTURED_TRIANGLE_CLASS 0x00000048 #define NV04_TEXTURED_TRIANGLE_CLASS 0x00000054 #define NV10_TEXTURED_TRIANGLE_CLASS 0x00000094 #define NV04_SURFACE_3D_CLASS 0x00000053 #define NV10_SURFACE_3D_CLASS 0x00000093 #define NV04_MULTITEX_TRIANGLE_CLASS 0x00000055 #define NV10_MULTITEX_TRIANGLE_CLASS 0x00000095 #define NV10_3D_CLASS 0x00000056 #define NV15_3D_CLASS 0x00000096 #define NV11_3D_CLASS 0x00000098 #define NV17_3D_CLASS 0x00000099 #define NV20_3D_CLASS 0x00000097 #define NV25_3D_CLASS 0x00000597 #define NV30_3D_CLASS 0x00000397 #define NV35_3D_CLASS 0x00000497 #define NV34_3D_CLASS 0x00000697 #define NV40_3D_CLASS 0x00004097 #define NV44_3D_CLASS 0x00004497 #define NV50_3D_CLASS 0x00005097 #define NV84_3D_CLASS 0x00008297 #define NVA0_3D_CLASS 0x00008397 #define NVA3_3D_CLASS 0x00008597 #define NVAF_3D_CLASS 0x00008697 #define NVC0_3D_CLASS 0x00009097 #define NVC1_3D_CLASS 0x00009197 #define NVC8_3D_CLASS 0x00009297 #define NV50_2D_CLASS 0x0000502d #define NVC0_2D_CLASS 0x0000902d #define NV50_COMPUTE_CLASS 0x000050c0 #define NVA3_COMPUTE_CLASS 0x000085c0 #define NVC0_COMPUTE_CLASS 0x000090c0 #define NVC8_COMPUTE_CLASS 0x000092c0 #define NV84_CRYPT_CLASS 0x000074c1 #define BLOB_NVC0_PCOPY1_CLASS 0x000090b8 #define BLOB_NVC0_PCOPY0_CLASS 0x000090b5 #define NV31_MPEG_CLASS 0x00003174 #define NV84_MPEG_CLASS 0x00008274 #define NV01_SUBCHAN__SIZE 0x00008000 #define NV01_SUBCHAN 0x00000000 #define NV01_SUBCHAN_OBJECT 0x00000000 #define NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH 0x00000010 #define NV84_SUBCHAN_SEMAPHORE_ADDRESS_LOW 0x00000014 #define NV84_SUBCHAN_SEMAPHORE_SEQUENCE 0x00000018 #define NV84_SUBCHAN_SEMAPHORE_TRIGGER 0x0000001c #define NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_EQUAL 0x00000001 #define NV84_SUBCHAN_SEMAPHORE_TRIGGER_WRITE_LONG 0x00000002 #define NV84_SUBCHAN_SEMAPHORE_TRIGGER_ACQUIRE_GEQUAL 0x00000004 #define NV84_SUBCHAN_NOTIFY_INTR 0x00000020 #define NV84_SUBCHAN_WRCACHE_FLUSH 0x00000024 #define NV10_SUBCHAN_REF_CNT 0x00000050 #define NV11_SUBCHAN_DMA_SEMAPHORE 0x00000060 #define NV11_SUBCHAN_SEMAPHORE_OFFSET 0x00000064 #define NV11_SUBCHAN_SEMAPHORE_ACQUIRE 0x00000068 #define NV11_SUBCHAN_SEMAPHORE_RELEASE 0x0000006c #define NV40_SUBCHAN_YIELD 0x00000080 #define NV01_GRAPH 0x00000000 #define NV04_GRAPH_NOP 0x00000100 #define NV04_GRAPH_NOTIFY 0x00000104 #define NV04_GRAPH_NOTIFY_WRITE 0x00000000 #define NV04_GRAPH_NOTIFY_WRITE_AND_AWAKEN 0x00000001 #define NVC0_GRAPH_NOTIFY_ADDRESS_HIGH 0x00000104 #define NVC0_GRAPH_NOTIFY_ADDRESS_LOW 0x00000108 #define NVC0_GRAPH_NOTIFY 0x0000010c #define NVC0_GRAPH_NOTIFY_WRITE 0x00000000 #define NVC0_GRAPH_NOTIFY_WRITE_AND_AWAKEN 0x00000001 #define NV50_GRAPH_SERIALIZE 0x00000110 #define NVC0_GRAPH_MACRO_UPLOAD_POS 0x00000114 #define NVC0_GRAPH_MACRO_UPLOAD_DATA 0x00000118 #define NVC0_GRAPH_MACRO_ID 0x0000011c #define NVC0_GRAPH_MACRO_POS 0x00000120 #define NVA3_GRAPH_UNK0120 0x00000120 #define NVA3_GRAPH_UNK0124 0x00000124 #define NVC0_GRAPH_UNK0124 0x00000124 #define NVC0_GRAPH_COND_ADDRESS_HIGH 0x00000130 #define NVC0_GRAPH_COND_ADDRESS_LOW 0x00000134 #define NVC0_GRAPH_COND_MODE 0x00000138 #define NVC0_GRAPH_COND_MODE_NEVER 0x00000000 #define NVC0_GRAPH_COND_MODE_ALWAYS 0x00000001 #define NVC0_GRAPH_COND_MODE_RES_NON_ZERO 0x00000002 #define NVC0_GRAPH_COND_MODE_EQUAL 0x00000003 #define NVC0_GRAPH_COND_MODE_NOT_EQUAL 0x00000004 #define NVC0_GRAPH_UNK013C 0x0000013c #define NV40_GRAPH_PM_TRIGGER 0x00000140 #define NVC0_GRAPH_UNK0150 0x00000150 #define NVC0_GRAPH_UNK0154 0x00000154 #define NVC0_GRAPH_SCRATCH(i0) (0x00003400 + 0x4*(i0)) #define NVC0_GRAPH_SCRATCH__ESIZE 0x00000004 #define NVC0_GRAPH_SCRATCH__LEN 0x00000080 #define NVC0_GRAPH_MACRO(i0) (0x00003800 + 0x8*(i0)) #define NVC0_GRAPH_MACRO__ESIZE 0x00000008 #define NVC0_GRAPH_MACRO__LEN 0x00000080 #define NVC0_GRAPH_MACRO_PARAM(i0) (0x00003804 + 0x8*(i0)) #define NVC0_GRAPH_MACRO_PARAM__ESIZE 0x00000008 #define NVC0_GRAPH_MACRO_PARAM__LEN 0x00000080 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_OBJECT_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nvc0_3d.xml.h0000644000175000017500000023434314713424663015137 #ifndef NVC0_3D_XML #define NVC0_3D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://github.com/envytools/envytools/ git clone https://github.com/envytools/envytools.git The rules-ng-ng source files this header was generated from are: - rnndb/graph/gf100_3d.xml ( 59971 bytes, from 2014-09-26 00:01:33) - rnndb/copyright.xml ( 6456 bytes, from 2014-12-31 02:13:31) - rnndb/nv_defs.xml ( 4399 bytes, from 2013-09-07 03:32:45) - rnndb/graph/nv_3ddefs.xml ( 16390 bytes, from 2014-09-25 06:32:11) - rnndb/fifo/nv_object.xml ( 15326 bytes, from 2014-09-25 06:32:11) - rnndb/nvchipsets.xml ( 2759 bytes, from 2014-10-05 01:51:02) - rnndb/g80_defs.xml ( 18175 bytes, from 2014-09-25 06:32:11) - rnndb/graph/gk104_p2mf.xml ( 2376 bytes, from 2014-09-25 06:32:11) Copyright (C) 2006-2014 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - Ilia Mirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NVE4_3D_UNK0144 0x00000144 #define NVE4_3D_UPLOAD 0x00000000 #define NVE4_3D_UPLOAD_LINE_LENGTH_IN 0x00000180 #define NVE4_3D_UPLOAD_LINE_COUNT 0x00000184 #define NVE4_3D_UPLOAD_DST_ADDRESS_HIGH 0x00000188 #define NVE4_3D_UPLOAD_DST_ADDRESS_LOW 0x0000018c #define NVE4_3D_UPLOAD_DST_PITCH 0x00000190 #define NVE4_3D_UPLOAD_DST_TILE_MODE 0x00000194 #define NVE4_3D_UPLOAD_DST_WIDTH 0x00000198 #define NVE4_3D_UPLOAD_DST_HEIGHT 0x0000019c #define NVE4_3D_UPLOAD_DST_DEPTH 0x000001a0 #define NVE4_3D_UPLOAD_DST_Z 0x000001a4 #define NVE4_3D_UPLOAD_DST_X 0x000001a8 #define NVE4_3D_UPLOAD_DST_Y 0x000001ac #define NVE4_3D_UPLOAD_EXEC 0x000001b0 #define NVE4_3D_UPLOAD_EXEC_LINEAR 0x00000001 #define NVE4_3D_UPLOAD_EXEC_UNK1__MASK 0x0000007e #define NVE4_3D_UPLOAD_EXEC_UNK1__SHIFT 1 #define NVE4_3D_UPLOAD_EXEC_BUF_NOTIFY 0x00000300 #define NVE4_3D_UPLOAD_EXEC_UNK12__MASK 0x0000f000 #define NVE4_3D_UPLOAD_EXEC_UNK12__SHIFT 12 #define NVE4_3D_UPLOAD_DATA 0x000001b4 #define NVE4_3D_UPLOAD_QUERY_ADDRESS_HIGH 0x000001dc #define NVE4_3D_UPLOAD_QUERY_ADDRESS_LOW 0x000001e0 #define NVE4_3D_UPLOAD_QUERY_SEQUENCE 0x000001e4 #define NVE4_3D_UPLOAD_UNK01F0 0x000001f0 #define NVE4_3D_UPLOAD_UNK01F4 0x000001f4 #define NVE4_3D_UPLOAD_UNK01F8 0x000001f8 #define NVE4_3D_UPLOAD_UNK01FC 0x000001fc #define NVC0_3D_UNK200 0x00000200 #define NVC0_3D_UNK204 0x00000204 #define NVC0_3D_UNK208 0x00000208 #define NVC0_3D_LINE_WIDTH_SEPARATE 0x0000020c #define NVC0_3D_FORCE_EARLY_FRAGMENT_TESTS 0x00000210 #define NVC0_3D_UNK214 0x00000214 #define NVC0_3D_UNK218 0x00000218 #define NVC0_3D_MEM_BARRIER 0x0000021c #define NVC0_3D_MEM_BARRIER_UNK0 0x00000001 #define NVC0_3D_MEM_BARRIER_UNK1 0x00000002 #define NVC0_3D_MEM_BARRIER_UNK2 0x00000004 #define NVC0_3D_MEM_BARRIER_UNK4 0x00000010 #define NVC0_3D_MEM_BARRIER_UNK8 0x00000100 #define NVC0_3D_MEM_BARRIER_UNK12 0x00001000 #define NVC0_3D_UNK0220(i0) (0x00000220 + 0x4*(i0)) #define NVC0_3D_UNK0220__ESIZE 0x00000004 #define NVC0_3D_UNK0220__LEN 0x00000028 #define NVC0_3D_UNK02C0 0x000002c0 #define NVC0_3D_UNK02C4 0x000002c4 #define NVC0_3D_GLOBAL_BASE 0x000002c8 #define NVC0_3D_GLOBAL_BASE_HIGH__MASK 0x000000ff #define NVC0_3D_GLOBAL_BASE_HIGH__SHIFT 0 #define NVC0_3D_GLOBAL_BASE_INDEX__MASK 0x00ff0000 #define NVC0_3D_GLOBAL_BASE_INDEX__SHIFT 16 #define NVC0_3D_GLOBAL_BASE_READ_OK 0x40000000 #define NVC0_3D_GLOBAL_BASE_WRITE_OK 0x80000000 #define NVC0_3D_UNK02CC 0x000002cc #define NVC0_3D_UNK02D0 0x000002d0 #define NVC0_3D_UNK02D4 0x000002d4 #define NVC0_3D_UNK02D8 0x000002d8 #define NVC8_3D_UNK02E0 0x000002e0 #define NVC1_3D_UNK02E4 0x000002e4 #define NVC1_3D_UNK02E4_UNK0 0x00000001 #define NVC1_3D_UNK02E4_UNK4 0x00000010 #define NVC1_3D_UNK02E4_UNK8 0x00000100 #define NVC1_3D_UNK02E4_UNK12__MASK 0x0000f000 #define NVC1_3D_UNK02E4_UNK12__SHIFT 12 #define NVC8_3D_UNK02E8 0x000002e8 #define NVC0_3D_UNK02EC 0x000002ec #define NVC0_3D_UNK02EC_UNK0 0x00000001 #define NVC0_3D_UNK02EC_UNK4__MASK 0x00000ff0 #define NVC0_3D_UNK02EC_UNK4__SHIFT 4 #define NVC8_3D_UNK02F8 0x000002f8 #define NVC8_3D_UNK02FC 0x000002fc #define NVC0_3D_UNK0300 0x00000300 #define NVC0_3D_UNK0304 0x00000304 #define NVC0_3D_CACHE_SPLIT 0x00000308 #define NVC1_3D_CACHE_SPLIT_16K_SHARED_48K_L1 0x00000001 #define NVE4_3D_CACHE_SPLIT_32K_SHARED_32K_L1 0x00000002 #define NVC0_3D_CACHE_SPLIT_48K_SHARED_16K_L1 0x00000003 #define NVC0_3D_UNK030C 0x0000030c #define NVC0_3D_UNK0310 0x00000310 #define NVE4_3D_UNK0310 0x00000310 #define NVC0_3D_UNK0314 0x00000314 #define NVC0_3D_UNK0318 0x00000318 #define NVC0_3D_UNK031C 0x0000031c #define NVC0_3D_TESS_MODE 0x00000320 #define NVC0_3D_TESS_MODE_PRIM__MASK 0x00000003 #define NVC0_3D_TESS_MODE_PRIM__SHIFT 0 #define NVC0_3D_TESS_MODE_PRIM_ISOLINES 0x00000000 #define NVC0_3D_TESS_MODE_PRIM_TRIANGLES 0x00000001 #define NVC0_3D_TESS_MODE_PRIM_QUADS 0x00000002 #define NVC0_3D_TESS_MODE_SPACING__MASK 0x00000030 #define NVC0_3D_TESS_MODE_SPACING__SHIFT 4 #define NVC0_3D_TESS_MODE_SPACING_EQUAL 0x00000000 #define NVC0_3D_TESS_MODE_SPACING_FRACTIONAL_ODD 0x00000010 #define NVC0_3D_TESS_MODE_SPACING_FRACTIONAL_EVEN 0x00000020 #define NVC0_3D_TESS_MODE_CW 0x00000100 #define NVC0_3D_TESS_MODE_CONNECTED 0x00000200 #define NVC0_3D_TESS_LEVEL_OUTER(i0) (0x00000324 + 0x4*(i0)) #define NVC0_3D_TESS_LEVEL_OUTER__ESIZE 0x00000004 #define NVC0_3D_TESS_LEVEL_OUTER__LEN 0x00000004 #define NVC0_3D_TESS_LEVEL_INNER(i0) (0x00000334 + 0x4*(i0)) #define NVC0_3D_TESS_LEVEL_INNER__ESIZE 0x00000004 #define NVC0_3D_TESS_LEVEL_INNER__LEN 0x00000002 #define NVC0_3D_UNK033C(i0) (0x0000033c + 0x4*(i0)) #define NVC0_3D_UNK033C__ESIZE 0x00000004 #define NVC0_3D_UNK033C__LEN 0x00000009 #define NVC0_3D_UNK0360 0x00000360 #define NVC0_3D_UNK0364 0x00000364 #define NVC0_3D_UNK0368 0x00000368 #define NVC8_3D_UNK036C 0x0000036c #define NVC8_3D_UNK0370 0x00000370 #define NVC8_3D_UNK0374 0x00000374 #define NVC8_3D_UNK0378 0x00000378 #define NVC0_3D_RASTERIZE_ENABLE 0x0000037c #define NVC0_3D_TFB(i0) (0x00000380 + 0x20*(i0)) #define NVC0_3D_TFB__ESIZE 0x00000020 #define NVC0_3D_TFB__LEN 0x00000004 #define NVC0_3D_TFB_BUFFER_ENABLE(i0) (0x00000380 + 0x20*(i0)) #define NVC0_3D_TFB_ADDRESS_HIGH(i0) (0x00000384 + 0x20*(i0)) #define NVC0_3D_TFB_ADDRESS_LOW(i0) (0x00000388 + 0x20*(i0)) #define NVC0_3D_TFB_BUFFER_SIZE(i0) (0x0000038c + 0x20*(i0)) #define NVC0_3D_TFB_BUFFER_OFFSET(i0) (0x00000390 + 0x20*(i0)) #define NVC0_3D_UNK0400(i0) (0x00000400 + 0x4*(i0)) #define NVC0_3D_UNK0400__ESIZE 0x00000004 #define NVC0_3D_UNK0400__LEN 0x000000c0 #define NVC0_3D_TFB_STREAM(i0) (0x00000700 + 0x10*(i0)) #define NVC0_3D_TFB_STREAM__ESIZE 0x00000010 #define NVC0_3D_TFB_STREAM__LEN 0x00000004 #define NVC0_3D_TFB_VARYING_COUNT(i0) (0x00000704 + 0x10*(i0)) #define NVC0_3D_TFB_VARYING_COUNT__ESIZE 0x00000010 #define NVC0_3D_TFB_VARYING_COUNT__LEN 0x00000004 #define NVC0_3D_TFB_BUFFER_STRIDE(i0) (0x00000708 + 0x10*(i0)) #define NVC0_3D_TFB_BUFFER_STRIDE__ESIZE 0x00000010 #define NVC0_3D_TFB_BUFFER_STRIDE__LEN 0x00000004 #define NVC0_3D_UNK0740 0x00000740 #define NVC0_3D_TFB_ENABLE 0x00000744 #define NVC0_3D_UNK0748 0x00000748 #define NVC0_3D_UNK074C 0x0000074c #define NVC0_3D_UNK0750 0x00000750 #define NVC0_3D_SAMPLE_SHADING 0x00000754 #define NVC0_3D_SAMPLE_SHADING_MIN_SAMPLES__MASK 0x0000000f #define NVC0_3D_SAMPLE_SHADING_MIN_SAMPLES__SHIFT 0 #define NVC0_3D_SAMPLE_SHADING_ENABLE 0x00000010 #define NVC0_3D_UNK075C 0x0000075c #define NVC0_3D_UNK0760(i0) (0x00000760 + 0x4*(i0)) #define NVC0_3D_UNK0760__ESIZE 0x00000004 #define NVC0_3D_UNK0760__LEN 0x00000004 #define NVC0_3D_UNK0770(i0) (0x00000770 + 0x4*(i0)) #define NVC0_3D_UNK0770__ESIZE 0x00000004 #define NVC0_3D_UNK0770__LEN 0x00000003 #define NVC0_3D_UNK0770_UNK4__MASK 0x000000f0 #define NVC0_3D_UNK0770_UNK4__SHIFT 4 #define NVC0_3D_UNK0770_UNK12__MASK 0x0000f000 #define NVC0_3D_UNK0770_UNK12__SHIFT 12 #define NVC0_3D_UNK0770_UNK20__MASK 0x00f00000 #define NVC0_3D_UNK0770_UNK20__SHIFT 20 #define NVC0_3D_UNK0770_UNK28__MASK 0xf0000000 #define NVC0_3D_UNK0770_UNK28__SHIFT 28 #define NVC0_3D_LOCAL_BASE 0x0000077c #define NVC0_3D_UNK0780(i0) (0x00000780 + 0x4*(i0)) #define NVC0_3D_UNK0780__ESIZE 0x00000004 #define NVC0_3D_UNK0780__LEN 0x00000004 #define NVC0_3D_TEMP_ADDRESS_HIGH 0x00000790 #define NVC0_3D_TEMP_ADDRESS_LOW 0x00000794 #define NVC0_3D_TEMP_SIZE_HIGH 0x00000798 #define NVC0_3D_TEMP_SIZE_LOW 0x0000079c #define NVC0_3D_WARP_TEMP_ALLOC 0x000007a0 #define NVC8_3D_UNK07A4(i0) (0x000007a4 + 0x4*(i0)) #define NVC8_3D_UNK07A4__ESIZE 0x00000004 #define NVC8_3D_UNK07A4__LEN 0x00000002 #define NVE4_3D_UNK07AC 0x000007ac #define NVC0_3D_UNK07B0(i0) (0x000007b0 + 0x4*(i0)) #define NVC0_3D_UNK07B0__ESIZE 0x00000004 #define NVC0_3D_UNK07B0__LEN 0x00000004 #define NVC0_3D_ZCULL_WIDTH 0x000007c0 #define NVC0_3D_ZCULL_HEIGHT 0x000007c4 #define NVC0_3D_ZCULL_UNK07C8 0x000007c8 #define NVC0_3D_ZCULL_UNK07CC 0x000007cc #define NVC0_3D_UNK07D0(i0) (0x000007d0 + 0x4*(i0)) #define NVC0_3D_UNK07D0__ESIZE 0x00000004 #define NVC0_3D_UNK07D0__LEN 0x00000003 #define NVC0_3D_UNK07D0_UNK4__MASK 0x000000f0 #define NVC0_3D_UNK07D0_UNK4__SHIFT 4 #define NVC0_3D_UNK07D0_UNK12__MASK 0x0000f000 #define NVC0_3D_UNK07D0_UNK12__SHIFT 12 #define NVC0_3D_UNK07D0_UNK20__MASK 0x00f00000 #define NVC0_3D_UNK07D0_UNK20__SHIFT 20 #define NVC0_3D_UNK07D0_UNK28__MASK 0xf0000000 #define NVC0_3D_UNK07D0_UNK28__SHIFT 28 #define NVC0_3D_UNK07DC 0x000007dc #define NVC0_3D_UNK07E0 0x000007e0 #define NVC0_3D_UNK07E4 0x000007e4 #define NVC0_3D_ZCULL_ADDRESS_HIGH 0x000007e8 #define NVC0_3D_ZCULL_ADDRESS_LOW 0x000007ec #define NVC0_3D_ZCULL_LIMIT_HIGH 0x000007f0 #define NVC0_3D_ZCULL_LIMIT_LOW 0x000007f4 #define NVC0_3D_UNK07F8 0x000007f8 #define NVC0_3D_UNK07F8_UNK0 0x00000001 #define NVC0_3D_UNK07F8_UNK1 0x00000010 #define NVE4_3D_UNK07FC 0x000007fc #define NVC0_3D_RT(i0) (0x00000800 + 0x40*(i0)) #define NVC0_3D_RT__ESIZE 0x00000040 #define NVC0_3D_RT__LEN 0x00000008 #define NVC0_3D_RT_ADDRESS_HIGH(i0) (0x00000800 + 0x40*(i0)) #define NVC0_3D_RT_ADDRESS_LOW(i0) (0x00000804 + 0x40*(i0)) #define NVC0_3D_RT_HORIZ(i0) (0x00000808 + 0x40*(i0)) #define NVC0_3D_RT_VERT(i0) (0x0000080c + 0x40*(i0)) #define NVC0_3D_RT_FORMAT(i0) (0x00000810 + 0x40*(i0)) #define NVC0_3D_RT_TILE_MODE(i0) (0x00000814 + 0x40*(i0)) #define NVC0_3D_RT_TILE_MODE_X 0x00000001 #define NVC0_3D_RT_TILE_MODE_Y__MASK 0x00000070 #define NVC0_3D_RT_TILE_MODE_Y__SHIFT 4 #define NVC0_3D_RT_TILE_MODE_Z__MASK 0x00000700 #define NVC0_3D_RT_TILE_MODE_Z__SHIFT 8 #define NVC0_3D_RT_TILE_MODE_LINEAR 0x00001000 #define NVC0_3D_RT_TILE_MODE_UNK16 0x00010000 #define NVC0_3D_RT_ARRAY_MODE(i0) (0x00000818 + 0x40*(i0)) #define NVC0_3D_RT_ARRAY_MODE_LAYERS__MASK 0x0000ffff #define NVC0_3D_RT_ARRAY_MODE_LAYERS__SHIFT 0 #define NVC0_3D_RT_ARRAY_MODE_VOLUME 0x00010000 #define NVC0_3D_RT_LAYER_STRIDE(i0) (0x0000081c + 0x40*(i0)) #define NVC0_3D_RT_BASE_LAYER(i0) (0x00000820 + 0x40*(i0)) #define NVC0_3D_RT_UNK14(i0) (0x00000824 + 0x40*(i0)) #define NVC0_3D_VIEWPORT_SCALE_X(i0) (0x00000a00 + 0x20*(i0)) #define NVC0_3D_VIEWPORT_SCALE_X__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_SCALE_X__LEN 0x00000010 #define NVC0_3D_VIEWPORT_SCALE_Y(i0) (0x00000a04 + 0x20*(i0)) #define NVC0_3D_VIEWPORT_SCALE_Y__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_SCALE_Y__LEN 0x00000010 #define NVC0_3D_VIEWPORT_SCALE_Z(i0) (0x00000a08 + 0x20*(i0)) #define NVC0_3D_VIEWPORT_SCALE_Z__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_SCALE_Z__LEN 0x00000010 #define NVC0_3D_VIEWPORT_TRANSLATE_X(i0) (0x00000a0c + 0x20*(i0)) #define NVC0_3D_VIEWPORT_TRANSLATE_X__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_TRANSLATE_X__LEN 0x00000010 #define NVC0_3D_VIEWPORT_TRANSLATE_Y(i0) (0x00000a10 + 0x20*(i0)) #define NVC0_3D_VIEWPORT_TRANSLATE_Y__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_TRANSLATE_Y__LEN 0x00000010 #define NVC0_3D_VIEWPORT_TRANSLATE_Z(i0) (0x00000a14 + 0x20*(i0)) #define NVC0_3D_VIEWPORT_TRANSLATE_Z__ESIZE 0x00000020 #define NVC0_3D_VIEWPORT_TRANSLATE_Z__LEN 0x00000010 #define NVC0_3D_VIEWPORT_HORIZ(i0) (0x00000c00 + 0x10*(i0)) #define NVC0_3D_VIEWPORT_HORIZ__ESIZE 0x00000010 #define NVC0_3D_VIEWPORT_HORIZ__LEN 0x00000010 #define NVC0_3D_VIEWPORT_HORIZ_X__MASK 0x0000ffff #define NVC0_3D_VIEWPORT_HORIZ_X__SHIFT 0 #define NVC0_3D_VIEWPORT_HORIZ_W__MASK 0xffff0000 #define NVC0_3D_VIEWPORT_HORIZ_W__SHIFT 16 #define NVC0_3D_VIEWPORT_VERT(i0) (0x00000c04 + 0x10*(i0)) #define NVC0_3D_VIEWPORT_VERT__ESIZE 0x00000010 #define NVC0_3D_VIEWPORT_VERT__LEN 0x00000010 #define NVC0_3D_VIEWPORT_VERT_Y__MASK 0x0000ffff #define NVC0_3D_VIEWPORT_VERT_Y__SHIFT 0 #define NVC0_3D_VIEWPORT_VERT_H__MASK 0xffff0000 #define NVC0_3D_VIEWPORT_VERT_H__SHIFT 16 #define NVC0_3D_DEPTH_RANGE_NEAR(i0) (0x00000c08 + 0x10*(i0)) #define NVC0_3D_DEPTH_RANGE_NEAR__ESIZE 0x00000010 #define NVC0_3D_DEPTH_RANGE_NEAR__LEN 0x00000010 #define NVC0_3D_DEPTH_RANGE_FAR(i0) (0x00000c0c + 0x10*(i0)) #define NVC0_3D_DEPTH_RANGE_FAR__ESIZE 0x00000010 #define NVC0_3D_DEPTH_RANGE_FAR__LEN 0x00000010 #define NVC0_3D_CLIP_RECT_HORIZ(i0) (0x00000d00 + 0x8*(i0)) #define NVC0_3D_CLIP_RECT_HORIZ__ESIZE 0x00000008 #define NVC0_3D_CLIP_RECT_HORIZ__LEN 0x00000008 #define NVC0_3D_CLIP_RECT_HORIZ_MIN__MASK 0x0000ffff #define NVC0_3D_CLIP_RECT_HORIZ_MIN__SHIFT 0 #define NVC0_3D_CLIP_RECT_HORIZ_MAX__MASK 0xffff0000 #define NVC0_3D_CLIP_RECT_HORIZ_MAX__SHIFT 16 #define NVC0_3D_CLIP_RECT_VERT(i0) (0x00000d04 + 0x8*(i0)) #define NVC0_3D_CLIP_RECT_VERT__ESIZE 0x00000008 #define NVC0_3D_CLIP_RECT_VERT__LEN 0x00000008 #define NVC0_3D_CLIP_RECT_VERT_MIN__MASK 0x0000ffff #define NVC0_3D_CLIP_RECT_VERT_MIN__SHIFT 0 #define NVC0_3D_CLIP_RECT_VERT_MAX__MASK 0xffff0000 #define NVC0_3D_CLIP_RECT_VERT_MAX__SHIFT 16 #define NVC0_3D_CLIPID_REGION_HORIZ(i0) (0x00000d40 + 0x8*(i0)) #define NVC0_3D_CLIPID_REGION_HORIZ__ESIZE 0x00000008 #define NVC0_3D_CLIPID_REGION_HORIZ__LEN 0x00000004 #define NVC0_3D_CLIPID_REGION_HORIZ_X__MASK 0x0000ffff #define NVC0_3D_CLIPID_REGION_HORIZ_X__SHIFT 0 #define NVC0_3D_CLIPID_REGION_HORIZ_W__MASK 0xffff0000 #define NVC0_3D_CLIPID_REGION_HORIZ_W__SHIFT 16 #define NVC0_3D_CLIPID_REGION_VERT(i0) (0x00000d44 + 0x8*(i0)) #define NVC0_3D_CLIPID_REGION_VERT__ESIZE 0x00000008 #define NVC0_3D_CLIPID_REGION_VERT__LEN 0x00000004 #define NVC0_3D_CLIPID_REGION_VERT_Y__MASK 0x0000ffff #define NVC0_3D_CLIPID_REGION_VERT_Y__SHIFT 0 #define NVC0_3D_CLIPID_REGION_VERT_H__MASK 0xffff0000 #define NVC0_3D_CLIPID_REGION_VERT_H__SHIFT 16 #define NVC0_3D_UNK0D60 0x00000d60 #define NVC0_3D_CALL_LIMIT_LOG 0x00000d64 #define NVC0_3D_COUNTER_ENABLE 0x00000d68 #define NVC0_3D_COUNTER_ENABLE_UNK00 0x00000001 #define NVC0_3D_COUNTER_ENABLE_UNK01 0x00000002 #define NVC0_3D_COUNTER_ENABLE_UNK02 0x00000004 #define NVC0_3D_COUNTER_ENABLE_UNK03 0x00000008 #define NVC0_3D_COUNTER_ENABLE_UNK04 0x00000010 #define NVC0_3D_COUNTER_ENABLE_EMITTED_PRIMITIVES 0x00000020 #define NVC0_3D_COUNTER_ENABLE_UNK06 0x00000040 #define NVC0_3D_COUNTER_ENABLE_UNK07 0x00000080 #define NVC0_3D_COUNTER_ENABLE_UNK08 0x00000100 #define NVC0_3D_COUNTER_ENABLE_UNK09 0x00000200 #define NVC0_3D_COUNTER_ENABLE_GENERATED_PRIMITIVES 0x00000400 #define NVC0_3D_COUNTER_ENABLE_UNK0B 0x00000800 #define NVC0_3D_COUNTER_ENABLE_UNK0C 0x00001000 #define NVC0_3D_COUNTER_ENABLE_UNK0D 0x00002000 #define NVC0_3D_COUNTER_ENABLE_UNK0E 0x00004000 #define NVC0_3D_COUNTER_ENABLE_UNK0F 0x00008000 #define NVC0_3D_UNK0D6C(i0) (0x00000d6c + 0x4*(i0)) #define NVC0_3D_UNK0D6C__ESIZE 0x00000004 #define NVC0_3D_UNK0D6C__LEN 0x00000002 #define NVC0_3D_UNK0D6C_X__MASK 0x0000ffff #define NVC0_3D_UNK0D6C_X__SHIFT 0 #define NVC0_3D_UNK0D6C_Y__MASK 0xffff0000 #define NVC0_3D_UNK0D6C_Y__SHIFT 16 #define NVC0_3D_VERTEX_BUFFER_FIRST 0x00000d74 #define NVC0_3D_VERTEX_BUFFER_COUNT 0x00000d78 #define NVC0_3D_DEPTH_CLIP_NEGATIVE_Z 0x00000d7c #define NVC0_3D_CLEAR_COLOR(i0) (0x00000d80 + 0x4*(i0)) #define NVC0_3D_CLEAR_COLOR__ESIZE 0x00000004 #define NVC0_3D_CLEAR_COLOR__LEN 0x00000004 #define NVC0_3D_CLEAR_DEPTH 0x00000d90 #define NVC0_3D_UNK0D94 0x00000d94 #define NVE4_3D_UNK0D98 0x00000d98 #define NVC0_3D_UNK0D9C 0x00000d9c #define NVC0_3D_CLEAR_STENCIL 0x00000da0 #define NVE4_3D_UNK0DA4 0x00000da4 #define NVE4_3D_UNK0DA4_UNK0 0x00000001 #define NVE4_3D_UNK0DA4_UNK4 0x00000010 #define NVE4_3D_UNK0DA4_UNK12 0x00001000 #define NVC0_3D_POLYGON_MODE_FRONT 0x00000dac #define NVC0_3D_POLYGON_MODE_FRONT_POINT 0x00001b00 #define NVC0_3D_POLYGON_MODE_FRONT_LINE 0x00001b01 #define NVC0_3D_POLYGON_MODE_FRONT_FILL 0x00001b02 #define NVC0_3D_POLYGON_MODE_BACK 0x00000db0 #define NVC0_3D_POLYGON_MODE_BACK_POINT 0x00001b00 #define NVC0_3D_POLYGON_MODE_BACK_LINE 0x00001b01 #define NVC0_3D_POLYGON_MODE_BACK_FILL 0x00001b02 #define NVC0_3D_POLYGON_SMOOTH_ENABLE 0x00000db4 #define NVC0_3D_UNK0DB8 0x00000db8 #define NVC0_3D_ZCULL_UNK0DBC 0x00000dbc #define NVC0_3D_ZCULL_UNK0DBC_UNK0 0x00000001 #define NVC0_3D_ZCULL_UNK0DBC_UNK16__MASK 0x00030000 #define NVC0_3D_ZCULL_UNK0DBC_UNK16__SHIFT 16 #define NVC0_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0 #define NVC0_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4 #define NVC0_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8 #define NVC0_3D_PATCH_VERTICES 0x00000dcc #define NVC0_3D_ZCULL_UNK0DD8 0x00000dd8 #define NVC0_3D_ZCULL_UNK0DD8_UNK0__MASK 0x00000007 #define NVC0_3D_ZCULL_UNK0DD8_UNK0__SHIFT 0 #define NVC0_3D_ZCULL_UNK0DD8_UNK8__MASK 0x00000300 #define NVC0_3D_ZCULL_UNK0DD8_UNK8__SHIFT 8 #define NVC0_3D_ZCULL_UNK0DD8_UNK16__MASK 0xffff0000 #define NVC0_3D_ZCULL_UNK0DD8_UNK16__SHIFT 16 #define NVC0_3D_UNK0DDC 0x00000ddc #define NVC0_3D_WATCHDOG_TIMER 0x00000de4 #define NVC0_3D_PRIM_RESTART_WITH_DRAW_ARRAYS 0x00000de8 #define NVC0_3D_UNK0DEC 0x00000dec #define NVC0_3D_UNK0DF4 0x00000df4 #define NVC0_3D_WINDOW_OFFSET_X 0x00000df8 #define NVC0_3D_WINDOW_OFFSET_Y 0x00000dfc #define NVC0_3D_SCISSOR_ENABLE(i0) (0x00000e00 + 0x10*(i0)) #define NVC0_3D_SCISSOR_ENABLE__ESIZE 0x00000010 #define NVC0_3D_SCISSOR_ENABLE__LEN 0x00000010 #define NVC0_3D_SCISSOR_HORIZ(i0) (0x00000e04 + 0x10*(i0)) #define NVC0_3D_SCISSOR_HORIZ__ESIZE 0x00000010 #define NVC0_3D_SCISSOR_HORIZ__LEN 0x00000010 #define NVC0_3D_SCISSOR_HORIZ_MIN__MASK 0x0000ffff #define NVC0_3D_SCISSOR_HORIZ_MIN__SHIFT 0 #define NVC0_3D_SCISSOR_HORIZ_MAX__MASK 0xffff0000 #define NVC0_3D_SCISSOR_HORIZ_MAX__SHIFT 16 #define NVC0_3D_SCISSOR_VERT(i0) (0x00000e08 + 0x10*(i0)) #define NVC0_3D_SCISSOR_VERT__ESIZE 0x00000010 #define NVC0_3D_SCISSOR_VERT__LEN 0x00000010 #define NVC0_3D_SCISSOR_VERT_MIN__MASK 0x0000ffff #define NVC0_3D_SCISSOR_VERT_MIN__SHIFT 0 #define NVC0_3D_SCISSOR_VERT_MAX__MASK 0xffff0000 #define NVC0_3D_SCISSOR_VERT_MAX__SHIFT 16 #define NVC0_3D_UNK0F00(i0) (0x00000f00 + 0x4*(i0)) #define NVC0_3D_UNK0F00__ESIZE 0x00000004 #define NVC0_3D_UNK0F00__LEN 0x00000004 #define NVE4_3D_UNK0F20(i0) (0x00000f20 + 0x4*(i0)) #define NVE4_3D_UNK0F20__ESIZE 0x00000004 #define NVE4_3D_UNK0F20__LEN 0x00000005 #define NVC0_3D_STENCIL_BACK_FUNC_REF 0x00000f54 #define NVC0_3D_STENCIL_BACK_MASK 0x00000f58 #define NVC0_3D_STENCIL_BACK_FUNC_MASK 0x00000f5c #define NVC0_3D_VERTEX_RUNOUT_ADDRESS_HIGH 0x00000f84 #define NVC0_3D_VERTEX_RUNOUT_ADDRESS_LOW 0x00000f88 #define NVC0_3D_UNK0F8C 0x00000f8c #define NVC0_3D_COLOR_MASK_COMMON 0x00000f90 #define NVC0_3D_UNK0F98 0x00000f98 #define NVC0_3D_DEPTH_BOUNDS(i0) (0x00000f9c + 0x4*(i0)) #define NVC0_3D_DEPTH_BOUNDS__ESIZE 0x00000004 #define NVC0_3D_DEPTH_BOUNDS__LEN 0x00000002 #define NVC0_3D_RT_SEPARATE_FRAG_DATA 0x00000fac #define NVC0_3D_UNK0FB0 0x00000fb0 #define NVC0_3D_MSAA_MASK(i0) (0x00000fbc + 0x4*(i0)) #define NVC0_3D_MSAA_MASK__ESIZE 0x00000004 #define NVC0_3D_MSAA_MASK__LEN 0x00000004 #define NVC0_3D_CLIPID_ADDRESS_HIGH 0x00000fcc #define NVC0_3D_CLIPID_ADDRESS_LOW 0x00000fd0 #define NVC0_3D_UNK0FDC 0x00000fdc #define NVC0_3D_ZETA_ADDRESS_HIGH 0x00000fe0 #define NVC0_3D_ZETA_ADDRESS_LOW 0x00000fe4 #define NVC0_3D_ZETA_FORMAT 0x00000fe8 #define NVC0_3D_ZETA_TILE_MODE 0x00000fec #define NVC0_3D_ZETA_LAYER_STRIDE 0x00000ff0 #define NVC0_3D_SCREEN_SCISSOR_HORIZ 0x00000ff4 #define NVC0_3D_SCREEN_SCISSOR_HORIZ_W__MASK 0xffff0000 #define NVC0_3D_SCREEN_SCISSOR_HORIZ_W__SHIFT 16 #define NVC0_3D_SCREEN_SCISSOR_HORIZ_X__MASK 0x0000ffff #define NVC0_3D_SCREEN_SCISSOR_HORIZ_X__SHIFT 0 #define NVC0_3D_SCREEN_SCISSOR_VERT 0x00000ff8 #define NVC0_3D_SCREEN_SCISSOR_VERT_H__MASK 0xffff0000 #define NVC0_3D_SCREEN_SCISSOR_VERT_H__SHIFT 16 #define NVC0_3D_SCREEN_SCISSOR_VERT_Y__MASK 0x0000ffff #define NVC0_3D_SCREEN_SCISSOR_VERT_Y__SHIFT 0 #define NVC0_3D_UNK1000 0x00001000 #define NVC0_3D_UNK1008 0x00001008 #define NVC0_3D_UNK100C 0x0000100c #define NVC0_3D_UNK1010 0x00001010 #define NVC0_3D_UNK1018 0x00001018 #define NVC0_3D_UNK101C 0x0000101c #define NVC0_3D_UNK1020 0x00001020 #define NVC0_3D_UNK1024 0x00001024 #define NVC0_3D_UNK1040(i0) (0x00001040 + 0x4*(i0)) #define NVC0_3D_UNK1040__ESIZE 0x00000004 #define NVC0_3D_UNK1040__LEN 0x00000010 #define NVC0_3D_UNK10CC 0x000010cc #define NVC0_3D_UNK10CC_UNK0__MASK 0x000000ff #define NVC0_3D_UNK10CC_UNK0__SHIFT 0 #define NVC0_3D_UNK10CC_UNK16__MASK 0x00ff0000 #define NVC0_3D_UNK10CC_UNK16__SHIFT 16 #define NVC0_3D_UNK10E0 0x000010e0 #define NVC0_3D_UNK10E0_UNK0__MASK 0x000000ff #define NVC0_3D_UNK10E0_UNK0__SHIFT 0 #define NVC0_3D_UNK10E0_UNK16__MASK 0x00ff0000 #define NVC0_3D_UNK10E0_UNK16__SHIFT 16 #define NVC0_3D_UNK10E4 0x000010e4 #define NVC0_3D_UNK10E4_UNK0__MASK 0x000000ff #define NVC0_3D_UNK10E4_UNK0__SHIFT 0 #define NVC0_3D_UNK10E4_UNK16__MASK 0x00ff0000 #define NVC0_3D_UNK10E4_UNK16__SHIFT 16 #define NVC0_3D_UNK10E8 0x000010e8 #define NVC0_3D_UNK10E8_UNK0__MASK 0x0000003f #define NVC0_3D_UNK10E8_UNK0__SHIFT 0 #define NVC0_3D_UNK10E8_UNK16__MASK 0x003f0000 #define NVC0_3D_UNK10E8_UNK16__SHIFT 16 #define NVC0_3D_UNK10EC 0x000010ec #define NVC0_3D_UNK10EC_UNK0__MASK 0x000000ff #define NVC0_3D_UNK10EC_UNK0__SHIFT 0 #define NVC0_3D_UNK10EC_UNK16__MASK 0x00ff0000 #define NVC0_3D_UNK10EC_UNK16__SHIFT 16 #define NVC0_3D_UNK10F0 0x000010f0 #define NVC0_3D_UNK10F0_UNK0__MASK 0x000000ff #define NVC0_3D_UNK10F0_UNK0__SHIFT 0 #define NVC0_3D_UNK10F0_UNK16__MASK 0x00ff0000 #define NVC0_3D_UNK10F0_UNK16__SHIFT 16 #define NVC0_3D_UNK10F4 0x000010f4 #define NVC0_3D_UNK10F4_UNK0 0x00000001 #define NVC0_3D_UNK10F4_UNK4 0x00000010 #define NVC0_3D_UNK10F4_UNK8 0x00000100 #define NVC0_3D_CLEAR_FLAGS 0x000010f8 #define NVC0_3D_CLEAR_FLAGS_STENCIL_MASK 0x00000001 #define NVC0_3D_CLEAR_FLAGS_UNK4 0x00000010 #define NVC0_3D_CLEAR_FLAGS_SCISSOR 0x00000100 #define NVC0_3D_CLEAR_FLAGS_VIEWPORT 0x00001000 #define NVC0_3D_UNK10FC 0x000010fc #define NVC0_3D_UNK110C 0x0000110c #define NVC0_3D_UNK1110 0x00001110 #define NVC0_3D_WRCACHE_FLUSH 0x00001114 #define NVC0_3D_VERTEX_ID_BASE 0x00001118 #define NVC0_3D_VTX_ATTR_MASK_UNK0DD0_ALT(i0) (0x00001120 + 0x4*(i0)) #define NVC0_3D_VTX_ATTR_MASK_UNK0DD0_ALT__ESIZE 0x00000004 #define NVC0_3D_VTX_ATTR_MASK_UNK0DD0_ALT__LEN 0x00000004 #define NVC0_3D_UNK1140 0x00001140 #define NVC0_3D_UNK1144 0x00001144 #define NVC0_3D_VTX_ATTR_DEFINE 0x0000114c #define NVC0_3D_VTX_ATTR_DEFINE_ATTR__MASK 0x000000ff #define NVC0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT 0 #define NVC0_3D_VTX_ATTR_DEFINE_COMP__MASK 0x00000700 #define NVC0_3D_VTX_ATTR_DEFINE_COMP__SHIFT 8 #define NVC0_3D_VTX_ATTR_DEFINE_COMP__MIN 0x00000001 #define NVC0_3D_VTX_ATTR_DEFINE_COMP__MAX 0x00000004 #define NVC0_3D_VTX_ATTR_DEFINE_SIZE__MASK 0x00007000 #define NVC0_3D_VTX_ATTR_DEFINE_SIZE__SHIFT 12 #define NVC0_3D_VTX_ATTR_DEFINE_SIZE_8 0x00001000 #define NVC0_3D_VTX_ATTR_DEFINE_SIZE_16 0x00002000 #define NVC0_3D_VTX_ATTR_DEFINE_SIZE_32 0x00004000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE__MASK 0x00070000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE__SHIFT 16 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SNORM 0x00010000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_UNORM 0x00020000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SINT 0x00030000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_UINT 0x00040000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_USCALED 0x00050000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_SSCALED 0x00060000 #define NVC0_3D_VTX_ATTR_DEFINE_TYPE_FLOAT 0x00070000 #define NVC0_3D_VTX_ATTR_DATA(i0) (0x00001150 + 0x4*(i0)) #define NVC0_3D_VTX_ATTR_DATA__ESIZE 0x00000004 #define NVC0_3D_VTX_ATTR_DATA__LEN 0x00000004 #define NVC0_3D_VERTEX_ATTRIB_FORMAT(i0) (0x00001160 + 0x4*(i0)) #define NVC0_3D_VERTEX_ATTRIB_FORMAT__ESIZE 0x00000004 #define NVC0_3D_VERTEX_ATTRIB_FORMAT__LEN 0x00000020 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__MASK 0x0000001f #define NVC0_3D_VERTEX_ATTRIB_FORMAT_BUFFER__SHIFT 0 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_CONST 0x00000040 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_OFFSET__MASK 0x001fff80 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_OFFSET__SHIFT 7 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE__MASK 0x07e00000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE__SHIFT 21 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32_32_32 0x00200000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32_32 0x00400000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16_16_16 0x00600000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32_32 0x00800000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16_16 0x00a00000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8_8_8 0x01400000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16_16 0x01e00000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_32 0x02400000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8_8 0x02600000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8_8 0x03000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_16 0x03600000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_8 0x03a00000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_10_10_10_2 0x06000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_SIZE_11_11_10 0x06200000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__MASK 0x38000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE__SHIFT 27 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SNORM 0x08000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_UNORM 0x10000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SINT 0x18000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_UINT 0x20000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_USCALED 0x28000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_SSCALED 0x30000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_TYPE_FLOAT 0x38000000 #define NVC0_3D_VERTEX_ATTRIB_FORMAT_BGRA 0x80000000 #define NVC0_3D_UNK1214 0x00001214 #define NVC0_3D_UNK1218 0x00001218 #define NVC0_3D_RT_CONTROL 0x0000121c #define NVC0_3D_RT_CONTROL_COUNT__MASK 0x0000000f #define NVC0_3D_RT_CONTROL_COUNT__SHIFT 0 #define NVC0_3D_RT_CONTROL_MAP0__MASK 0x00000070 #define NVC0_3D_RT_CONTROL_MAP0__SHIFT 4 #define NVC0_3D_RT_CONTROL_MAP1__MASK 0x00000380 #define NVC0_3D_RT_CONTROL_MAP1__SHIFT 7 #define NVC0_3D_RT_CONTROL_MAP2__MASK 0x00001c00 #define NVC0_3D_RT_CONTROL_MAP2__SHIFT 10 #define NVC0_3D_RT_CONTROL_MAP3__MASK 0x0000e000 #define NVC0_3D_RT_CONTROL_MAP3__SHIFT 13 #define NVC0_3D_RT_CONTROL_MAP4__MASK 0x00070000 #define NVC0_3D_RT_CONTROL_MAP4__SHIFT 16 #define NVC0_3D_RT_CONTROL_MAP5__MASK 0x00380000 #define NVC0_3D_RT_CONTROL_MAP5__SHIFT 19 #define NVC0_3D_RT_CONTROL_MAP6__MASK 0x01c00000 #define NVC0_3D_RT_CONTROL_MAP6__SHIFT 22 #define NVC0_3D_RT_CONTROL_MAP7__MASK 0x0e000000 #define NVC0_3D_RT_CONTROL_MAP7__SHIFT 25 #define NVC0_3D_UNK1220 0x00001220 #define NVC0_3D_ZETA_HORIZ 0x00001228 #define NVC0_3D_ZETA_VERT 0x0000122c #define NVC0_3D_ZETA_ARRAY_MODE 0x00001230 #define NVC0_3D_ZETA_ARRAY_MODE_LAYERS__MASK 0x0000ffff #define NVC0_3D_ZETA_ARRAY_MODE_LAYERS__SHIFT 0 #define NVC0_3D_ZETA_ARRAY_MODE_UNK 0x00010000 #define NVC0_3D_LINKED_TSC 0x00001234 #define NVC0_3D_DRAW_TFB_BYTES 0x0000123c #define NVC0_3D_UNK1284 0x00001284 #define NVC0_3D_UNK1288_TIC_FLUSH 0x00001288 #define NVC0_3D_UNK1290 0x00001290 #define NVC0_3D_UNK12A4 0x000012a4 #define NVC0_3D_UNK12AC 0x000012ac #define NVC0_3D_UNK12C8 0x000012c8 #define NVC0_3D_DEPTH_TEST_ENABLE 0x000012cc #define NVC0_3D_D3D_FILL_MODE 0x000012d0 #define NVC0_3D_D3D_FILL_MODE_POINT 0x00000001 #define NVC0_3D_D3D_FILL_MODE_WIREFRAME 0x00000002 #define NVC0_3D_D3D_FILL_MODE_SOLID 0x00000003 #define NVC0_3D_SHADE_MODEL 0x000012d4 #define NVC0_3D_SHADE_MODEL_FLAT 0x00001d00 #define NVC0_3D_SHADE_MODEL_SMOOTH 0x00001d01 #define NVC0_3D_UNK12D8(i0) (0x000012d8 + 0x4*(i0)) #define NVC0_3D_UNK12D8__ESIZE 0x00000004 #define NVC0_3D_UNK12D8__LEN 0x00000002 #define NVC0_3D_UNK12E0 0x000012e0 #define NVC0_3D_BLEND_INDEPENDENT 0x000012e4 #define NVC0_3D_DEPTH_WRITE_ENABLE 0x000012e8 #define NVC0_3D_ALPHA_TEST_ENABLE 0x000012ec #define NVC0_3D_VB_ELEMENT_U8_SETUP 0x00001300 #define NVC0_3D_VB_ELEMENT_U8_SETUP_OFFSET__MASK 0xc0000000 #define NVC0_3D_VB_ELEMENT_U8_SETUP_OFFSET__SHIFT 30 #define NVC0_3D_VB_ELEMENT_U8_SETUP_COUNT__MASK 0x3fffffff #define NVC0_3D_VB_ELEMENT_U8_SETUP_COUNT__SHIFT 0 #define NVC0_3D_VB_ELEMENT_U8 0x00001304 #define NVC0_3D_VB_ELEMENT_U8_I0__MASK 0x000000ff #define NVC0_3D_VB_ELEMENT_U8_I0__SHIFT 0 #define NVC0_3D_VB_ELEMENT_U8_I1__MASK 0x0000ff00 #define NVC0_3D_VB_ELEMENT_U8_I1__SHIFT 8 #define NVC0_3D_VB_ELEMENT_U8_I2__MASK 0x00ff0000 #define NVC0_3D_VB_ELEMENT_U8_I2__SHIFT 16 #define NVC0_3D_VB_ELEMENT_U8_I3__MASK 0xff000000 #define NVC0_3D_VB_ELEMENT_U8_I3__SHIFT 24 #define NVC0_3D_D3D_CULL_MODE 0x00001308 #define NVC0_3D_D3D_CULL_MODE_NONE 0x00000001 #define NVC0_3D_D3D_CULL_MODE_FRONT 0x00000002 #define NVC0_3D_D3D_CULL_MODE_BACK 0x00000003 #define NVC0_3D_DEPTH_TEST_FUNC 0x0000130c #define NVC0_3D_DEPTH_TEST_FUNC_NEVER 0x00000200 #define NVC0_3D_DEPTH_TEST_FUNC_LESS 0x00000201 #define NVC0_3D_DEPTH_TEST_FUNC_EQUAL 0x00000202 #define NVC0_3D_DEPTH_TEST_FUNC_LEQUAL 0x00000203 #define NVC0_3D_DEPTH_TEST_FUNC_GREATER 0x00000204 #define NVC0_3D_DEPTH_TEST_FUNC_NOTEQUAL 0x00000205 #define NVC0_3D_DEPTH_TEST_FUNC_GEQUAL 0x00000206 #define NVC0_3D_DEPTH_TEST_FUNC_ALWAYS 0x00000207 #define NVC0_3D_ALPHA_TEST_REF 0x00001310 #define NVC0_3D_ALPHA_TEST_FUNC 0x00001314 #define NVC0_3D_ALPHA_TEST_FUNC_NEVER 0x00000200 #define NVC0_3D_ALPHA_TEST_FUNC_LESS 0x00000201 #define NVC0_3D_ALPHA_TEST_FUNC_EQUAL 0x00000202 #define NVC0_3D_ALPHA_TEST_FUNC_LEQUAL 0x00000203 #define NVC0_3D_ALPHA_TEST_FUNC_GREATER 0x00000204 #define NVC0_3D_ALPHA_TEST_FUNC_NOTEQUAL 0x00000205 #define NVC0_3D_ALPHA_TEST_FUNC_GEQUAL 0x00000206 #define NVC0_3D_ALPHA_TEST_FUNC_ALWAYS 0x00000207 #define NVC0_3D_DRAW_TFB_STRIDE 0x00001318 #define NVC0_3D_DRAW_TFB_STRIDE__MIN 0x00000001 #define NVC0_3D_DRAW_TFB_STRIDE__MAX 0x00000fff #define NVC0_3D_BLEND_COLOR(i0) (0x0000131c + 0x4*(i0)) #define NVC0_3D_BLEND_COLOR__ESIZE 0x00000004 #define NVC0_3D_BLEND_COLOR__LEN 0x00000004 #define NVC0_3D_TSC_FLUSH 0x00001330 #define NVC0_3D_TSC_FLUSH_SPECIFIC 0x00000001 #define NVC0_3D_TSC_FLUSH_ENTRY__MASK 0x03fffff0 #define NVC0_3D_TSC_FLUSH_ENTRY__SHIFT 4 #define NVC0_3D_TIC_FLUSH 0x00001334 #define NVC0_3D_TIC_FLUSH_SPECIFIC 0x00000001 #define NVC0_3D_TIC_FLUSH_ENTRY__MASK 0x03fffff0 #define NVC0_3D_TIC_FLUSH_ENTRY__SHIFT 4 #define NVC0_3D_TEX_CACHE_CTL 0x00001338 #define NVC0_3D_TEX_CACHE_CTL_UNK0__MASK 0x00000007 #define NVC0_3D_TEX_CACHE_CTL_UNK0__SHIFT 0 #define NVE4_3D_TEX_CACHE_CTL_UNK0 0x00000001 #define NVC0_3D_TEX_CACHE_CTL_ENTRY__MASK 0x03fffff0 #define NVC0_3D_TEX_CACHE_CTL_ENTRY__SHIFT 4 #define NVC0_3D_BLEND_SEPARATE_ALPHA 0x0000133c #define NVC0_3D_BLEND_EQUATION_RGB 0x00001340 #define NVC0_3D_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006 #define NVC0_3D_BLEND_EQUATION_RGB_MIN 0x00008007 #define NVC0_3D_BLEND_EQUATION_RGB_MAX 0x00008008 #define NVC0_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a #define NVC0_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVC0_3D_BLEND_FUNC_SRC_RGB 0x00001344 #define NVC0_3D_BLEND_FUNC_DST_RGB 0x00001348 #define NVC0_3D_BLEND_EQUATION_ALPHA 0x0000134c #define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006 #define NVC0_3D_BLEND_EQUATION_ALPHA_MIN 0x00008007 #define NVC0_3D_BLEND_EQUATION_ALPHA_MAX 0x00008008 #define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a #define NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVC0_3D_BLEND_FUNC_SRC_ALPHA 0x00001350 #define NVC0_3D_UNK1354 0x00001354 #define NVC0_3D_BLEND_FUNC_DST_ALPHA 0x00001358 #define NVC0_3D_BLEND_ENABLE_COMMON 0x0000135c #define NVC0_3D_BLEND_ENABLE(i0) (0x00001360 + 0x4*(i0)) #define NVC0_3D_BLEND_ENABLE__ESIZE 0x00000004 #define NVC0_3D_BLEND_ENABLE__LEN 0x00000008 #define NVC0_3D_STENCIL_ENABLE 0x00001380 #define NVC0_3D_STENCIL_FRONT_OP_FAIL 0x00001384 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_ZERO 0x00000000 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_INVERT 0x0000150a #define NVC0_3D_STENCIL_FRONT_OP_FAIL_KEEP 0x00001e00 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_INCR 0x00001e02 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_DECR 0x00001e03 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_FRONT_OP_FAIL_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL 0x00001388 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_ZERO 0x00000000 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INVERT 0x0000150a #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_KEEP 0x00001e00 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INCR 0x00001e02 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_DECR 0x00001e03 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_FRONT_OP_ZFAIL_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS 0x0000138c #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_ZERO 0x00000000 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INVERT 0x0000150a #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_KEEP 0x00001e00 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INCR 0x00001e02 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_DECR 0x00001e03 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_FRONT_OP_ZPASS_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC 0x00001390 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_NEVER 0x00000200 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_LESS 0x00000201 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_EQUAL 0x00000202 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_LEQUAL 0x00000203 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_GREATER 0x00000204 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_NOTEQUAL 0x00000205 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_GEQUAL 0x00000206 #define NVC0_3D_STENCIL_FRONT_FUNC_FUNC_ALWAYS 0x00000207 #define NVC0_3D_STENCIL_FRONT_FUNC_REF 0x00001394 #define NVC0_3D_STENCIL_FRONT_FUNC_MASK 0x00001398 #define NVC0_3D_STENCIL_FRONT_MASK 0x0000139c #define NVC0_3D_DRAW_TFB_BASE 0x000013a4 #define NVC0_3D_FRAG_COLOR_CLAMP_EN 0x000013a8 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_0 0x00000001 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_1 0x00000010 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_2 0x00000100 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_3 0x00001000 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_4 0x00010000 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_5 0x00100000 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_6 0x01000000 #define NVC0_3D_FRAG_COLOR_CLAMP_EN_7 0x10000000 #define NVC0_3D_SCREEN_Y_CONTROL 0x000013ac #define NVC0_3D_SCREEN_Y_CONTROL_Y_NEGATE 0x00000001 #define NVC0_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP 0x00000010 #define NVC0_3D_LINE_WIDTH_SMOOTH 0x000013b0 #define NVC0_3D_LINE_WIDTH_ALIASED 0x000013b4 #define NVC0_3D_UNK1418 0x00001418 #define NVC0_3D_UNK1420 0x00001420 #define NVC0_3D_UNK1424_TSC_FLUSH 0x00001424 #define NVC0_3D_UNK1428_TIC_FLUSH 0x00001428 #define NVC0_3D_VERTEX_ARRAY_FLUSH 0x0000142c #define NVC0_3D_UNK1430 0x00001430 #define NVC0_3D_UNK1430_UNK0 0x00000010 #define NVC0_3D_UNK1430_UNK1 0x00000100 #define NVC0_3D_VB_ELEMENT_BASE 0x00001434 #define NVC0_3D_VB_INSTANCE_BASE 0x00001438 #define NVC0_3D_UNK143C_CLEAR_FLAGS 0x0000143c #define NVC0_3D_UNK143C_CLEAR_FLAGS_STENCIL_MASK 0x00000001 #define NVC0_3D_UNK143C_CLEAR_FLAGS_CLEAR_RECT__MASK 0x00000010 #define NVC0_3D_UNK143C_CLEAR_FLAGS_CLEAR_RECT__SHIFT 4 #define NVC0_3D_UNK143C_CLEAR_FLAGS_CLEAR_RECT_SCISSOR 0x00000000 #define NVC0_3D_UNK143C_CLEAR_FLAGS_CLEAR_RECT_VIEWPORT 0x00000000 #define NVC0_3D_UNK1444 0x00001444 #define NVC0_3D_UNK1448 0x00001448 #define NVC0_3D_UNK144C 0x0000144c #define NVC0_3D_UNK1450 0x00001450 #define NVC0_3D_UNK1454 0x00001454 #define NVC0_3D_UNK1464 0x00001464 #define NVC0_3D_UNK1500 0x00001500 #define NVC0_3D_CLIPID_HEIGHT 0x00001504 #define NVC0_3D_CLIPID_HEIGHT__MAX 0x00004000 #define NVC0_3D_CLIPID_FILL_RECT_HORIZ 0x00001508 #define NVC0_3D_CLIPID_FILL_RECT_HORIZ_LOW__MASK 0x0000ffff #define NVC0_3D_CLIPID_FILL_RECT_HORIZ_LOW__SHIFT 0 #define NVC0_3D_CLIPID_FILL_RECT_HORIZ_HIGH__MASK 0xffff0000 #define NVC0_3D_CLIPID_FILL_RECT_HORIZ_HIGH__SHIFT 16 #define NVC0_3D_CLIPID_FILL_RECT_VERT 0x0000150c #define NVC0_3D_CLIPID_FILL_RECT_VERT_LOW__MASK 0x0000ffff #define NVC0_3D_CLIPID_FILL_RECT_VERT_LOW__SHIFT 0 #define NVC0_3D_CLIPID_FILL_RECT_VERT_HIGH__MASK 0xffff0000 #define NVC0_3D_CLIPID_FILL_RECT_VERT_HIGH__SHIFT 16 #define NVC0_3D_CLIP_DISTANCE_ENABLE 0x00001510 #define NVC0_3D_CLIP_DISTANCE_ENABLE_0 0x00000001 #define NVC0_3D_CLIP_DISTANCE_ENABLE_1 0x00000002 #define NVC0_3D_CLIP_DISTANCE_ENABLE_2 0x00000004 #define NVC0_3D_CLIP_DISTANCE_ENABLE_3 0x00000008 #define NVC0_3D_CLIP_DISTANCE_ENABLE_4 0x00000010 #define NVC0_3D_CLIP_DISTANCE_ENABLE_5 0x00000020 #define NVC0_3D_CLIP_DISTANCE_ENABLE_6 0x00000040 #define NVC0_3D_CLIP_DISTANCE_ENABLE_7 0x00000080 #define NVC0_3D_SAMPLECNT_ENABLE 0x00001514 #define NVC0_3D_POINT_SIZE 0x00001518 #define NVC0_3D_ZCULL_STATCTRS_ENABLE 0x0000151c #define NVC0_3D_POINT_SPRITE_ENABLE 0x00001520 #define NVC0_3D_COUNTER_RESET 0x00001530 #define NVC0_3D_COUNTER_RESET_SAMPLECNT 0x00000001 #define NVC0_3D_COUNTER_RESET_UNK02 0x00000002 #define NVC0_3D_COUNTER_RESET_UNK03 0x00000003 #define NVC0_3D_COUNTER_RESET_UNK04 0x00000004 #define NVC0_3D_COUNTER_RESET_EMITTED_PRIMITIVES 0x00000010 #define NVC0_3D_COUNTER_RESET_UNK11 0x00000011 #define NVC0_3D_COUNTER_RESET_UNK12 0x00000012 #define NVC0_3D_COUNTER_RESET_UNK13 0x00000013 #define NVC0_3D_COUNTER_RESET_UNK15 0x00000015 #define NVC0_3D_COUNTER_RESET_UNK16 0x00000016 #define NVC0_3D_COUNTER_RESET_UNK17 0x00000017 #define NVC0_3D_COUNTER_RESET_UNK18 0x00000018 #define NVC0_3D_COUNTER_RESET_UNK1A 0x0000001a #define NVC0_3D_COUNTER_RESET_UNK1B 0x0000001b #define NVC0_3D_COUNTER_RESET_UNK1C 0x0000001c #define NVC0_3D_COUNTER_RESET_UNK1D 0x0000001d #define NVC0_3D_COUNTER_RESET_UNK1E 0x0000001e #define NVC0_3D_COUNTER_RESET_GENERATED_PRIMITIVES 0x0000001f #define NVC0_3D_MULTISAMPLE_ENABLE 0x00001534 #define NVC0_3D_ZETA_ENABLE 0x00001538 #define NVC0_3D_MULTISAMPLE_CTRL 0x0000153c #define NVC0_3D_MULTISAMPLE_CTRL_ALPHA_TO_COVERAGE 0x00000001 #define NVC0_3D_MULTISAMPLE_CTRL_ALPHA_TO_ONE 0x00000010 #define NVC0_3D_COND_ADDRESS_HIGH 0x00001550 #define NVC0_3D_COND_ADDRESS_LOW 0x00001554 #define NVC0_3D_COND_MODE 0x00001558 #define NVC0_3D_COND_MODE_NEVER 0x00000000 #define NVC0_3D_COND_MODE_ALWAYS 0x00000001 #define NVC0_3D_COND_MODE_RES_NON_ZERO 0x00000002 #define NVC0_3D_COND_MODE_EQUAL 0x00000003 #define NVC0_3D_COND_MODE_NOT_EQUAL 0x00000004 #define NVC0_3D_TSC_ADDRESS_HIGH 0x0000155c #define NVC0_3D_TSC_ADDRESS_LOW 0x00001560 #define NVC0_3D_TSC_ADDRESS_LOW__ALIGN 0x00000020 #define NVC0_3D_TSC_LIMIT 0x00001564 #define NVC0_3D_TSC_LIMIT__MAX 0x00001fff #define NVC0_3D_POLYGON_OFFSET_FACTOR 0x0000156c #define NVC0_3D_LINE_SMOOTH_ENABLE 0x00001570 #define NVC0_3D_TIC_ADDRESS_HIGH 0x00001574 #define NVC0_3D_TIC_ADDRESS_LOW 0x00001578 #define NVC0_3D_TIC_LIMIT 0x0000157c #define NVC0_3D_ZCULL_REGION 0x00001590 #define NVC0_3D_STENCIL_TWO_SIDE_ENABLE 0x00001594 #define NVC0_3D_STENCIL_BACK_OP_FAIL 0x00001598 #define NVC0_3D_STENCIL_BACK_OP_FAIL_ZERO 0x00000000 #define NVC0_3D_STENCIL_BACK_OP_FAIL_INVERT 0x0000150a #define NVC0_3D_STENCIL_BACK_OP_FAIL_KEEP 0x00001e00 #define NVC0_3D_STENCIL_BACK_OP_FAIL_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_BACK_OP_FAIL_INCR 0x00001e02 #define NVC0_3D_STENCIL_BACK_OP_FAIL_DECR 0x00001e03 #define NVC0_3D_STENCIL_BACK_OP_FAIL_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_BACK_OP_FAIL_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL 0x0000159c #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_ZERO 0x00000000 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INVERT 0x0000150a #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_KEEP 0x00001e00 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INCR 0x00001e02 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_DECR 0x00001e03 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_BACK_OP_ZFAIL_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_BACK_OP_ZPASS 0x000015a0 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_ZERO 0x00000000 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_INVERT 0x0000150a #define NVC0_3D_STENCIL_BACK_OP_ZPASS_KEEP 0x00001e00 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_REPLACE 0x00001e01 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_INCR 0x00001e02 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_DECR 0x00001e03 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_INCR_WRAP 0x00008507 #define NVC0_3D_STENCIL_BACK_OP_ZPASS_DECR_WRAP 0x00008508 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC 0x000015a4 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_NEVER 0x00000200 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_LESS 0x00000201 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_EQUAL 0x00000202 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_LEQUAL 0x00000203 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_GREATER 0x00000204 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_NOTEQUAL 0x00000205 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_GEQUAL 0x00000206 #define NVC0_3D_STENCIL_BACK_FUNC_FUNC_ALWAYS 0x00000207 #define NVC0_3D_CSAA_ENABLE 0x000015b4 #define NVC0_3D_FRAMEBUFFER_SRGB 0x000015b8 #define NVC0_3D_POLYGON_OFFSET_UNITS 0x000015bc #define NVC0_3D_UNK15C8 0x000015c8 #define NVC0_3D_LAYER 0x000015cc #define NVC0_3D_LAYER_IDX__MASK 0x0000ffff #define NVC0_3D_LAYER_IDX__SHIFT 0 #define NVC0_3D_LAYER_USE_GP 0x00010000 #define NVC0_3D_MULTISAMPLE_MODE 0x000015d0 #define NVC0_3D_MULTISAMPLE_MODE_MS1 0x00000000 #define NVC0_3D_MULTISAMPLE_MODE_MS2 0x00000001 #define NVC0_3D_MULTISAMPLE_MODE_MS4 0x00000002 #define NVC0_3D_MULTISAMPLE_MODE_MS8 0x00000003 #define NVC0_3D_MULTISAMPLE_MODE_MS8_ALT 0x00000004 #define NVC0_3D_MULTISAMPLE_MODE_MS2_ALT 0x00000005 #define NVC0_3D_MULTISAMPLE_MODE_UNK6 0x00000006 #define NVC0_3D_MULTISAMPLE_MODE_MS4_CS4 0x00000008 #define NVC0_3D_MULTISAMPLE_MODE_MS4_CS12 0x00000009 #define NVC0_3D_MULTISAMPLE_MODE_MS8_CS8 0x0000000a #define NVC0_3D_MULTISAMPLE_MODE_MS8_CS24 0x0000000b #define NVC0_3D_EDGEFLAG 0x000015e4 #define NVC0_3D_VB_ELEMENT_U32 0x000015e8 #define NVC0_3D_VB_ELEMENT_U16_SETUP 0x000015ec #define NVC0_3D_VB_ELEMENT_U16_SETUP_OFFSET__MASK 0xc0000000 #define NVC0_3D_VB_ELEMENT_U16_SETUP_OFFSET__SHIFT 30 #define NVC0_3D_VB_ELEMENT_U16_SETUP_COUNT__MASK 0x3fffffff #define NVC0_3D_VB_ELEMENT_U16_SETUP_COUNT__SHIFT 0 #define NVC0_3D_VB_ELEMENT_U16 0x000015f0 #define NVC0_3D_VB_ELEMENT_U16_I0__MASK 0x0000ffff #define NVC0_3D_VB_ELEMENT_U16_I0__SHIFT 0 #define NVC0_3D_VB_ELEMENT_U16_I1__MASK 0xffff0000 #define NVC0_3D_VB_ELEMENT_U16_I1__SHIFT 16 #define NVC0_3D_VERTEX_BASE_HIGH 0x000015f4 #define NVC0_3D_VERTEX_BASE_LOW 0x000015f8 #define NVC0_3D_ZCULL_WINDOW_OFFSET_X 0x000015fc #define NVC0_3D_ZCULL_WINDOW_OFFSET_Y 0x00001600 #define NVC0_3D_POINT_COORD_REPLACE 0x00001604 #define NVC0_3D_POINT_COORD_REPLACE_UNK0__MASK 0x00000003 #define NVC0_3D_POINT_COORD_REPLACE_UNK0__SHIFT 0 #define NVC0_3D_POINT_COORD_REPLACE_UNK0_UNK0 0x00000000 #define NVC0_3D_POINT_COORD_REPLACE_UNK0_UNK1 0x00000001 #define NVC0_3D_POINT_COORD_REPLACE_UNK0_UNK2 0x00000002 #define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN__MASK 0x00000004 #define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN__SHIFT 2 #define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_LOWER_LEFT 0x00000000 #define NVC0_3D_POINT_COORD_REPLACE_COORD_ORIGIN_UPPER_LEFT 0x00000004 #define NVC0_3D_POINT_COORD_REPLACE_ENABLE__MASK 0x00001ff8 #define NVC0_3D_POINT_COORD_REPLACE_ENABLE__SHIFT 3 #define NVC0_3D_CODE_ADDRESS_HIGH 0x00001608 #define NVC0_3D_CODE_ADDRESS_LOW 0x0000160c #define NVC0_3D_UNK1610 0x00001610 #define NVC0_3D_VERTEX_END_GL 0x00001614 #define NVC0_3D_VERTEX_END_GL_UNK0 0x00000001 #define NVC0_3D_VERTEX_BEGIN_GL 0x00001618 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE__MASK 0x0000ffff #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE__SHIFT 0 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS 0x00000000 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES 0x00000001 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_LOOP 0x00000002 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP 0x00000003 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES 0x00000004 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP 0x00000005 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_FAN 0x00000006 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUADS 0x00000007 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUAD_STRIP 0x00000008 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_POLYGON 0x00000009 #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES_ADJACENCY 0x0000000a #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d #define NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_PATCHES 0x0000000e #define NVC0_3D_VERTEX_BEGIN_GL_UNK24 0x01000000 #define NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT 0x04000000 #define NVC0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT 0x08000000 #define NVC0_3D_VERTEX_BEGIN_GL_UNK29 0x20000000 #define NVC0_3D_VERTEX_BEGIN_GL_UNK30 0x40000000 #define NVC0_3D_VERTEX_ID_REPLACE 0x0000161c #define NVC0_3D_VERTEX_ID_REPLACE_ENABLE 0x00000001 #define NVC0_3D_VERTEX_ID_REPLACE_SOURCE__MASK 0x00000ff0 #define NVC0_3D_VERTEX_ID_REPLACE_SOURCE__SHIFT 4 #define NVC0_3D_UNK1620 0x00001620 #define NVC0_3D_UNK1624 0x00001624 #define NVC0_3D_UNK162C 0x0000162c #define NVC0_3D_UNK1634 0x00001634 #define NVC0_3D_UNK1638 0x00001638 #define NVC0_3D_UNK163C 0x0000163c #define NVC0_3D_VERTEX_DATA 0x00001640 #define NVC0_3D_PRIM_RESTART_ENABLE 0x00001644 #define NVC0_3D_PRIM_RESTART_INDEX 0x00001648 #define NVC0_3D_VERTEX_ID_GEN_MODE 0x0000164c #define NVC0_3D_VERTEX_ID_GEN_MODE_DRAW_ARRAYS_ADD_START 0x00001000 #define NVC0_3D_POINT_SMOOTH_ENABLE 0x00001658 #define NVC0_3D_POINT_RASTER_RULES 0x0000165c #define NVC0_3D_POINT_RASTER_RULES_OGL 0x00000000 #define NVC0_3D_POINT_RASTER_RULES_D3D 0x00000001 #define NVC0_3D_TEX_MISC 0x00001664 #define NVC0_3D_TEX_MISC_UNK 0x00000002 #define NVC0_3D_TEX_MISC_SEAMLESS_CUBE_MAP 0x00000004 #define NVC0_3D_LINE_SMOOTH_BLUR 0x00001668 #define NVC0_3D_LINE_SMOOTH_BLUR_LOW 0x00000000 #define NVC0_3D_LINE_SMOOTH_BLUR_MEDIUM 0x00000001 #define NVC0_3D_LINE_SMOOTH_BLUR_HIGH 0x00000002 #define NVC0_3D_LINE_STIPPLE_ENABLE 0x0000166c #define NVC0_3D_COVERAGE_LUT(i0) (0x00001670 + 0x4*(i0)) #define NVC0_3D_COVERAGE_LUT__ESIZE 0x00000004 #define NVC0_3D_COVERAGE_LUT__LEN 0x00000004 #define NVC0_3D_COVERAGE_LUT_0__MASK 0x000000ff #define NVC0_3D_COVERAGE_LUT_0__SHIFT 0 #define NVC0_3D_COVERAGE_LUT_1__MASK 0x0000ff00 #define NVC0_3D_COVERAGE_LUT_1__SHIFT 8 #define NVC0_3D_COVERAGE_LUT_2__MASK 0x00ff0000 #define NVC0_3D_COVERAGE_LUT_2__SHIFT 16 #define NVC0_3D_COVERAGE_LUT_3__MASK 0xff000000 #define NVC0_3D_COVERAGE_LUT_3__SHIFT 24 #define NVC0_3D_LINE_STIPPLE_PATTERN 0x00001680 #define NVC0_3D_PROVOKING_VERTEX_LAST 0x00001684 #define NVC0_3D_VERTEX_TWO_SIDE_ENABLE 0x00001688 #define NVC0_3D_POLYGON_STIPPLE_ENABLE 0x0000168c #define NVC0_3D_UNK1690 0x00001690 #define NVC0_3D_UNK1690_ALWAYS_DERIV 0x00000001 #define NVC0_3D_UNK1690_UNK16 0x00010000 #define NVE4_3D_UNK1690 0x00001690 #define NVC0_3D_UNK169C 0x0000169c #define NVC0_3D_UNK16A0 0x000016a0 #define NVC0_3D_UNK16A4 0x000016a4 #define NVC0_3D_UNK16A8 0x000016a8 #define NVC0_3D_UNK16B4 0x000016b4 #define NVC0_3D_UNK16B4_UNK0 0x00000001 #define NVC0_3D_UNK16B4_UNK1 0x00000002 #define NVC0_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001700 + 0x4*(i0)) #define NVC0_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004 #define NVC0_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020 #define NVC0_3D_UNK1790 0x00001790 #define NVC0_3D_UNK1794 0x00001794 #define NVC0_3D_ZETA_BASE_LAYER 0x0000179c #define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_HIGH 0x000017bc #define NVC0_3D_VERTEX_QUARANTINE_ADDRESS_LOW 0x000017c0 #define NVC0_3D_VERTEX_QUARANTINE_SIZE 0x000017c4 #define NVC0_3D_VERTEX_QUARANTINE_SIZE_16K 0x00000001 #define NVC0_3D_VERTEX_QUARANTINE_SIZE_32K 0x00000002 #define NVC0_3D_VERTEX_QUARANTINE_SIZE_64K 0x00000003 #define NVC0_3D_INDEX_ARRAY_START_HIGH 0x000017c8 #define NVC0_3D_INDEX_ARRAY_START_LOW 0x000017cc #define NVC0_3D_INDEX_ARRAY_LIMIT_HIGH 0x000017d0 #define NVC0_3D_INDEX_ARRAY_LIMIT_LOW 0x000017d4 #define NVC0_3D_INDEX_FORMAT 0x000017d8 #define NVC0_3D_INDEX_FORMAT_I8 0x00000000 #define NVC0_3D_INDEX_FORMAT_I16 0x00000001 #define NVC0_3D_INDEX_FORMAT_I32 0x00000002 #define NVC0_3D_INDEX_BATCH_FIRST 0x000017dc #define NVC0_3D_INDEX_BATCH_COUNT 0x000017e0 #define NVC0_3D_UN17E4(i0) (0x000017e4 + 0x4*(i0)) #define NVC0_3D_UN17E4__ESIZE 0x00000004 #define NVC0_3D_UN17E4__LEN 0x00000006 #define NVC0_3D_POLYGON_OFFSET_CLAMP 0x0000187c #define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE(i0) (0x00001880 + 0x4*(i0)) #define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__ESIZE 0x00000004 #define NVC0_3D_VERTEX_ARRAY_PER_INSTANCE__LEN 0x00000020 #define NVC0_3D_VP_POINT_SIZE 0x00001910 #define NVC0_3D_VP_POINT_SIZE_ENABLE 0x00000001 #define NVC0_3D_VP_POINT_SIZE_UNK4__MASK 0x00000ff0 #define NVC0_3D_VP_POINT_SIZE_UNK4__SHIFT 4 #define NVC0_3D_CULL_FACE_ENABLE 0x00001918 #define NVC0_3D_FRONT_FACE 0x0000191c #define NVC0_3D_FRONT_FACE_CW 0x00000900 #define NVC0_3D_FRONT_FACE_CCW 0x00000901 #define NVC0_3D_CULL_FACE 0x00001920 #define NVC0_3D_CULL_FACE_FRONT 0x00000404 #define NVC0_3D_CULL_FACE_BACK 0x00000405 #define NVC0_3D_CULL_FACE_FRONT_AND_BACK 0x00000408 #define NVC0_3D_PIXEL_CENTER_INTEGER 0x00001924 #define NVC0_3D_VIEWPORT_TRANSFORM_EN 0x0000192c #define NVC0_3D_UNK1930 0x00001930 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL 0x0000193c #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_RANGE_0_1 0x00000001 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1__MASK 0x00000006 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1__SHIFT 1 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK0 0x00000000 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK1 0x00000002 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1_UNK2 0x00000004 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR 0x00000008 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR 0x00000010 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 0x00000080 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK10 0x00000400 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK11 0x00000800 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__MASK 0x00003000 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__SHIFT 12 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK0 0x00000000 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1 0x00001000 #define NVC0_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK2 0x00002000 #define NVC0_3D_CLIP_DISTANCE_MODE 0x00001940 #define NVC0_3D_CLIP_DISTANCE_MODE_0__MASK 0x00000001 #define NVC0_3D_CLIP_DISTANCE_MODE_0__SHIFT 0 #define NVC0_3D_CLIP_DISTANCE_MODE_0_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_0_CULL 0x00000001 #define NVC0_3D_CLIP_DISTANCE_MODE_1__MASK 0x00000010 #define NVC0_3D_CLIP_DISTANCE_MODE_1__SHIFT 4 #define NVC0_3D_CLIP_DISTANCE_MODE_1_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_1_CULL 0x00000010 #define NVC0_3D_CLIP_DISTANCE_MODE_2__MASK 0x00000100 #define NVC0_3D_CLIP_DISTANCE_MODE_2__SHIFT 8 #define NVC0_3D_CLIP_DISTANCE_MODE_2_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_2_CULL 0x00000100 #define NVC0_3D_CLIP_DISTANCE_MODE_3__MASK 0x00001000 #define NVC0_3D_CLIP_DISTANCE_MODE_3__SHIFT 12 #define NVC0_3D_CLIP_DISTANCE_MODE_3_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_3_CULL 0x00001000 #define NVC0_3D_CLIP_DISTANCE_MODE_4__MASK 0x00010000 #define NVC0_3D_CLIP_DISTANCE_MODE_4__SHIFT 16 #define NVC0_3D_CLIP_DISTANCE_MODE_4_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_4_CULL 0x00010000 #define NVC0_3D_CLIP_DISTANCE_MODE_5__MASK 0x00100000 #define NVC0_3D_CLIP_DISTANCE_MODE_5__SHIFT 20 #define NVC0_3D_CLIP_DISTANCE_MODE_5_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_5_CULL 0x00100000 #define NVC0_3D_CLIP_DISTANCE_MODE_6__MASK 0x01000000 #define NVC0_3D_CLIP_DISTANCE_MODE_6__SHIFT 24 #define NVC0_3D_CLIP_DISTANCE_MODE_6_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_6_CULL 0x01000000 #define NVC0_3D_CLIP_DISTANCE_MODE_7__MASK 0x10000000 #define NVC0_3D_CLIP_DISTANCE_MODE_7__SHIFT 28 #define NVC0_3D_CLIP_DISTANCE_MODE_7_CLIP 0x00000000 #define NVC0_3D_CLIP_DISTANCE_MODE_7_CULL 0x10000000 #define NVC0_3D_UNK1944 0x00001944 #define NVC0_3D_UNK1948 0x00001948 #define NVC0_3D_CLIP_RECTS_EN 0x0000194c #define NVC0_3D_CLIP_RECTS_MODE 0x00001950 #define NVC0_3D_CLIP_RECTS_MODE_INSIDE_ANY 0x00000000 #define NVC0_3D_CLIP_RECTS_MODE_OUTSIDE_ALL 0x00000001 #define NVC0_3D_CLIP_RECTS_MODE_NEVER 0x00000002 #define NVC0_3D_ZCULL_INVALIDATE 0x00001958 #define NVC0_3D_ZCULL_UNK1968 0x00001968 #define NVC0_3D_ZCULL_UNK1968_TESTS_ENABLE 0x00000001 #define NVC0_3D_ZCULL_UNK1968_UNK4 0x00000010 #define NVC0_3D_ZCULL_TEST_MASK 0x0000196c #define NVC0_3D_ZCULL_TEST_MASK_FAIL_GT_PASS_LT 0x00000001 #define NVC0_3D_ZCULL_TEST_MASK_PASS_GT_FAIL_LT 0x00000010 #define NVC0_3D_UNK1970_D3D 0x00001970 #define NVC0_3D_UNK1970_D3D_POINTS 0x00000001 #define NVC0_3D_UNK1970_D3D_LINES 0x00000002 #define NVC0_3D_UNK1970_D3D_LINE_STRIP 0x00000003 #define NVC0_3D_UNK1970_D3D_TRIANGLES 0x00000004 #define NVC0_3D_UNK1970_D3D_TRIANGLE_STRIP 0x00000005 #define NVC0_3D_UNK1970_D3D_LINES_ADJACENCY 0x0000000a #define NVC0_3D_UNK1970_D3D_LINE_STRIP_ADJACENCY 0x0000000b #define NVC0_3D_UNK1970_D3D_TRIANGLES_ADJACENCY 0x0000000c #define NVC0_3D_UNK1970_D3D_TRIANGLE_STRIP_ADJACENCY 0x0000000d #define NVC0_3D_UNK1970_D3D_PATCHES 0x0000000e #define NVC0_3D_UNK1978 0x00001978 #define NVC0_3D_CLIPID_ENABLE 0x0000197c #define NVC0_3D_CLIPID_WIDTH 0x00001980 #define NVC0_3D_CLIPID_WIDTH__MAX 0x00002000 #define NVC0_3D_CLIPID_WIDTH__ALIGN 0x00000040 #define NVC0_3D_CLIPID_ID 0x00001984 #define NVC0_3D_DEPTH_BOUNDS_EN 0x000019bc #define NVC0_3D_UNK19C0 0x000019c0 #define NVC0_3D_LOGIC_OP_ENABLE 0x000019c4 #define NVC0_3D_LOGIC_OP 0x000019c8 #define NVC0_3D_LOGIC_OP_CLEAR 0x00001500 #define NVC0_3D_LOGIC_OP_AND 0x00001501 #define NVC0_3D_LOGIC_OP_AND_REVERSE 0x00001502 #define NVC0_3D_LOGIC_OP_COPY 0x00001503 #define NVC0_3D_LOGIC_OP_AND_INVERTED 0x00001504 #define NVC0_3D_LOGIC_OP_NOOP 0x00001505 #define NVC0_3D_LOGIC_OP_XOR 0x00001506 #define NVC0_3D_LOGIC_OP_OR 0x00001507 #define NVC0_3D_LOGIC_OP_NOR 0x00001508 #define NVC0_3D_LOGIC_OP_EQUIV 0x00001509 #define NVC0_3D_LOGIC_OP_INVERT 0x0000150a #define NVC0_3D_LOGIC_OP_OR_REVERSE 0x0000150b #define NVC0_3D_LOGIC_OP_COPY_INVERTED 0x0000150c #define NVC0_3D_LOGIC_OP_OR_INVERTED 0x0000150d #define NVC0_3D_LOGIC_OP_NAND 0x0000150e #define NVC0_3D_LOGIC_OP_SET 0x0000150f #define NVC0_3D_ZETA_COMP_ENABLE 0x000019cc #define NVC0_3D_CLEAR_BUFFERS 0x000019d0 #define NVC0_3D_CLEAR_BUFFERS_Z 0x00000001 #define NVC0_3D_CLEAR_BUFFERS_S 0x00000002 #define NVC0_3D_CLEAR_BUFFERS_R 0x00000004 #define NVC0_3D_CLEAR_BUFFERS_G 0x00000008 #define NVC0_3D_CLEAR_BUFFERS_B 0x00000010 #define NVC0_3D_CLEAR_BUFFERS_A 0x00000020 #define NVC0_3D_CLEAR_BUFFERS_RT__MASK 0x000003c0 #define NVC0_3D_CLEAR_BUFFERS_RT__SHIFT 6 #define NVC0_3D_CLEAR_BUFFERS_LAYER__MASK 0x001ffc00 #define NVC0_3D_CLEAR_BUFFERS_LAYER__SHIFT 10 #define NVC0_3D_CLIPID_FILL 0x000019d4 #define NVC0_3D_RT_COMP_ENABLE(i0) (0x000019e0 + 0x4*(i0)) #define NVC0_3D_RT_COMP_ENABLE__ESIZE 0x00000004 #define NVC0_3D_RT_COMP_ENABLE__LEN 0x00000008 #define NVC0_3D_COLOR_MASK(i0) (0x00001a00 + 0x4*(i0)) #define NVC0_3D_COLOR_MASK__ESIZE 0x00000004 #define NVC0_3D_COLOR_MASK__LEN 0x00000008 #define NVC0_3D_COLOR_MASK_R 0x0000000f #define NVC0_3D_COLOR_MASK_G 0x000000f0 #define NVC0_3D_COLOR_MASK_B 0x00000f00 #define NVC0_3D_COLOR_MASK_A 0x0000f000 #define NVC0_3D_DELAY 0x00001a24 #define NVC0_3D_UNK1A2C(i0) (0x00001a2c + 0x4*(i0)) #define NVC0_3D_UNK1A2C__ESIZE 0x00000004 #define NVC0_3D_UNK1A2C__LEN 0x00000005 #define NVC0_3D_QUERY_ADDRESS_HIGH 0x00001b00 #define NVC0_3D_QUERY_ADDRESS_LOW 0x00001b04 #define NVC0_3D_QUERY_SEQUENCE 0x00001b08 #define NVC0_3D_QUERY_GET 0x00001b0c #define NVC0_3D_QUERY_GET_MODE__MASK 0x00000003 #define NVC0_3D_QUERY_GET_MODE__SHIFT 0 #define NVC0_3D_QUERY_GET_MODE_WRITE 0x00000000 #define NVC0_3D_QUERY_GET_MODE_SYNC 0x00000001 #define NVC0_3D_QUERY_GET_MODE_WRITE_UNK2 0x00000002 #define NVC0_3D_QUERY_GET_MODE_WRITE_INTR_NRHOST 0x00000003 #define NVC0_3D_QUERY_GET_UNK2 0x00000004 #define NVC0_3D_QUERY_GET_FENCE 0x00000010 #define NVC0_3D_QUERY_GET_STREAM__MASK 0x000000e0 #define NVC0_3D_QUERY_GET_STREAM__SHIFT 5 #define NVC0_3D_QUERY_GET_UNK8 0x00000100 #define NVC0_3D_QUERY_GET_UNIT__MASK 0x0000f000 #define NVC0_3D_QUERY_GET_UNIT__SHIFT 12 #define NVC0_3D_QUERY_GET_SYNC_COND__MASK 0x00010000 #define NVC0_3D_QUERY_GET_SYNC_COND__SHIFT 16 #define NVC0_3D_QUERY_GET_SYNC_COND_NEQUAL 0x00000000 #define NVC0_3D_QUERY_GET_SYNC_COND_GREATER 0x00010000 #define NVC0_3D_QUERY_GET_INTR 0x00100000 #define NVC0_3D_QUERY_GET_UNK21 0x00200000 #define NVC0_3D_QUERY_GET_SELECT__MASK 0x0f800000 #define NVC0_3D_QUERY_GET_SELECT__SHIFT 23 #define NVC0_3D_QUERY_GET_SELECT_ZERO 0x00000000 #define NVC0_3D_QUERY_GET_SELECT_SAMPLECNT 0x01000000 #define NVC0_3D_QUERY_GET_SELECT_EMITTED_PRIMS 0x05800000 #define NVC0_3D_QUERY_GET_SELECT_GENERATED_PRIMS 0x09000000 #define NVC0_3D_QUERY_GET_SHORT 0x10000000 #define NVC0_3D_VERTEX_ARRAY_FETCH(i0) (0x00001c00 + 0x10*(i0)) #define NVC0_3D_VERTEX_ARRAY_FETCH__ESIZE 0x00000010 #define NVC0_3D_VERTEX_ARRAY_FETCH__LEN 0x00000020 #define NVC0_3D_VERTEX_ARRAY_FETCH_STRIDE__MASK 0x00000fff #define NVC0_3D_VERTEX_ARRAY_FETCH_STRIDE__SHIFT 0 #define NVC0_3D_VERTEX_ARRAY_FETCH_ENABLE 0x00001000 #define NVC0_3D_VERTEX_ARRAY_START_HIGH(i0) (0x00001c04 + 0x10*(i0)) #define NVC0_3D_VERTEX_ARRAY_START_HIGH__ESIZE 0x00000010 #define NVC0_3D_VERTEX_ARRAY_START_HIGH__LEN 0x00000020 #define NVC0_3D_VERTEX_ARRAY_START_LOW(i0) (0x00001c08 + 0x10*(i0)) #define NVC0_3D_VERTEX_ARRAY_START_LOW__ESIZE 0x00000010 #define NVC0_3D_VERTEX_ARRAY_START_LOW__LEN 0x00000020 #define NVC0_3D_VERTEX_ARRAY_DIVISOR(i0) (0x00001c0c + 0x10*(i0)) #define NVC0_3D_VERTEX_ARRAY_DIVISOR__ESIZE 0x00000010 #define NVC0_3D_VERTEX_ARRAY_DIVISOR__LEN 0x00000020 #define NVC0_3D_IBLEND(i0) (0x00001e00 + 0x20*(i0)) #define NVC0_3D_IBLEND__ESIZE 0x00000020 #define NVC0_3D_IBLEND__LEN 0x00000008 #define NVC0_3D_IBLEND_SEPARATE_ALPHA(i0) (0x00001e00 + 0x20*(i0)) #define NVC0_3D_IBLEND_EQUATION_RGB(i0) (0x00001e04 + 0x20*(i0)) #define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_ADD 0x00008006 #define NVC0_3D_IBLEND_EQUATION_RGB_MIN 0x00008007 #define NVC0_3D_IBLEND_EQUATION_RGB_MAX 0x00008008 #define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a #define NVC0_3D_IBLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVC0_3D_IBLEND_FUNC_SRC_RGB(i0) (0x00001e08 + 0x20*(i0)) #define NVC0_3D_IBLEND_FUNC_DST_RGB(i0) (0x00001e0c + 0x20*(i0)) #define NVC0_3D_IBLEND_EQUATION_ALPHA(i0) (0x00001e10 + 0x20*(i0)) #define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006 #define NVC0_3D_IBLEND_EQUATION_ALPHA_MIN 0x00008007 #define NVC0_3D_IBLEND_EQUATION_ALPHA_MAX 0x00008008 #define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a #define NVC0_3D_IBLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVC0_3D_IBLEND_FUNC_SRC_ALPHA(i0) (0x00001e14 + 0x20*(i0)) #define NVC0_3D_IBLEND_FUNC_DST_ALPHA(i0) (0x00001e18 + 0x20*(i0)) #define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH(i0) (0x00001f00 + 0x8*(i0)) #define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__ESIZE 0x00000008 #define NVC0_3D_VERTEX_ARRAY_LIMIT_HIGH__LEN 0x00000020 #define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW(i0) (0x00001f04 + 0x8*(i0)) #define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__ESIZE 0x00000008 #define NVC0_3D_VERTEX_ARRAY_LIMIT_LOW__LEN 0x00000020 #define NVC0_3D_SP(i0) (0x00002000 + 0x40*(i0)) #define NVC0_3D_SP__ESIZE 0x00000040 #define NVC0_3D_SP__LEN 0x00000006 #define NVC0_3D_SP_SELECT(i0) (0x00002000 + 0x40*(i0)) #define NVC0_3D_SP_SELECT_ENABLE 0x00000001 #define NVC0_3D_SP_SELECT_PROGRAM__MASK 0x000000f0 #define NVC0_3D_SP_SELECT_PROGRAM__SHIFT 4 #define NVC0_3D_SP_SELECT_PROGRAM_VP_A 0x00000000 #define NVC0_3D_SP_SELECT_PROGRAM_VP_B 0x00000010 #define NVC0_3D_SP_SELECT_PROGRAM_TCP 0x00000020 #define NVC0_3D_SP_SELECT_PROGRAM_TEP 0x00000030 #define NVC0_3D_SP_SELECT_PROGRAM_GP 0x00000040 #define NVC0_3D_SP_SELECT_PROGRAM_FP 0x00000050 #define NVC0_3D_SP_START_ID(i0) (0x00002004 + 0x40*(i0)) #define NVC0_3D_SP_UNK08(i0) (0x00002008 + 0x40*(i0)) #define NVC0_3D_SP_GPR_ALLOC(i0) (0x0000200c + 0x40*(i0)) #define NVC0_3D_SP_TYPE(i0) (0x00002010 + 0x40*(i0)) #define NVC0_3D_SP_TYPE_VP 0x00000000 #define NVC0_3D_SP_TYPE_TCP 0x00000001 #define NVC0_3D_SP_TYPE_TEP 0x00000002 #define NVC0_3D_SP_TYPE_GP 0x00000003 #define NVC0_3D_SP_TYPE_FP 0x00000004 #define NVC0_3D_SP_UNK14(i0, i1) (0x00002014 + 0x40*(i0) + 0x4*(i1)) #define NVC0_3D_SP_UNK14__ESIZE 0x00000004 #define NVC0_3D_SP_UNK14__LEN 0x00000004 #define NVC0_3D_TEX_LIMITS(i0) (0x00002200 + 0x10*(i0)) #define NVC0_3D_TEX_LIMITS__ESIZE 0x00000010 #define NVC0_3D_TEX_LIMITS__LEN 0x00000005 #define NVC0_3D_TEX_LIMITS_SAMPLERS_LOG2__MASK 0x0000000f #define NVC0_3D_TEX_LIMITS_SAMPLERS_LOG2__SHIFT 0 #define NVC0_3D_TEX_LIMITS_SAMPLERS_LOG2__MIN 0x00000000 #define NVC0_3D_TEX_LIMITS_SAMPLERS_LOG2__MAX 0x00000004 #define NVC0_3D_TEX_LIMITS_TEXTURES_LOG2__MASK 0x000000f0 #define NVC0_3D_TEX_LIMITS_TEXTURES_LOG2__SHIFT 4 #define NVC0_3D_TEX_LIMITS_TEXTURES_LOG2__MIN 0x00000000 #define NVC0_3D_TEX_LIMITS_TEXTURES_LOG2__MAX 0x00000007 #define NVC0_3D_UNK2204(i0) (0x00002204 + 0x10*(i0)) #define NVC0_3D_UNK2204__ESIZE 0x00000010 #define NVC0_3D_UNK2204__LEN 0x00000005 #define NVC0_3D_UNK2208(i0) (0x00002208 + 0x10*(i0)) #define NVC0_3D_UNK2208__ESIZE 0x00000010 #define NVC0_3D_UNK2208__LEN 0x00000005 #define NVC0_3D_FIRMWARE(i0) (0x00002300 + 0x4*(i0)) #define NVC0_3D_FIRMWARE__ESIZE 0x00000004 #define NVC0_3D_FIRMWARE__LEN 0x00000020 #define NVC0_3D_CB_SIZE 0x00002380 #define NVC0_3D_CB_ADDRESS_HIGH 0x00002384 #define NVC0_3D_CB_ADDRESS_LOW 0x00002388 #define NVC0_3D_CB_POS 0x0000238c #define NVC0_3D_CB_DATA(i0) (0x00002390 + 0x4*(i0)) #define NVC0_3D_CB_DATA__ESIZE 0x00000004 #define NVC0_3D_CB_DATA__LEN 0x00000010 #define NVC0_3D_BIND_TSC(i0) (0x00002400 + 0x20*(i0)) #define NVC0_3D_BIND_TSC__ESIZE 0x00000020 #define NVC0_3D_BIND_TSC__LEN 0x00000005 #define NVC0_3D_BIND_TSC_ACTIVE 0x00000001 #define NVC0_3D_BIND_TSC_SAMPLER__MASK 0x00000ff0 #define NVC0_3D_BIND_TSC_SAMPLER__SHIFT 4 #define NVC0_3D_BIND_TSC_TSC__MASK 0x01fff000 #define NVC0_3D_BIND_TSC_TSC__SHIFT 12 #define NVC0_3D_BIND_TIC(i0) (0x00002404 + 0x20*(i0)) #define NVC0_3D_BIND_TIC__ESIZE 0x00000020 #define NVC0_3D_BIND_TIC__LEN 0x00000005 #define NVC0_3D_BIND_TIC_ACTIVE 0x00000001 #define NVC0_3D_BIND_TIC_TEXTURE__MASK 0x000001fe #define NVC0_3D_BIND_TIC_TEXTURE__SHIFT 1 #define NVC0_3D_BIND_TIC_TIC__MASK 0x7ffffe00 #define NVC0_3D_BIND_TIC_TIC__SHIFT 9 #define NVC0_3D_BIND_TSC2(i0) (0x00002408 + 0x20*(i0)) #define NVC0_3D_BIND_TSC2__ESIZE 0x00000020 #define NVC0_3D_BIND_TSC2__LEN 0x00000005 #define NVC0_3D_BIND_TSC2_ACTIVE 0x00000001 #define NVC0_3D_BIND_TSC2_SAMPLER__MASK 0x00000010 #define NVC0_3D_BIND_TSC2_SAMPLER__SHIFT 4 #define NVC0_3D_BIND_TSC2_TSC__MASK 0x01fff000 #define NVC0_3D_BIND_TSC2_TSC__SHIFT 12 #define NVC0_3D_BIND_TIC2(i0) (0x0000240c + 0x20*(i0)) #define NVC0_3D_BIND_TIC2__ESIZE 0x00000020 #define NVC0_3D_BIND_TIC2__LEN 0x00000005 #define NVC0_3D_BIND_TIC2_ACTIVE 0x00000001 #define NVC0_3D_BIND_TIC2_TEXTURE__MASK 0x00000002 #define NVC0_3D_BIND_TIC2_TEXTURE__SHIFT 1 #define NVC0_3D_BIND_TIC2_TIC__MASK 0x7ffffe00 #define NVC0_3D_BIND_TIC2_TIC__SHIFT 9 #define NVE4_3D_UNK2400_TSC(i0) (0x00002400 + 0x20*(i0)) #define NVE4_3D_UNK2400_TSC__ESIZE 0x00000020 #define NVE4_3D_UNK2400_TSC__LEN 0x00000005 #define NVE4_3D_UNK2400_TIC(i0) (0x00002404 + 0x20*(i0)) #define NVE4_3D_UNK2400_TIC__ESIZE 0x00000020 #define NVE4_3D_UNK2400_TIC__LEN 0x00000005 #define NVE4_3D_UNK2400_TSC2(i0) (0x00002408 + 0x20*(i0)) #define NVE4_3D_UNK2400_TSC2__ESIZE 0x00000020 #define NVE4_3D_UNK2400_TSC2__LEN 0x00000005 #define NVE4_3D_UNK2400_TIC2(i0) (0x0000240c + 0x20*(i0)) #define NVE4_3D_UNK2400_TIC2__ESIZE 0x00000020 #define NVE4_3D_UNK2400_TIC2__LEN 0x00000005 #define NVC0_3D_CB_BIND(i0) (0x00002410 + 0x20*(i0)) #define NVC0_3D_CB_BIND__ESIZE 0x00000020 #define NVC0_3D_CB_BIND__LEN 0x00000005 #define NVC0_3D_CB_BIND_VALID 0x00000001 #define NVC0_3D_CB_BIND_INDEX__MASK 0x000001f0 #define NVC0_3D_CB_BIND_INDEX__SHIFT 4 #define NVC0_3D_UNK2500(i0) (0x00002500 + 0x20*(i0)) #define NVC0_3D_UNK2500__ESIZE 0x00000020 #define NVC0_3D_UNK2500__LEN 0x00000005 #define NVC0_3D_UNK2504(i0) (0x00002504 + 0x20*(i0)) #define NVC0_3D_UNK2504__ESIZE 0x00000020 #define NVC0_3D_UNK2504__LEN 0x00000005 #define NVC0_3D_UNK2508(i0) (0x00002508 + 0x20*(i0)) #define NVC0_3D_UNK2508__ESIZE 0x00000020 #define NVC0_3D_UNK2508__LEN 0x00000005 #define NVC0_3D_UNK250C(i0) (0x0000250c + 0x20*(i0)) #define NVC0_3D_UNK250C__ESIZE 0x00000020 #define NVC0_3D_UNK250C__LEN 0x00000005 #define NVC0_3D_UNK2510(i0) (0x00002510 + 0x20*(i0)) #define NVC0_3D_UNK2510__ESIZE 0x00000020 #define NVC0_3D_UNK2510__LEN 0x00000005 #define NVC0_3D_VERT_COLOR_CLAMP_EN 0x00002600 #define NVE4_3D_UNK2604 0x00002604 #define NVE4_3D_TEX_CB_INDEX 0x00002608 #define NVE4_3D_TEX_CB_INDEX__MIN 0x00000000 #define NVE4_3D_TEX_CB_INDEX__MAX 0x00000010 #define NVE4_3D_UNK260C 0x0000260c #define NVC0_3D_IMAGE(i0) (0x00002700 + 0x20*(i0)) #define NVC0_3D_IMAGE__ESIZE 0x00000020 #define NVC0_3D_IMAGE__LEN 0x00000008 #define NVC0_3D_IMAGE_ADDRESS_HIGH(i0) (0x00002700 + 0x20*(i0)) #define NVC0_3D_IMAGE_ADDRESS_LOW(i0) (0x00002704 + 0x20*(i0)) #define NVC0_3D_IMAGE_WIDTH(i0) (0x00002708 + 0x20*(i0)) #define NVC0_3D_IMAGE_HEIGHT(i0) (0x0000270c + 0x20*(i0)) #define NVC0_3D_IMAGE_HEIGHT_HEIGHT__MASK 0x0000ffff #define NVC0_3D_IMAGE_HEIGHT_HEIGHT__SHIFT 0 #define NVC0_3D_IMAGE_HEIGHT_UNK16 0x00010000 #define NVC0_3D_IMAGE_HEIGHT_LINEAR 0x00100000 #define NVC0_3D_IMAGE_FORMAT(i0) (0x00002710 + 0x20*(i0)) #define NVC0_3D_IMAGE_FORMAT_UNK0 0x00000001 #define NVC0_3D_IMAGE_FORMAT_FORMAT_COLOR__MASK 0x00000ff0 #define NVC0_3D_IMAGE_FORMAT_FORMAT_COLOR__SHIFT 4 #define NVC0_3D_IMAGE_FORMAT_FORMAT_ZETA__MASK 0x0001f000 #define NVC0_3D_IMAGE_FORMAT_FORMAT_ZETA__SHIFT 12 #define NVC0_3D_IMAGE_TILE_MODE(i0) (0x00002714 + 0x20*(i0)) #define NVC0_3D_TFB_VARYING_LOCS(i0, i1) (0x00002800 + 0x80*(i0) + 0x4*(i1)) #define NVC0_3D_TFB_VARYING_LOCS__ESIZE 0x00000004 #define NVC0_3D_TFB_VARYING_LOCS__LEN 0x00000020 #define NVC0_3D_MP_PM_SET(i0) (0x0000335c + 0x4*(i0)) #define NVC0_3D_MP_PM_SET__ESIZE 0x00000004 #define NVC0_3D_MP_PM_SET__LEN 0x00000008 #define NVC0_3D_MP_PM_SIGSEL(i0) (0x0000337c + 0x4*(i0)) #define NVC0_3D_MP_PM_SIGSEL__ESIZE 0x00000004 #define NVC0_3D_MP_PM_SIGSEL__LEN 0x00000008 #define NVE4_3D_MP_PM_A_SIGSEL(i0) (0x0000337c + 0x4*(i0)) #define NVE4_3D_MP_PM_A_SIGSEL__ESIZE 0x00000004 #define NVE4_3D_MP_PM_A_SIGSEL__LEN 0x00000004 #define NVE4_3D_MP_PM_A_SIGSEL_NONE 0x00000000 #define NVE4_3D_MP_PM_A_SIGSEL_USER 0x00000001 #define NVE4_3D_MP_PM_A_SIGSEL_LAUNCH 0x00000003 #define NVE4_3D_MP_PM_A_SIGSEL_EXEC 0x00000004 #define NVE4_3D_MP_PM_A_SIGSEL_ISSUE 0x00000005 #define NVE4_3D_MP_PM_A_SIGSEL_LDST 0x0000001b #define NVE4_3D_MP_PM_A_SIGSEL_BRANCH 0x0000001c #define NVE4_3D_MP_PM_B_SIGSEL(i0) (0x0000338c + 0x4*(i0)) #define NVE4_3D_MP_PM_B_SIGSEL__ESIZE 0x00000004 #define NVE4_3D_MP_PM_B_SIGSEL__LEN 0x00000004 #define NVE4_3D_MP_PM_B_SIGSEL_NONE 0x00000000 #define NVE4_3D_MP_PM_B_SIGSEL_WARP 0x00000002 #define NVE4_3D_MP_PM_B_SIGSEL_REPLAY 0x00000008 #define NVE4_3D_MP_PM_B_SIGSEL_TRANSACTION 0x0000000e #define NVE4_3D_MP_PM_B_SIGSEL_L1 0x00000010 #define NVE4_3D_MP_PM_B_SIGSEL_MEM 0x00000011 #define NVC0_3D_MP_PM_SRCSEL(i0) (0x0000339c + 0x4*(i0)) #define NVC0_3D_MP_PM_SRCSEL__ESIZE 0x00000004 #define NVC0_3D_MP_PM_SRCSEL__LEN 0x00000008 #define NVC0_3D_MP_PM_SRCSEL_GRP0__MASK 0x00000007 #define NVC0_3D_MP_PM_SRCSEL_GRP0__SHIFT 0 #define NVC0_3D_MP_PM_SRCSEL_SIG0__MASK 0x00000070 #define NVC0_3D_MP_PM_SRCSEL_SIG0__SHIFT 4 #define NVC0_3D_MP_PM_SRCSEL_GRP1__MASK 0x00000700 #define NVC0_3D_MP_PM_SRCSEL_GRP1__SHIFT 8 #define NVC0_3D_MP_PM_SRCSEL_SIG1__MASK 0x00007000 #define NVC0_3D_MP_PM_SRCSEL_SIG1__SHIFT 12 #define NVC0_3D_MP_PM_SRCSEL_GRP2__MASK 0x00070000 #define NVC0_3D_MP_PM_SRCSEL_GRP2__SHIFT 16 #define NVC0_3D_MP_PM_SRCSEL_SIG2__MASK 0x00700000 #define NVC0_3D_MP_PM_SRCSEL_SIG2__SHIFT 20 #define NVC0_3D_MP_PM_SRCSEL_GRP3__MASK 0x07000000 #define NVC0_3D_MP_PM_SRCSEL_GRP3__SHIFT 24 #define NVC0_3D_MP_PM_SRCSEL_SIG3__MASK 0x70000000 #define NVC0_3D_MP_PM_SRCSEL_SIG3__SHIFT 28 #define NVE4_3D_MP_PM_SRCSEL(i0) (0x0000339c + 0x4*(i0)) #define NVE4_3D_MP_PM_SRCSEL__ESIZE 0x00000004 #define NVE4_3D_MP_PM_SRCSEL__LEN 0x00000008 #define NVE4_3D_MP_PM_SRCSEL_GRP0__MASK 0x00000003 #define NVE4_3D_MP_PM_SRCSEL_GRP0__SHIFT 0 #define NVE4_3D_MP_PM_SRCSEL_SIG0__MASK 0x0000001c #define NVE4_3D_MP_PM_SRCSEL_SIG0__SHIFT 2 #define NVE4_3D_MP_PM_SRCSEL_GRP1__MASK 0x00000060 #define NVE4_3D_MP_PM_SRCSEL_GRP1__SHIFT 5 #define NVE4_3D_MP_PM_SRCSEL_SIG1__MASK 0x00000380 #define NVE4_3D_MP_PM_SRCSEL_SIG1__SHIFT 7 #define NVE4_3D_MP_PM_SRCSEL_GRP2__MASK 0x00000c00 #define NVE4_3D_MP_PM_SRCSEL_GRP2__SHIFT 10 #define NVE4_3D_MP_PM_SRCSEL_SIG2__MASK 0x00007000 #define NVE4_3D_MP_PM_SRCSEL_SIG2__SHIFT 12 #define NVE4_3D_MP_PM_SRCSEL_GRP3__MASK 0x00018000 #define NVE4_3D_MP_PM_SRCSEL_GRP3__SHIFT 15 #define NVE4_3D_MP_PM_SRCSEL_SIG3__MASK 0x000e0000 #define NVE4_3D_MP_PM_SRCSEL_SIG3__SHIFT 17 #define NVE4_3D_MP_PM_SRCSEL_GRP4__MASK 0x00300000 #define NVE4_3D_MP_PM_SRCSEL_GRP4__SHIFT 20 #define NVE4_3D_MP_PM_SRCSEL_SIG4__MASK 0x01c00000 #define NVE4_3D_MP_PM_SRCSEL_SIG4__SHIFT 22 #define NVE4_3D_MP_PM_SRCSEL_GRP5__MASK 0x06000000 #define NVE4_3D_MP_PM_SRCSEL_GRP5__SHIFT 25 #define NVE4_3D_MP_PM_SRCSEL_SIG5__MASK 0x38000000 #define NVE4_3D_MP_PM_SRCSEL_SIG5__SHIFT 27 #define NVC0_3D_MP_PM_OP(i0) (0x000033bc + 0x4*(i0)) #define NVC0_3D_MP_PM_OP__ESIZE 0x00000004 #define NVC0_3D_MP_PM_OP__LEN 0x00000008 #define NVC0_3D_MP_PM_OP_MODE__MASK 0x00000001 #define NVC0_3D_MP_PM_OP_MODE__SHIFT 0 #define NVC0_3D_MP_PM_OP_MODE_LOGOP 0x00000000 #define NVC0_3D_MP_PM_OP_MODE_LOGOP_PULSE 0x00000001 #define NVC0_3D_MP_PM_OP_FUNC__MASK 0x000ffff0 #define NVC0_3D_MP_PM_OP_FUNC__SHIFT 4 #define NVE4_3D_MP_PM_FUNC(i0) (0x000033bc + 0x4*(i0)) #define NVE4_3D_MP_PM_FUNC__ESIZE 0x00000004 #define NVE4_3D_MP_PM_FUNC__LEN 0x00000008 #define NVE4_3D_MP_PM_FUNC_MODE__MASK 0x0000000f #define NVE4_3D_MP_PM_FUNC_MODE__SHIFT 0 #define NVE4_3D_MP_PM_FUNC_MODE_LOGOP 0x00000000 #define NVE4_3D_MP_PM_FUNC_MODE_LOGOP_PULSE 0x00000001 #define NVE4_3D_MP_PM_FUNC_MODE_B6 0x00000002 #define NVE4_3D_MP_PM_FUNC_MODE_UNK3 0x00000003 #define NVE4_3D_MP_PM_FUNC_MODE_LOGOP_B6 0x00000004 #define NVE4_3D_MP_PM_FUNC_MODE_LOGOP_B6_PULSE 0x00000005 #define NVE4_3D_MP_PM_FUNC_MODE_UNK6 0x00000006 #define NVE4_3D_MP_PM_FUNC_MODE_UNK7 0x00000007 #define NVE4_3D_MP_PM_FUNC_MODE_UNK8 0x00000008 #define NVE4_3D_MP_PM_FUNC_FUNC__MASK 0x000ffff0 #define NVE4_3D_MP_PM_FUNC_FUNC__SHIFT 4 #define NVC0_3D_MP_PM_UNK33DC 0x000033dc #define NVC0_3D_NVRM_MACRO_VERTEX_ARRAY_SELECT 0x00003820 #define NVC0_3D_NVRM_MACRO_BLEND_ENABLES 0x00003858 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_FRONT 0x00003868 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_FRONT_POINT 0x00001b00 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_FRONT_LINE 0x00001b01 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_FRONT_FILL 0x00001b02 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_BACK 0x00003870 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_BACK_POINT 0x00001b00 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_BACK_LINE 0x00001b01 #define NVC0_3D_NVRM_MACRO_POLYGON_MODE_BACK_FILL 0x00001b02 #define NVC0_3D_NVRM_MACRO_GP_SELECT 0x00003878 #define NVC0_3D_NVRM_MACRO_TEP_SELECT 0x00003880 #endif /* NVC0_3D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/gm107_texture.xml.h0000644000175000017500000004645414713424663016322 #ifndef GM107_TEXTURE_XML #define GM107_TEXTURE_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://github.com/envytools/envytools/ git clone https://github.com/envytools/envytools.git The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/../rnndb/graph/gm107_texture.xml ( 22057 bytes, from 2016-02-12 03:01:43) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6456 bytes, from 2015-09-10 02:57:40) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 2908 bytes, from 2016-02-04 22:19:11) - /home/skeggsb/git/envytools/rnndb/g80_defs.xml ( 21739 bytes, from 2016-02-04 00:29:42) Copyright (C) 2006-2016 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - Ilia Mirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define GM107_TIC2__SIZE 0x00000020 #define GM107_TIC2_0 0x00000000 #define GM107_TIC2_0_COMPONENTS_SIZES__MASK 0x0000007f #define GM107_TIC2_0_COMPONENTS_SIZES__SHIFT 0 #define GM107_TIC2_0_COMPONENTS_SIZES_R32_G32_B32_A32 0x00000001 #define GM107_TIC2_0_COMPONENTS_SIZES_R32_G32_B32 0x00000002 #define GM107_TIC2_0_COMPONENTS_SIZES_R16_G16_B16_A16 0x00000003 #define GM107_TIC2_0_COMPONENTS_SIZES_R32_G32 0x00000004 #define GM107_TIC2_0_COMPONENTS_SIZES_R32_B24G8 0x00000005 #define GM107_TIC2_0_COMPONENTS_SIZES_X8B8G8R8 0x00000007 #define GM107_TIC2_0_COMPONENTS_SIZES_A8B8G8R8 0x00000008 #define GM107_TIC2_0_COMPONENTS_SIZES_A2B10G10R10 0x00000009 #define GM107_TIC2_0_COMPONENTS_SIZES_R16_G16 0x0000000c #define GM107_TIC2_0_COMPONENTS_SIZES_G8R24 0x0000000d #define GM107_TIC2_0_COMPONENTS_SIZES_G24R8 0x0000000e #define GM107_TIC2_0_COMPONENTS_SIZES_R32 0x0000000f #define GM107_TIC2_0_COMPONENTS_SIZES_A4B4G4R4 0x00000012 #define GM107_TIC2_0_COMPONENTS_SIZES_A5B5G5R1 0x00000013 #define GM107_TIC2_0_COMPONENTS_SIZES_A1B5G5R5 0x00000014 #define GM107_TIC2_0_COMPONENTS_SIZES_B5G6R5 0x00000015 #define GM107_TIC2_0_COMPONENTS_SIZES_B6G5R5 0x00000016 #define GM107_TIC2_0_COMPONENTS_SIZES_G8R8 0x00000018 #define GM107_TIC2_0_COMPONENTS_SIZES_R16 0x0000001b #define GM107_TIC2_0_COMPONENTS_SIZES_Y8_VIDEO 0x0000001c #define GM107_TIC2_0_COMPONENTS_SIZES_R8 0x0000001d #define GM107_TIC2_0_COMPONENTS_SIZES_G4R4 0x0000001e #define GM107_TIC2_0_COMPONENTS_SIZES_R1 0x0000001f #define GM107_TIC2_0_COMPONENTS_SIZES_E5B9G9R9_SHAREDEXP 0x00000020 #define GM107_TIC2_0_COMPONENTS_SIZES_BF10GF11RF11 0x00000021 #define GM107_TIC2_0_COMPONENTS_SIZES_G8B8G8R8 0x00000022 #define GM107_TIC2_0_COMPONENTS_SIZES_B8G8R8G8 0x00000023 #define GM107_TIC2_0_COMPONENTS_SIZES_DXT1 0x00000024 #define GM107_TIC2_0_COMPONENTS_SIZES_DXT23 0x00000025 #define GM107_TIC2_0_COMPONENTS_SIZES_DXT45 0x00000026 #define GM107_TIC2_0_COMPONENTS_SIZES_DXN1 0x00000027 #define GM107_TIC2_0_COMPONENTS_SIZES_DXN2 0x00000028 #define GM107_TIC2_0_COMPONENTS_SIZES_BC6H_SF16 0x00000010 #define GM107_TIC2_0_COMPONENTS_SIZES_BC6H_UF16 0x00000011 #define GM107_TIC2_0_COMPONENTS_SIZES_BC7U 0x00000017 #define GM107_TIC2_0_COMPONENTS_SIZES_ETC2_RGB 0x00000006 #define GM107_TIC2_0_COMPONENTS_SIZES_ETC2_RGB_PTA 0x0000000a #define GM107_TIC2_0_COMPONENTS_SIZES_ETC2_RGBA 0x0000000b #define GM107_TIC2_0_COMPONENTS_SIZES_EAC 0x00000019 #define GM107_TIC2_0_COMPONENTS_SIZES_EACX2 0x0000001a #define GM107_TIC2_0_COMPONENTS_SIZES_Z24S8 0x00000029 #define GM107_TIC2_0_COMPONENTS_SIZES_X8Z24 0x0000002a #define GM107_TIC2_0_COMPONENTS_SIZES_S8Z24 0x0000002b #define GM107_TIC2_0_COMPONENTS_SIZES_X4V4Z24__COV4R4V 0x0000002c #define GM107_TIC2_0_COMPONENTS_SIZES_X4V4Z24__COV8R8V 0x0000002d #define GM107_TIC2_0_COMPONENTS_SIZES_V8Z24__COV4R12V 0x0000002e #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32 0x0000002f #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X24S8 0x00000030 #define GM107_TIC2_0_COMPONENTS_SIZES_X8Z24_X20V4S8__COV4R4V 0x00000031 #define GM107_TIC2_0_COMPONENTS_SIZES_X8Z24_X20V4S8__COV8R8V 0x00000032 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X20V4X8__COV4R4V 0x00000033 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X20V4X8__COV8R8V 0x00000034 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X20V4S8__COV4R4V 0x00000035 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X20V4S8__COV8R8V 0x00000036 #define GM107_TIC2_0_COMPONENTS_SIZES_X8Z24_X16V8S8__COV4R12V 0x00000037 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X16V8X8__COV4R12V 0x00000038 #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X16V8S8__COV4R12V 0x00000039 #define GM107_TIC2_0_COMPONENTS_SIZES_Z16 0x0000003a #define GM107_TIC2_0_COMPONENTS_SIZES_V8Z24__COV8R24V 0x0000003b #define GM107_TIC2_0_COMPONENTS_SIZES_X8Z24_X16V8S8__COV8R24V 0x0000003c #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X16V8X8__COV8R24V 0x0000003d #define GM107_TIC2_0_COMPONENTS_SIZES_ZF32_X16V8S8__COV8R24V 0x0000003e #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_4X4 0x00000040 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_5X4 0x00000050 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_5X5 0x00000041 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_6X5 0x00000051 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_6X6 0x00000042 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_8X5 0x00000055 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_8X6 0x00000052 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_8X8 0x00000044 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_10X5 0x00000056 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_10X6 0x00000057 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_10X8 0x00000053 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_10X10 0x00000045 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_12X10 0x00000054 #define GM107_TIC2_0_COMPONENTS_SIZES_ASTC_2D_12X12 0x00000046 #define GM107_TIC2_0_R_DATA_TYPE__MASK 0x00000380 #define GM107_TIC2_0_R_DATA_TYPE__SHIFT 7 #define GM107_TIC2_0_G_DATA_TYPE__MASK 0x00001c00 #define GM107_TIC2_0_G_DATA_TYPE__SHIFT 10 #define GM107_TIC2_0_B_DATA_TYPE__MASK 0x0000e000 #define GM107_TIC2_0_B_DATA_TYPE__SHIFT 13 #define GM107_TIC2_0_A_DATA_TYPE__MASK 0x00070000 #define GM107_TIC2_0_A_DATA_TYPE__SHIFT 16 #define GM107_TIC2_0_X_SOURCE__MASK 0x00380000 #define GM107_TIC2_0_X_SOURCE__SHIFT 19 #define GM107_TIC2_0_Y_SOURCE__MASK 0x01c00000 #define GM107_TIC2_0_Y_SOURCE__SHIFT 22 #define GM107_TIC2_0_Z_SOURCE__MASK 0x0e000000 #define GM107_TIC2_0_Z_SOURCE__SHIFT 25 #define GM107_TIC2_0_W_SOURCE__MASK 0x70000000 #define GM107_TIC2_0_W_SOURCE__SHIFT 28 #define GM107_TIC2_0_PACK_COMPONENTS 0x80000000 #define GM107_TIC2_1 0x00000004 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_0__MASK 0xffffffff #define GM107_TIC2_1_ADDRESS_BITS_31_TO_0__SHIFT 0 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_5__MASK 0xffffffe0 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_5__SHIFT 5 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_5__SHR 5 #define GM107_TIC2_1_GOB_DEPTH_OFFSET__MASK 0x00000060 #define GM107_TIC2_1_GOB_DEPTH_OFFSET__SHIFT 5 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_9__MASK 0xfffffe00 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_9__SHIFT 9 #define GM107_TIC2_1_ADDRESS_BITS_31_TO_9__SHR 9 #define GM107_TIC2_2 0x00000008 #define GM107_TIC2_2_ADDRESS_BITS_47_TO_32__MASK 0x0000ffff #define GM107_TIC2_2_ADDRESS_BITS_47_TO_32__SHIFT 0 #define GM107_TIC2_2_HEADER_VERSION__MASK 0x00e00000 #define GM107_TIC2_2_HEADER_VERSION__SHIFT 21 #define GM107_TIC2_2_HEADER_VERSION_ONE_D_BUFFER 0x00000000 #define GM107_TIC2_2_HEADER_VERSION_PITCH_COLORKEY 0x00200000 #define GM107_TIC2_2_HEADER_VERSION_PITCH 0x00400000 #define GM107_TIC2_2_HEADER_VERSION_BLOCKLINEAR 0x00600000 #define GM107_TIC2_2_HEADER_VERSION_BLOCKLINEAR_COLORKEY 0x00800000 #define GM107_TIC2_2_RESOURCE_VIEW_COHERENCY_HASH__MASK 0x1e000000 #define GM107_TIC2_2_RESOURCE_VIEW_COHERENCY_HASH__SHIFT 25 #define GM107_TIC2_3 0x0000000c #define GM107_TIC2_3_WIDTH_MINUS_ONE_BITS_31_TO_16__MASK 0x0000ffff #define GM107_TIC2_3_WIDTH_MINUS_ONE_BITS_31_TO_16__SHIFT 0 #define GM107_TIC2_3_PITCH_BITS_20_TO_5__MASK 0x0000ffff #define GM107_TIC2_3_PITCH_BITS_20_TO_5__SHIFT 0 #define GM107_TIC2_3_PITCH_BITS_20_TO_5__SHR 5 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH__MASK 0x00000007 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH__SHIFT 0 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH__MIN 0x00000000 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH__MAX 0x00000000 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_ONE 0x00000000 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_TWO 0x00000001 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_FOUR 0x00000002 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_EIGHT 0x00000003 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_SIXTEEN 0x00000004 #define GM107_TIC2_3_GOBS_PER_BLOCK_WIDTH_THIRTYTWO 0x00000005 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT__MASK 0x00000038 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT__SHIFT 3 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_ONE 0x00000000 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_TWO 0x00000008 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_FOUR 0x00000010 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_EIGHT 0x00000018 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_SIXTEEN 0x00000020 #define GM107_TIC2_3_GOBS_PER_BLOCK_HEIGHT_THIRTYTWO 0x00000028 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH__MASK 0x000001c0 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH__SHIFT 6 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_ONE 0x00000000 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_TWO 0x00000040 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_FOUR 0x00000080 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_EIGHT 0x000000c0 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_SIXTEEN 0x00000100 #define GM107_TIC2_3_GOBS_PER_BLOCK_DEPTH_THIRTYTWO 0x00000140 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS__MASK 0x00001c00 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS__SHIFT 10 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_ONE 0x00000000 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_TWO 0x00000400 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_FOUR 0x00000800 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_EIGHT 0x00000c00 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_SIXTEEN 0x00001000 #define GM107_TIC2_3_TILE_WIDTH_IN_GOBS_THIRTYTWO 0x00001400 #define GM107_TIC2_3_GOB_3D 0x00002000 #define GM107_TIC2_3_LOD_ANISO_QUALITY_2 0x00010000 #define GM107_TIC2_3_LOD_ANISO_QUALITY__MASK 0x00020000 #define GM107_TIC2_3_LOD_ANISO_QUALITY__SHIFT 17 #define GM107_TIC2_3_LOD_ANISO_QUALITY_LOW 0x00000000 #define GM107_TIC2_3_LOD_ANISO_QUALITY_HIGH 0x00020000 #define GM107_TIC2_3_LOD_ISO_QUALITY__MASK 0x00040000 #define GM107_TIC2_3_LOD_ISO_QUALITY__SHIFT 18 #define GM107_TIC2_3_LOD_ISO_QUALITY_LOW 0x00000000 #define GM107_TIC2_3_LOD_ISO_QUALITY_HIGH 0x00040000 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER__MASK 0x00180000 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER__SHIFT 19 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER_NONE 0x00000000 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER_CONST_ONE 0x00080000 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER_CONST_TWO 0x00100000 #define GM107_TIC2_3_ANISO_COARSE_SPREAD_MODIFIER_SQRT 0x00180000 #define GM107_TIC2_3_ANISO_SPREAD_SCALE__MASK 0x03e00000 #define GM107_TIC2_3_ANISO_SPREAD_SCALE__SHIFT 21 #define GM107_TIC2_3_USE_HEADER_OPT_CONTROL 0x04000000 #define GM107_TIC2_3_DEPTH_TEXTURE 0x08000000 #define GM107_TIC2_3_MAX_MIP_LEVEL__MASK 0xf0000000 #define GM107_TIC2_3_MAX_MIP_LEVEL__SHIFT 28 #define GM107_TIC2_4 0x00000010 #define GM107_TIC2_4_WIDTH_MINUS_ONE_BITS_15_TO_0__MASK 0x0000ffff #define GM107_TIC2_4_WIDTH_MINUS_ONE_BITS_15_TO_0__SHIFT 0 #define GM107_TIC2_4_WIDTH_MINUS_ONE__MASK 0x0000ffff #define GM107_TIC2_4_WIDTH_MINUS_ONE__SHIFT 0 #define GM107_TIC2_4_ANISO_SPREAD_MAX_LOG2__MASK 0x00380000 #define GM107_TIC2_4_ANISO_SPREAD_MAX_LOG2__SHIFT 19 #define GM107_TIC2_4_SRGB_CONVERSION 0x00400000 #define GM107_TIC2_4_TEXTURE_TYPE__MASK 0x07800000 #define GM107_TIC2_4_TEXTURE_TYPE__SHIFT 23 #define GM107_TIC2_4_TEXTURE_TYPE_ONE_D 0x00000000 #define GM107_TIC2_4_TEXTURE_TYPE_TWO_D 0x00800000 #define GM107_TIC2_4_TEXTURE_TYPE_THREE_D 0x01000000 #define GM107_TIC2_4_TEXTURE_TYPE_CUBEMAP 0x01800000 #define GM107_TIC2_4_TEXTURE_TYPE_ONE_D_ARRAY 0x02000000 #define GM107_TIC2_4_TEXTURE_TYPE_TWO_D_ARRAY 0x02800000 #define GM107_TIC2_4_TEXTURE_TYPE_ONE_D_BUFFER 0x03000000 #define GM107_TIC2_4_TEXTURE_TYPE_TWO_D_NO_MIPMAP 0x03800000 #define GM107_TIC2_4_TEXTURE_TYPE_CUBE_ARRAY 0x04000000 #define GM107_TIC2_4_SECTOR_PROMOTION__MASK 0x18000000 #define GM107_TIC2_4_SECTOR_PROMOTION__SHIFT 27 #define GM107_TIC2_4_SECTOR_PROMOTION_NO_PROMOTION 0x00000000 #define GM107_TIC2_4_SECTOR_PROMOTION_PROMOTE_TO_2_V 0x08000000 #define GM107_TIC2_4_SECTOR_PROMOTION_PROMOTE_TO_2_H 0x10000000 #define GM107_TIC2_4_SECTOR_PROMOTION_PROMOTE_TO_4 0x18000000 #define GM107_TIC2_4_BORDER_SIZE__MASK 0xe0000000 #define GM107_TIC2_4_BORDER_SIZE__SHIFT 29 #define GM107_TIC2_4_BORDER_SIZE_ONE 0x00000000 #define GM107_TIC2_4_BORDER_SIZE_TWO 0x20000000 #define GM107_TIC2_4_BORDER_SIZE_FOUR 0x40000000 #define GM107_TIC2_4_BORDER_SIZE_EIGHT 0x60000000 #define GM107_TIC2_4_BORDER_SIZE_SAMPLER_COLOR 0xe0000000 #define GM107_TIC2_5 0x00000014 #define GM107_TIC2_5_HEIGHT_MINUS_ONE__MASK 0x0000ffff #define GM107_TIC2_5_HEIGHT_MINUS_ONE__SHIFT 0 #define GM107_TIC2_5_DEPTH_MINUS_ONE__MASK 0x3fff0000 #define GM107_TIC2_5_DEPTH_MINUS_ONE__SHIFT 16 #define GM107_TIC2_5_NORMALIZED_COORDS 0x80000000 #define GM107_TIC2_6 0x00000018 #define GM107_TIC2_6_COLOR_KEY_OP 0x00000001 #define GM107_TIC2_6_TRILIN_OPT__MASK 0x0000003e #define GM107_TIC2_6_TRILIN_OPT__SHIFT 1 #define GM107_TIC2_6_MIP_LOD_BIAS__MASK 0x0007ffc0 #define GM107_TIC2_6_MIP_LOD_BIAS__SHIFT 6 #define GM107_TIC2_6_MIP_LOD_BIAS__RADIX 0x00000008 #define GM107_TIC2_6_ANISO_BIAS__MASK 0x00780000 #define GM107_TIC2_6_ANISO_BIAS__SHIFT 19 #define GM107_TIC2_6_ANISO_BIAS__RADIX 0x00000004 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC__MASK 0x01800000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC__SHIFT 23 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_HALF 0x00000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_ONE 0x00800000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_TWO 0x01000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_FUNC_MAX 0x01800000 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC__MASK 0x06000000 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC__SHIFT 25 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_HALF 0x00000000 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_ONE 0x02000000 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_TWO 0x04000000 #define GM107_TIC2_6_ANISO_COARSE_SPREAD_FUNC_MAX 0x06000000 #define GM107_TIC2_6_MAX_ANISOTROPY__MASK 0x38000000 #define GM107_TIC2_6_MAX_ANISOTROPY__SHIFT 27 #define GM107_TIC2_6_MAX_ANISOTROPY_1_TO_1 0x00000000 #define GM107_TIC2_6_MAX_ANISOTROPY_2_TO_1 0x08000000 #define GM107_TIC2_6_MAX_ANISOTROPY_4_TO_1 0x10000000 #define GM107_TIC2_6_MAX_ANISOTROPY_6_TO_1 0x18000000 #define GM107_TIC2_6_MAX_ANISOTROPY_8_TO_1 0x20000000 #define GM107_TIC2_6_MAX_ANISOTROPY_10_TO_1 0x28000000 #define GM107_TIC2_6_MAX_ANISOTROPY_12_TO_1 0x30000000 #define GM107_TIC2_6_MAX_ANISOTROPY_16_TO_1 0x38000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER__MASK 0xc0000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER__SHIFT 30 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER_NONE 0x00000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER_CONST_ONE 0x40000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER_CONST_TWO 0x80000000 #define GM107_TIC2_6_ANISO_FINE_SPREAD_MODIFIER_SQRT 0xc0000000 #define GM107_TIC2_7 0x0000001c #define GM107_TIC2_7_COLOR_KEY_VALUE__MASK 0xffffffff #define GM107_TIC2_7_COLOR_KEY_VALUE__SHIFT 0 #define GM107_TIC2_7_RES_VIEW_MIN_MIP_LEVEL__MASK 0x0000000f #define GM107_TIC2_7_RES_VIEW_MIN_MIP_LEVEL__SHIFT 0 #define GM107_TIC2_7_RES_VIEW_MAX_MIP_LEVEL__MASK 0x000000f0 #define GM107_TIC2_7_RES_VIEW_MAX_MIP_LEVEL__SHIFT 4 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT__MASK 0x00000f00 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT__SHIFT 8 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_1X1 0x00000000 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_2X1 0x00000100 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_2X2 0x00000200 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_4X2 0x00000300 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_4X2_D3D 0x00000400 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_2X1_D3D 0x00000500 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_4X4 0x00000600 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_2X2_VC_4 0x00000800 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_2X2_VC_12 0x00000900 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_4X2_VC_8 0x00000a00 #define GM107_TIC2_7_MULTI_SAMPLE_COUNT_4X2_VC_24 0x00000b00 #define GM107_TIC2_7_MIN_LOD_CLAMP__MASK 0x00fff000 #define GM107_TIC2_7_MIN_LOD_CLAMP__SHIFT 12 #define GM107_TIC2_7_MIN_LOD_CLAMP__RADIX 0x00000008 #endif /* GM107_TEXTURE_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv_m2mf.xml.h0000644000175000017500000001756414713424663015253 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_M2MF_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_M2MF_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV03_M2MF_DMA_NOTIFY 0x00000180 #define NV03_M2MF_DMA_BUFFER_IN 0x00000184 #define NV03_M2MF_DMA_BUFFER_OUT 0x00000188 #define NV50_M2MF_LINEAR_IN 0x00000200 #define NV50_M2MF_TILING_MODE_IN 0x00000204 #define NV50_M2MF_TILING_PITCH_IN 0x00000208 #define NV50_M2MF_TILING_HEIGHT_IN 0x0000020c #define NV50_M2MF_TILING_DEPTH_IN 0x00000210 #define NV50_M2MF_TILING_POSITION_IN_Z 0x00000214 #define NV50_M2MF_TILING_POSITION_IN 0x00000218 #define NV50_M2MF_TILING_POSITION_IN_X__MASK 0x0000ffff #define NV50_M2MF_TILING_POSITION_IN_X__SHIFT 0 #define NV50_M2MF_TILING_POSITION_IN_Y__MASK 0xffff0000 #define NV50_M2MF_TILING_POSITION_IN_Y__SHIFT 16 #define NV50_M2MF_LINEAR_OUT 0x0000021c #define NV50_M2MF_TILING_MODE_OUT 0x00000220 #define NV50_M2MF_TILING_PITCH_OUT 0x00000224 #define NV50_M2MF_TILING_HEIGHT_OUT 0x00000228 #define NV50_M2MF_TILING_DEPTH_OUT 0x0000022c #define NV50_M2MF_TILING_POSITION_OUT_Z 0x00000230 #define NV50_M2MF_TILING_POSITION_OUT 0x00000234 #define NV50_M2MF_TILING_POSITION_OUT_X__MASK 0x0000ffff #define NV50_M2MF_TILING_POSITION_OUT_X__SHIFT 0 #define NV50_M2MF_TILING_POSITION_OUT_Y__MASK 0xffff0000 #define NV50_M2MF_TILING_POSITION_OUT_Y__SHIFT 16 #define NV50_M2MF_OFFSET_IN_HIGH 0x00000238 #define NV50_M2MF_OFFSET_OUT_HIGH 0x0000023c #define NV03_M2MF_OFFSET_IN 0x0000030c #define NV03_M2MF_OFFSET_OUT 0x00000310 #define NV03_M2MF_PITCH_IN 0x00000314 #define NV03_M2MF_PITCH_OUT 0x00000318 #define NV03_M2MF_LINE_LENGTH_IN 0x0000031c #define NV03_M2MF_LINE_COUNT 0x00000320 #define NV03_M2MF_FORMAT 0x00000324 #define NV03_M2MF_FORMAT_INPUT_INC__MASK 0x000000ff #define NV03_M2MF_FORMAT_INPUT_INC__SHIFT 0 #define NV03_M2MF_FORMAT_INPUT_INC_1 0x00000001 #define NV03_M2MF_FORMAT_INPUT_INC_2 0x00000002 #define NV03_M2MF_FORMAT_INPUT_INC_4 0x00000004 #define NV50_M2MF_FORMAT_INPUT_INC_8 0x00000008 #define NV50_M2MF_FORMAT_INPUT_INC_16 0x00000010 #define NV03_M2MF_FORMAT_OUTPUT_INC__MASK 0x0000ff00 #define NV03_M2MF_FORMAT_OUTPUT_INC__SHIFT 8 #define NV03_M2MF_FORMAT_OUTPUT_INC_1 0x00000100 #define NV03_M2MF_FORMAT_OUTPUT_INC_2 0x00000200 #define NV03_M2MF_FORMAT_OUTPUT_INC_4 0x00000400 #define NV50_M2MF_FORMAT_OUTPUT_INC_8 0x00000800 #define NV50_M2MF_FORMAT_OUTPUT_INC_16 0x00001000 #define NV03_M2MF_BUF_NOTIFY 0x00000328 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV_M2MF_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv10_3d.xml.h0000644000175000017500000022460514713424663015055 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV10_3D_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV10_3D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV10_VERTEX_ATTR_POS 0x00000000 #define NV10_VERTEX_ATTR_COLOR0 0x00000001 #define NV10_VERTEX_ATTR_COLOR1 0x00000002 #define NV10_VERTEX_ATTR_TEX0 0x00000003 #define NV10_VERTEX_ATTR_TEX1 0x00000004 #define NV10_VERTEX_ATTR_NORMAL 0x00000005 #define NV10_VERTEX_ATTR_WEIGHT 0x00000006 #define NV10_VERTEX_ATTR_FOG 0x00000007 #define NV15_3D_FLIP_SET_READ 0x00000120 #define NV15_3D_FLIP_SET_WRITE 0x00000124 #define NV15_3D_FLIP_MAX 0x00000128 #define NV15_3D_FLIP_INCR_WRITE 0x0000012c #define NV15_3D_FLIP_WAIT 0x00000130 #define NV10_3D_DMA_NOTIFY 0x00000180 #define NV10_3D_DMA_TEXTURE0 0x00000184 #define NV10_3D_DMA_TEXTURE1 0x00000188 #define NV10_3D_DMA_COLOR 0x00000194 #define NV10_3D_DMA_ZETA 0x00000198 #define NV10_3D_RT_HORIZ 0x00000200 #define NV10_3D_RT_HORIZ_X__MASK 0x0000ffff #define NV10_3D_RT_HORIZ_X__SHIFT 0 #define NV10_3D_RT_HORIZ_W__MASK 0xffff0000 #define NV10_3D_RT_HORIZ_W__SHIFT 16 #define NV10_3D_RT_VERT 0x00000204 #define NV10_3D_RT_VERT_Y__MASK 0x0000ffff #define NV10_3D_RT_VERT_Y__SHIFT 0 #define NV10_3D_RT_VERT_H__MASK 0xffff0000 #define NV10_3D_RT_VERT_H__SHIFT 16 #define NV10_3D_RT_FORMAT 0x00000208 #define NV10_3D_RT_FORMAT_TYPE__MASK 0x00000f00 #define NV10_3D_RT_FORMAT_TYPE__SHIFT 8 #define NV10_3D_RT_FORMAT_TYPE_LINEAR 0x00000100 #define NV10_3D_RT_FORMAT_TYPE_SWIZZLED 0x00000200 #define NV10_3D_RT_FORMAT_DEPTH__MASK 0x00000030 #define NV10_3D_RT_FORMAT_DEPTH__SHIFT 4 #define NV10_3D_RT_FORMAT_DEPTH_Z24S8 0x00000000 #define NV10_3D_RT_FORMAT_DEPTH_Z16 0x00000010 #define NV10_3D_RT_FORMAT_COLOR__MASK 0x0000000f #define NV10_3D_RT_FORMAT_COLOR__SHIFT 0 #define NV10_3D_RT_FORMAT_COLOR_R5G6B5 0x00000003 #define NV10_3D_RT_FORMAT_COLOR_X8R8G8B8 0x00000005 #define NV10_3D_RT_FORMAT_COLOR_A8R8G8B8 0x00000008 #define NV10_3D_RT_FORMAT_COLOR_B8 0x00000009 #define NV10_3D_RT_PITCH 0x0000020c #define NV10_3D_RT_PITCH_COLOR_PITCH__MASK 0x0000ffff #define NV10_3D_RT_PITCH_COLOR_PITCH__SHIFT 0 #define NV10_3D_RT_PITCH_ZETA_PITCH__MASK 0xffff0000 #define NV10_3D_RT_PITCH_ZETA_PITCH__SHIFT 16 #define NV10_3D_COLOR_OFFSET 0x00000210 #define NV10_3D_ZETA_OFFSET 0x00000214 #define NV10_3D_UNK0290 0x00000290 #define NV10_3D_VIEWPORT_CLIP_MODE 0x000002b4 #define NV10_3D_VIEWPORT_CLIP_HORIZ(i0) (0x000002c0 + 0x4*(i0)) #define NV10_3D_VIEWPORT_CLIP_HORIZ__ESIZE 0x00000004 #define NV10_3D_VIEWPORT_CLIP_HORIZ__LEN 0x00000008 #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__MASK 0x000007ff #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_L__SHIFT 0 #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_LEFT_ENABLE 0x00000800 #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__MASK 0x07ff0000 #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_R__SHIFT 16 #define NV10_3D_VIEWPORT_CLIP_HORIZ_CLIP_RIGHT_ENABLE 0x08000000 #define NV10_3D_VIEWPORT_CLIP_VERT(i0) (0x000002e0 + 0x4*(i0)) #define NV10_3D_VIEWPORT_CLIP_VERT__ESIZE 0x00000004 #define NV10_3D_VIEWPORT_CLIP_VERT__LEN 0x00000008 #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_T__MASK 0x000007ff #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_T__SHIFT 0 #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_TOP_ENABLE 0x00000800 #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_B__MASK 0x07ff0000 #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_B__SHIFT 16 #define NV10_3D_VIEWPORT_CLIP_VERT_CLIP_BOTTOM_ENABLE 0x08000000 #define NV10_3D_ALPHA_FUNC_ENABLE 0x00000300 #define NV10_3D_BLEND_FUNC_ENABLE 0x00000304 #define NV10_3D_CULL_FACE_ENABLE 0x00000308 #define NV10_3D_DEPTH_TEST_ENABLE 0x0000030c #define NV10_3D_DITHER_ENABLE 0x00000310 #define NV10_3D_LIGHTING_ENABLE 0x00000314 #define NV10_3D_POINT_PARAMETERS_ENABLE 0x00000318 #define NV10_3D_POINT_SMOOTH_ENABLE 0x0000031c #define NV10_3D_LINE_SMOOTH_ENABLE 0x00000320 #define NV10_3D_POLYGON_SMOOTH_ENABLE 0x00000324 #define NV10_3D_STENCIL_ENABLE 0x0000032c #define NV10_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000330 #define NV10_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000334 #define NV10_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000338 #define NV10_3D_ALPHA_FUNC_FUNC 0x0000033c #define NV10_3D_ALPHA_FUNC_FUNC_NEVER 0x00000200 #define NV10_3D_ALPHA_FUNC_FUNC_LESS 0x00000201 #define NV10_3D_ALPHA_FUNC_FUNC_EQUAL 0x00000202 #define NV10_3D_ALPHA_FUNC_FUNC_LEQUAL 0x00000203 #define NV10_3D_ALPHA_FUNC_FUNC_GREATER 0x00000204 #define NV10_3D_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV10_3D_ALPHA_FUNC_FUNC_GEQUAL 0x00000206 #define NV10_3D_ALPHA_FUNC_FUNC_ALWAYS 0x00000207 #define NV10_3D_ALPHA_FUNC_REF 0x00000340 #define NV10_3D_BLEND_FUNC_SRC 0x00000344 #define NV10_3D_BLEND_FUNC_SRC_ZERO 0x00000000 #define NV10_3D_BLEND_FUNC_SRC_ONE 0x00000001 #define NV10_3D_BLEND_FUNC_SRC_SRC_COLOR 0x00000300 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_COLOR 0x00000301 #define NV10_3D_BLEND_FUNC_SRC_SRC_ALPHA 0x00000302 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_SRC_ALPHA 0x00000303 #define NV10_3D_BLEND_FUNC_SRC_DST_ALPHA 0x00000304 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_ALPHA 0x00000305 #define NV10_3D_BLEND_FUNC_SRC_DST_COLOR 0x00000306 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_DST_COLOR 0x00000307 #define NV10_3D_BLEND_FUNC_SRC_SRC_ALPHA_SATURATE 0x00000308 #define NV10_3D_BLEND_FUNC_SRC_CONSTANT_COLOR 0x00008001 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_COLOR 0x00008002 #define NV10_3D_BLEND_FUNC_SRC_CONSTANT_ALPHA 0x00008003 #define NV10_3D_BLEND_FUNC_SRC_ONE_MINUS_CONSTANT_ALPHA 0x00008004 #define NV10_3D_BLEND_FUNC_DST 0x00000348 #define NV10_3D_BLEND_FUNC_DST_ZERO 0x00000000 #define NV10_3D_BLEND_FUNC_DST_ONE 0x00000001 #define NV10_3D_BLEND_FUNC_DST_SRC_COLOR 0x00000300 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_COLOR 0x00000301 #define NV10_3D_BLEND_FUNC_DST_SRC_ALPHA 0x00000302 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_SRC_ALPHA 0x00000303 #define NV10_3D_BLEND_FUNC_DST_DST_ALPHA 0x00000304 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_DST_ALPHA 0x00000305 #define NV10_3D_BLEND_FUNC_DST_DST_COLOR 0x00000306 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_DST_COLOR 0x00000307 #define NV10_3D_BLEND_FUNC_DST_SRC_ALPHA_SATURATE 0x00000308 #define NV10_3D_BLEND_FUNC_DST_CONSTANT_COLOR 0x00008001 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_COLOR 0x00008002 #define NV10_3D_BLEND_FUNC_DST_CONSTANT_ALPHA 0x00008003 #define NV10_3D_BLEND_FUNC_DST_ONE_MINUS_CONSTANT_ALPHA 0x00008004 #define NV10_3D_BLEND_COLOR 0x0000034c #define NV10_3D_BLEND_COLOR_B__MASK 0x000000ff #define NV10_3D_BLEND_COLOR_B__SHIFT 0 #define NV10_3D_BLEND_COLOR_G__MASK 0x0000ff00 #define NV10_3D_BLEND_COLOR_G__SHIFT 8 #define NV10_3D_BLEND_COLOR_R__MASK 0x00ff0000 #define NV10_3D_BLEND_COLOR_R__SHIFT 16 #define NV10_3D_BLEND_COLOR_A__MASK 0xff000000 #define NV10_3D_BLEND_COLOR_A__SHIFT 24 #define NV10_3D_BLEND_EQUATION 0x00000350 #define NV10_3D_BLEND_EQUATION_FUNC_ADD 0x00008006 #define NV10_3D_BLEND_EQUATION_MIN 0x00008007 #define NV10_3D_BLEND_EQUATION_MAX 0x00008008 #define NV10_3D_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a #define NV10_3D_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b #define NV10_3D_DEPTH_FUNC 0x00000354 #define NV10_3D_DEPTH_FUNC_NEVER 0x00000200 #define NV10_3D_DEPTH_FUNC_LESS 0x00000201 #define NV10_3D_DEPTH_FUNC_EQUAL 0x00000202 #define NV10_3D_DEPTH_FUNC_LEQUAL 0x00000203 #define NV10_3D_DEPTH_FUNC_GREATER 0x00000204 #define NV10_3D_DEPTH_FUNC_NOTEQUAL 0x00000205 #define NV10_3D_DEPTH_FUNC_GEQUAL 0x00000206 #define NV10_3D_DEPTH_FUNC_ALWAYS 0x00000207 #define NV10_3D_COLOR_MASK 0x00000358 #define NV10_3D_COLOR_MASK_B 0x00000001 #define NV10_3D_COLOR_MASK_G 0x00000100 #define NV10_3D_COLOR_MASK_R 0x00010000 #define NV10_3D_COLOR_MASK_A 0x01000000 #define NV10_3D_DEPTH_WRITE_ENABLE 0x0000035c #define NV10_3D_STENCIL_MASK 0x00000360 #define NV10_3D_STENCIL_FUNC_FUNC 0x00000364 #define NV10_3D_STENCIL_FUNC_FUNC_NEVER 0x00000200 #define NV10_3D_STENCIL_FUNC_FUNC_LESS 0x00000201 #define NV10_3D_STENCIL_FUNC_FUNC_EQUAL 0x00000202 #define NV10_3D_STENCIL_FUNC_FUNC_LEQUAL 0x00000203 #define NV10_3D_STENCIL_FUNC_FUNC_GREATER 0x00000204 #define NV10_3D_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV10_3D_STENCIL_FUNC_FUNC_GEQUAL 0x00000206 #define NV10_3D_STENCIL_FUNC_FUNC_ALWAYS 0x00000207 #define NV10_3D_STENCIL_FUNC_REF 0x00000368 #define NV10_3D_STENCIL_FUNC_MASK 0x0000036c #define NV10_3D_STENCIL_OP_FAIL 0x00000370 #define NV10_3D_STENCIL_OP_FAIL_ZERO 0x00000000 #define NV10_3D_STENCIL_OP_FAIL_INVERT 0x0000150a #define NV10_3D_STENCIL_OP_FAIL_KEEP 0x00001e00 #define NV10_3D_STENCIL_OP_FAIL_REPLACE 0x00001e01 #define NV10_3D_STENCIL_OP_FAIL_INCR 0x00001e02 #define NV10_3D_STENCIL_OP_FAIL_DECR 0x00001e03 #define NV10_3D_STENCIL_OP_FAIL_INCR_WRAP 0x00008507 #define NV10_3D_STENCIL_OP_FAIL_DECR_WRAP 0x00008508 #define NV10_3D_STENCIL_OP_ZFAIL 0x00000374 #define NV10_3D_STENCIL_OP_ZFAIL_ZERO 0x00000000 #define NV10_3D_STENCIL_OP_ZFAIL_INVERT 0x0000150a #define NV10_3D_STENCIL_OP_ZFAIL_KEEP 0x00001e00 #define NV10_3D_STENCIL_OP_ZFAIL_REPLACE 0x00001e01 #define NV10_3D_STENCIL_OP_ZFAIL_INCR 0x00001e02 #define NV10_3D_STENCIL_OP_ZFAIL_DECR 0x00001e03 #define NV10_3D_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507 #define NV10_3D_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508 #define NV10_3D_STENCIL_OP_ZPASS 0x00000378 #define NV10_3D_STENCIL_OP_ZPASS_ZERO 0x00000000 #define NV10_3D_STENCIL_OP_ZPASS_INVERT 0x0000150a #define NV10_3D_STENCIL_OP_ZPASS_KEEP 0x00001e00 #define NV10_3D_STENCIL_OP_ZPASS_REPLACE 0x00001e01 #define NV10_3D_STENCIL_OP_ZPASS_INCR 0x00001e02 #define NV10_3D_STENCIL_OP_ZPASS_DECR 0x00001e03 #define NV10_3D_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507 #define NV10_3D_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508 #define NV10_3D_SHADE_MODEL 0x0000037c #define NV10_3D_SHADE_MODEL_FLAT 0x00001d00 #define NV10_3D_SHADE_MODEL_SMOOTH 0x00001d01 #define NV10_3D_LINE_WIDTH 0x00000380 #define NV10_3D_POLYGON_OFFSET_FACTOR 0x00000384 #define NV10_3D_POLYGON_OFFSET_UNITS 0x00000388 #define NV10_3D_POLYGON_MODE_FRONT 0x0000038c #define NV10_3D_POLYGON_MODE_FRONT_POINT 0x00001b00 #define NV10_3D_POLYGON_MODE_FRONT_LINE 0x00001b01 #define NV10_3D_POLYGON_MODE_FRONT_FILL 0x00001b02 #define NV10_3D_POLYGON_MODE_BACK 0x00000390 #define NV10_3D_POLYGON_MODE_BACK_POINT 0x00001b00 #define NV10_3D_POLYGON_MODE_BACK_LINE 0x00001b01 #define NV10_3D_POLYGON_MODE_BACK_FILL 0x00001b02 #define NV10_3D_DEPTH_RANGE_NEAR 0x00000394 #define NV10_3D_DEPTH_RANGE_FAR 0x00000398 #define NV10_3D_CULL_FACE 0x0000039c #define NV10_3D_CULL_FACE_FRONT 0x00000404 #define NV10_3D_CULL_FACE_BACK 0x00000405 #define NV10_3D_CULL_FACE_FRONT_AND_BACK 0x00000408 #define NV10_3D_FRONT_FACE 0x000003a0 #define NV10_3D_FRONT_FACE_CW 0x00000900 #define NV10_3D_FRONT_FACE_CCW 0x00000901 #define NV10_3D_VERTEX_POS_3F 0x00000c00 #define NV10_3D_VERTEX_POS_3F_X 0x00000c00 #define NV10_3D_VERTEX_POS_3F_Y 0x00000c04 #define NV10_3D_VERTEX_POS_3F_Z 0x00000c08 #define NV10_3D_VERTEX_POS_4F 0x00000c18 #define NV10_3D_VERTEX_POS_4F_X 0x00000c18 #define NV10_3D_VERTEX_POS_4F_Y 0x00000c1c #define NV10_3D_VERTEX_POS_4F_Z 0x00000c20 #define NV10_3D_VERTEX_POS_4F_W 0x00000c24 #define NV10_3D_VERTEX_NOR_3F 0x00000c30 #define NV10_3D_VERTEX_NOR_3F_X 0x00000c30 #define NV10_3D_VERTEX_NOR_3F_Y 0x00000c34 #define NV10_3D_VERTEX_NOR_3F_Z 0x00000c38 #define NV10_3D_VERTEX_NOR_3I 0x00000c30 #define NV10_3D_VERTEX_NOR_3I_XY 0x00000c30 #define NV10_3D_VERTEX_NOR_3I_XY_X__MASK 0x0000ffff #define NV10_3D_VERTEX_NOR_3I_XY_X__SHIFT 0 #define NV10_3D_VERTEX_NOR_3I_XY_Y__MASK 0xffff0000 #define NV10_3D_VERTEX_NOR_3I_XY_Y__SHIFT 16 #define NV10_3D_VERTEX_NOR_3I_Z 0x00000c34 #define NV10_3D_VERTEX_NOR_3I_Z_Z__MASK 0x0000ffff #define NV10_3D_VERTEX_NOR_3I_Z_Z__SHIFT 0 #define NV10_3D_VERTEX_COL_4F 0x00000c50 #define NV10_3D_VERTEX_COL_4F_R 0x00000c50 #define NV10_3D_VERTEX_COL_4F_G 0x00000c54 #define NV10_3D_VERTEX_COL_4F_B 0x00000c58 #define NV10_3D_VERTEX_COL_4F_A 0x00000c5c #define NV10_3D_VERTEX_COL_3F 0x00000c60 #define NV10_3D_VERTEX_COL_3F_R 0x00000c60 #define NV10_3D_VERTEX_COL_3F_G 0x00000c64 #define NV10_3D_VERTEX_COL_3F_B 0x00000c68 #define NV10_3D_VERTEX_COL_4I 0x00000c6c #define NV10_3D_VERTEX_COL_4I_R__MASK 0x000000ff #define NV10_3D_VERTEX_COL_4I_R__SHIFT 0 #define NV10_3D_VERTEX_COL_4I_G__MASK 0x0000ff00 #define NV10_3D_VERTEX_COL_4I_G__SHIFT 8 #define NV10_3D_VERTEX_COL_4I_B__MASK 0x00ff0000 #define NV10_3D_VERTEX_COL_4I_B__SHIFT 16 #define NV10_3D_VERTEX_COL_4I_A__MASK 0xff000000 #define NV10_3D_VERTEX_COL_4I_A__SHIFT 24 #define NV10_3D_VERTEX_COL2_3F 0x00000c80 #define NV10_3D_VERTEX_COL2_3F_R 0x00000c80 #define NV10_3D_VERTEX_COL2_3F_G 0x00000c84 #define NV10_3D_VERTEX_COL2_3F_B 0x00000c88 #define NV10_3D_VERTEX_COL2_3I 0x00000c8c #define NV10_3D_VERTEX_COL2_3I_R__MASK 0x000000ff #define NV10_3D_VERTEX_COL2_3I_R__SHIFT 0 #define NV10_3D_VERTEX_COL2_3I_G__MASK 0x0000ff00 #define NV10_3D_VERTEX_COL2_3I_G__SHIFT 8 #define NV10_3D_VERTEX_COL2_3I_B__MASK 0x00ff0000 #define NV10_3D_VERTEX_COL2_3I_B__SHIFT 16 #define NV10_3D_VERTEX_TX0_2F 0x00000c90 #define NV10_3D_VERTEX_TX0_2F_S 0x00000c90 #define NV10_3D_VERTEX_TX0_2F_T 0x00000c94 #define NV10_3D_VERTEX_TX0_2I 0x00000c98 #define NV10_3D_VERTEX_TX0_2I_S__MASK 0x0000ffff #define NV10_3D_VERTEX_TX0_2I_S__SHIFT 0 #define NV10_3D_VERTEX_TX0_2I_T__MASK 0xffff0000 #define NV10_3D_VERTEX_TX0_2I_T__SHIFT 16 #define NV10_3D_VERTEX_TX0_4F 0x00000ca0 #define NV10_3D_VERTEX_TX0_4F_S 0x00000ca0 #define NV10_3D_VERTEX_TX0_4F_T 0x00000ca4 #define NV10_3D_VERTEX_TX0_4F_R 0x00000ca8 #define NV10_3D_VERTEX_TX0_4F_Q 0x00000cac #define NV10_3D_VERTEX_TX0_4I 0x00000cb0 #define NV10_3D_VERTEX_TX0_4I_ST 0x00000cb0 #define NV10_3D_VERTEX_TX0_4I_ST_S__MASK 0x0000ffff #define NV10_3D_VERTEX_TX0_4I_ST_S__SHIFT 0 #define NV10_3D_VERTEX_TX0_4I_ST_T__MASK 0xffff0000 #define NV10_3D_VERTEX_TX0_4I_ST_T__SHIFT 16 #define NV10_3D_VERTEX_TX0_4I_RQ 0x00000cb4 #define NV10_3D_VERTEX_TX0_4I_RQ_R__MASK 0x0000ffff #define NV10_3D_VERTEX_TX0_4I_RQ_R__SHIFT 0 #define NV10_3D_VERTEX_TX0_4I_RQ_Q__MASK 0xffff0000 #define NV10_3D_VERTEX_TX0_4I_RQ_Q__SHIFT 16 #define NV10_3D_VERTEX_TX1_2F 0x00000cb8 #define NV10_3D_VERTEX_TX1_2F_S 0x00000cb8 #define NV10_3D_VERTEX_TX1_2F_T 0x00000cbc #define NV10_3D_VERTEX_TX1_2I 0x00000cc0 #define NV10_3D_VERTEX_TX1_2I_S__MASK 0x0000ffff #define NV10_3D_VERTEX_TX1_2I_S__SHIFT 0 #define NV10_3D_VERTEX_TX1_2I_T__MASK 0xffff0000 #define NV10_3D_VERTEX_TX1_2I_T__SHIFT 16 #define NV10_3D_VERTEX_TX1_4F 0x00000cc8 #define NV10_3D_VERTEX_TX1_4F_S 0x00000cc8 #define NV10_3D_VERTEX_TX1_4F_T 0x00000ccc #define NV10_3D_VERTEX_TX1_4F_R 0x00000cd0 #define NV10_3D_VERTEX_TX1_4F_Q 0x00000cd4 #define NV10_3D_VERTEX_TX1_4I 0x00000cd8 #define NV10_3D_VERTEX_TX1_4I_ST 0x00000cd8 #define NV10_3D_VERTEX_TX1_4I_ST_S__MASK 0x0000ffff #define NV10_3D_VERTEX_TX1_4I_ST_S__SHIFT 0 #define NV10_3D_VERTEX_TX1_4I_ST_T__MASK 0xffff0000 #define NV10_3D_VERTEX_TX1_4I_ST_T__SHIFT 16 #define NV10_3D_VERTEX_TX1_4I_RQ 0x00000cdc #define NV10_3D_VERTEX_TX1_4I_RQ_R__MASK 0x0000ffff #define NV10_3D_VERTEX_TX1_4I_RQ_R__SHIFT 0 #define NV10_3D_VERTEX_TX1_4I_RQ_Q__MASK 0xffff0000 #define NV10_3D_VERTEX_TX1_4I_RQ_Q__SHIFT 16 #define NV10_3D_VERTEX_FOG_1F 0x00000ce0 #define NV10_3D_VERTEX_WGH_1F 0x00000ce4 #define NV10_3D_EDGEFLAG_ENABLE 0x00000cec #define NV10_3D_DMA_VTXBUF 0x0000018c #define NV10_3D_VTXBUF_VALIDATE 0x00000cf0 #define NV10_3D_VTXBUF_OFFSET(i0) (0x00000d00 + 0x8*(i0)) #define NV10_3D_VTXBUF_FMT(i0) (0x00000d04 + 0x8*(i0)) #define NV10_3D_VTXBUF_FMT_TYPE__MASK 0x0000000f #define NV10_3D_VTXBUF_FMT_TYPE__SHIFT 0 #define NV10_3D_VTXBUF_FMT_TYPE_B8G8R8A8_UNORM 0x00000000 #define NV10_3D_VTXBUF_FMT_TYPE_V16_SNORM 0x00000001 #define NV10_3D_VTXBUF_FMT_TYPE_V32_FLOAT 0x00000002 #define NV10_3D_VTXBUF_FMT_TYPE_U8_UNORM 0x00000004 #define NV10_3D_VTXBUF_FMT_FIELDS__MASK 0x000000f0 #define NV10_3D_VTXBUF_FMT_FIELDS__SHIFT 4 #define NV10_3D_VTXBUF_FMT_STRIDE__MASK 0x0000ff00 #define NV10_3D_VTXBUF_FMT_STRIDE__SHIFT 8 #define NV10_3D_VTXBUF_FMT_HOMOGENEOUS 0x01000000 #define NV10_3D_VERTEX_BEGIN_END 0x00000dfc #define NV10_3D_VERTEX_BEGIN_END_STOP 0x00000000 #define NV10_3D_VERTEX_BEGIN_END_POINTS 0x00000001 #define NV10_3D_VERTEX_BEGIN_END_LINES 0x00000002 #define NV10_3D_VERTEX_BEGIN_END_LINE_LOOP 0x00000003 #define NV10_3D_VERTEX_BEGIN_END_LINE_STRIP 0x00000004 #define NV10_3D_VERTEX_BEGIN_END_TRIANGLES 0x00000005 #define NV10_3D_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006 #define NV10_3D_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007 #define NV10_3D_VERTEX_BEGIN_END_QUADS 0x00000008 #define NV10_3D_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009 #define NV10_3D_VERTEX_BEGIN_END_POLYGON 0x0000000a #define NV10_3D_VTXBUF_ELEMENT_U16 0x00000e00 #define NV10_3D_VTXBUF_ELEMENT_U16_I0__MASK 0x0000ffff #define NV10_3D_VTXBUF_ELEMENT_U16_I0__SHIFT 0 #define NV10_3D_VTXBUF_ELEMENT_U16_I1__MASK 0xffff0000 #define NV10_3D_VTXBUF_ELEMENT_U16_I1__SHIFT 16 #define NV10_3D_VTXBUF_ELEMENT_U32 0x00001100 #define NV10_3D_VTXBUF_BEGIN_END 0x000013fc #define NV10_3D_VTXBUF_BEGIN_END_STOP 0x00000000 #define NV10_3D_VTXBUF_BEGIN_END_POINTS 0x00000001 #define NV10_3D_VTXBUF_BEGIN_END_LINES 0x00000002 #define NV10_3D_VTXBUF_BEGIN_END_LINE_LOOP 0x00000003 #define NV10_3D_VTXBUF_BEGIN_END_LINE_STRIP 0x00000004 #define NV10_3D_VTXBUF_BEGIN_END_TRIANGLES 0x00000005 #define NV10_3D_VTXBUF_BEGIN_END_TRIANGLE_STRIP 0x00000006 #define NV10_3D_VTXBUF_BEGIN_END_TRIANGLE_FAN 0x00000007 #define NV10_3D_VTXBUF_BEGIN_END_QUADS 0x00000008 #define NV10_3D_VTXBUF_BEGIN_END_QUAD_STRIP 0x00000009 #define NV10_3D_VTXBUF_BEGIN_END_POLYGON 0x0000000a #define NV10_3D_VTXBUF_BATCH 0x00001400 #define NV10_3D_VTXBUF_BATCH_FIRST__MASK 0x0000ffff #define NV10_3D_VTXBUF_BATCH_FIRST__SHIFT 0 #define NV10_3D_VTXBUF_BATCH_LAST__MASK 0xff000000 #define NV10_3D_VTXBUF_BATCH_LAST__SHIFT 24 #define NV10_3D_VTXBUF_DATA 0x00001800 #define NV10_3D_VERTEX_WEIGHT_ENABLE 0x00000328 #define NV10_3D_VIEW_MATRIX_ENABLE 0x000003e8 #define NV10_3D_VIEW_MATRIX_ENABLE_MODELVIEW1 0x00000001 #define NV10_3D_VIEW_MATRIX_ENABLE_MODELVIEW0 0x00000002 #define NV10_3D_VIEW_MATRIX_ENABLE_PROJECTION 0x00000004 #define NV10_3D_MODELVIEW_MATRIX(i0, i1) (0x00000400 + 0x40*(i0) + 0x4*(i1)) #define NV10_3D_MODELVIEW_MATRIX__ESIZE 0x00000004 #define NV10_3D_MODELVIEW_MATRIX__LEN 0x00000010 #define NV10_3D_INVERSE_MODELVIEW_MATRIX(i0, i1) (0x00000480 + 0x40*(i0) + 0x4*(i1)) #define NV10_3D_INVERSE_MODELVIEW_MATRIX__ESIZE 0x00000004 #define NV10_3D_INVERSE_MODELVIEW_MATRIX__LEN 0x0000000c #define NV10_3D_PROJECTION_MATRIX(i0) (0x00000500 + 0x4*(i0)) #define NV10_3D_PROJECTION_MATRIX__ESIZE 0x00000004 #define NV10_3D_PROJECTION_MATRIX__LEN 0x00000010 #define NV10_3D_VIEWPORT_TRANSLATE 0x000006e8 #define NV10_3D_VIEWPORT_TRANSLATE_X 0x000006e8 #define NV10_3D_VIEWPORT_TRANSLATE_Y 0x000006ec #define NV10_3D_VIEWPORT_TRANSLATE_Z 0x000006f0 #define NV10_3D_VIEWPORT_TRANSLATE_W 0x000006f4 #define NV10_3D_LIGHT_MODEL 0x00000294 #define NV10_3D_LIGHT_MODEL_VERTEX_SPECULAR 0x00000001 #define NV10_3D_LIGHT_MODEL_SEPARATE_SPECULAR 0x00000002 #define NV10_3D_LIGHT_MODEL_LOCAL_VIEWER 0x00010000 #define NV10_3D_COLOR_MATERIAL 0x00000298 #define NV10_3D_COLOR_MATERIAL_EMISSION 0x00000001 #define NV10_3D_COLOR_MATERIAL_AMBIENT 0x00000002 #define NV10_3D_COLOR_MATERIAL_DIFFUSE 0x00000004 #define NV10_3D_COLOR_MATERIAL_SPECULAR 0x00000008 #define NV10_3D_MATERIAL_FACTOR 0x000003a8 #define NV10_3D_MATERIAL_FACTOR_R 0x000003a8 #define NV10_3D_MATERIAL_FACTOR_G 0x000003ac #define NV10_3D_MATERIAL_FACTOR_B 0x000003b0 #define NV10_3D_MATERIAL_FACTOR_A 0x000003b4 #define NV10_3D_NORMALIZE_ENABLE 0x000003a4 #define NV10_3D_SEPARATE_SPECULAR_ENABLE 0x000003b8 #define NV10_3D_ENABLED_LIGHTS 0x000003bc #define NV10_3D_ENABLED_LIGHTS_0__MASK 0x00000003 #define NV10_3D_ENABLED_LIGHTS_0__SHIFT 0 #define NV10_3D_ENABLED_LIGHTS_0_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_0_NONPOSITIONAL 0x00000001 #define NV10_3D_ENABLED_LIGHTS_0_POSITIONAL 0x00000002 #define NV10_3D_ENABLED_LIGHTS_0_DIRECTIONAL 0x00000003 #define NV10_3D_ENABLED_LIGHTS_1__MASK 0x0000000c #define NV10_3D_ENABLED_LIGHTS_1__SHIFT 2 #define NV10_3D_ENABLED_LIGHTS_1_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_1_NONPOSITIONAL 0x00000004 #define NV10_3D_ENABLED_LIGHTS_1_POSITIONAL 0x00000008 #define NV10_3D_ENABLED_LIGHTS_1_DIRECTIONAL 0x0000000c #define NV10_3D_ENABLED_LIGHTS_2__MASK 0x00000030 #define NV10_3D_ENABLED_LIGHTS_2__SHIFT 4 #define NV10_3D_ENABLED_LIGHTS_2_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_2_NONPOSITIONAL 0x00000010 #define NV10_3D_ENABLED_LIGHTS_2_POSITIONAL 0x00000020 #define NV10_3D_ENABLED_LIGHTS_2_DIRECTIONAL 0x00000030 #define NV10_3D_ENABLED_LIGHTS_3__MASK 0x000000c0 #define NV10_3D_ENABLED_LIGHTS_3__SHIFT 6 #define NV10_3D_ENABLED_LIGHTS_3_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_3_NONPOSITIONAL 0x00000040 #define NV10_3D_ENABLED_LIGHTS_3_POSITIONAL 0x00000080 #define NV10_3D_ENABLED_LIGHTS_3_DIRECTIONAL 0x000000c0 #define NV10_3D_ENABLED_LIGHTS_4__MASK 0x00000300 #define NV10_3D_ENABLED_LIGHTS_4__SHIFT 8 #define NV10_3D_ENABLED_LIGHTS_4_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_4_NONPOSITIONAL 0x00000100 #define NV10_3D_ENABLED_LIGHTS_4_POSITIONAL 0x00000200 #define NV10_3D_ENABLED_LIGHTS_4_DIRECTIONAL 0x00000300 #define NV10_3D_ENABLED_LIGHTS_5__MASK 0x00000c00 #define NV10_3D_ENABLED_LIGHTS_5__SHIFT 10 #define NV10_3D_ENABLED_LIGHTS_5_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_5_NONPOSITIONAL 0x00000400 #define NV10_3D_ENABLED_LIGHTS_5_POSITIONAL 0x00000800 #define NV10_3D_ENABLED_LIGHTS_5_DIRECTIONAL 0x00000c00 #define NV10_3D_ENABLED_LIGHTS_6__MASK 0x00003000 #define NV10_3D_ENABLED_LIGHTS_6__SHIFT 12 #define NV10_3D_ENABLED_LIGHTS_6_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_6_NONPOSITIONAL 0x00001000 #define NV10_3D_ENABLED_LIGHTS_6_POSITIONAL 0x00002000 #define NV10_3D_ENABLED_LIGHTS_6_DIRECTIONAL 0x00003000 #define NV10_3D_ENABLED_LIGHTS_7__MASK 0x0000c000 #define NV10_3D_ENABLED_LIGHTS_7__SHIFT 14 #define NV10_3D_ENABLED_LIGHTS_7_DISABLED 0x00000000 #define NV10_3D_ENABLED_LIGHTS_7_NONPOSITIONAL 0x00004000 #define NV10_3D_ENABLED_LIGHTS_7_POSITIONAL 0x00008000 #define NV10_3D_ENABLED_LIGHTS_7_DIRECTIONAL 0x0000c000 #define NV10_3D_MATERIAL_SHININESS(i0) (0x000006a0 + 0x4*(i0)) #define NV10_3D_MATERIAL_SHININESS__ESIZE 0x00000004 #define NV10_3D_MATERIAL_SHININESS__LEN 0x00000006 #define NV10_3D_LIGHT_MODEL_AMBIENT 0x000006c4 #define NV10_3D_LIGHT_MODEL_AMBIENT_R 0x000006c4 #define NV10_3D_LIGHT_MODEL_AMBIENT_G 0x000006c8 #define NV10_3D_LIGHT_MODEL_AMBIENT_B 0x000006cc #define NV10_3D_LIGHT(i0) (0x00000800 + 0x80*(i0)) #define NV10_3D_LIGHT__ESIZE 0x00000080 #define NV10_3D_LIGHT__LEN 0x00000008 #define NV10_3D_LIGHT_AMBIENT(i0) (0x00000800 + 0x80*(i0)) #define NV10_3D_LIGHT_AMBIENT_R(i0) (0x00000800 + 0x80*(i0)) #define NV10_3D_LIGHT_AMBIENT_G(i0) (0x00000804 + 0x80*(i0)) #define NV10_3D_LIGHT_AMBIENT_B(i0) (0x00000808 + 0x80*(i0)) #define NV10_3D_LIGHT_DIFFUSE(i0) (0x0000080c + 0x80*(i0)) #define NV10_3D_LIGHT_DIFFUSE_R(i0) (0x0000080c + 0x80*(i0)) #define NV10_3D_LIGHT_DIFFUSE_G(i0) (0x00000810 + 0x80*(i0)) #define NV10_3D_LIGHT_DIFFUSE_B(i0) (0x00000814 + 0x80*(i0)) #define NV10_3D_LIGHT_SPECULAR(i0) (0x00000818 + 0x80*(i0)) #define NV10_3D_LIGHT_SPECULAR_R(i0) (0x00000818 + 0x80*(i0)) #define NV10_3D_LIGHT_SPECULAR_G(i0) (0x0000081c + 0x80*(i0)) #define NV10_3D_LIGHT_SPECULAR_B(i0) (0x00000820 + 0x80*(i0)) #define NV10_3D_LIGHT_HALF_VECTOR(i0) (0x00000828 + 0x80*(i0)) #define NV10_3D_LIGHT_HALF_VECTOR_X(i0) (0x00000828 + 0x80*(i0)) #define NV10_3D_LIGHT_HALF_VECTOR_Y(i0) (0x0000082c + 0x80*(i0)) #define NV10_3D_LIGHT_HALF_VECTOR_Z(i0) (0x00000830 + 0x80*(i0)) #define NV10_3D_LIGHT_DIRECTION(i0) (0x00000834 + 0x80*(i0)) #define NV10_3D_LIGHT_DIRECTION_X(i0) (0x00000834 + 0x80*(i0)) #define NV10_3D_LIGHT_DIRECTION_Y(i0) (0x00000838 + 0x80*(i0)) #define NV10_3D_LIGHT_DIRECTION_Z(i0) (0x0000083c + 0x80*(i0)) #define NV10_3D_LIGHT_SPOT_CUTOFF(i0, i1) (0x00000840 + 0x80*(i0) + 0x4*(i1)) #define NV10_3D_LIGHT_SPOT_CUTOFF__ESIZE 0x00000004 #define NV10_3D_LIGHT_SPOT_CUTOFF__LEN 0x00000007 #define NV10_3D_LIGHT_POSITION(i0) (0x0000085c + 0x80*(i0)) #define NV10_3D_LIGHT_POSITION_X(i0) (0x0000085c + 0x80*(i0)) #define NV10_3D_LIGHT_POSITION_Y(i0) (0x00000860 + 0x80*(i0)) #define NV10_3D_LIGHT_POSITION_Z(i0) (0x00000864 + 0x80*(i0)) #define NV10_3D_LIGHT_ATTENUATION(i0) (0x00000868 + 0x80*(i0)) #define NV10_3D_LIGHT_ATTENUATION_CONSTANT(i0) (0x00000868 + 0x80*(i0)) #define NV10_3D_LIGHT_ATTENUATION_LINEAR(i0) (0x0000086c + 0x80*(i0)) #define NV10_3D_LIGHT_ATTENUATION_QUADRATIC(i0) (0x00000870 + 0x80*(i0)) #define NV10_3D_FOG_MODE 0x0000029c #define NV10_3D_FOG_MODE_LINEAR 0x00002601 #define NV10_3D_FOG_MODE_EXP 0x00000800 #define NV10_3D_FOG_MODE_EXP_ABS 0x00000802 #define NV10_3D_FOG_MODE_EXP2 0x00000803 #define NV10_3D_FOG_COORD 0x000002a0 #define NV10_3D_FOG_COORD_FOG 0x00000000 #define NV10_3D_FOG_COORD_DIST_RADIAL 0x00000001 #define NV10_3D_FOG_COORD_DIST_ORTHOGONAL 0x00000002 #define NV10_3D_FOG_COORD_DIST_ORTHOGONAL_ABS 0x00000003 #define NV10_3D_FOG_ENABLE 0x000002a4 #define NV10_3D_FOG_COLOR 0x000002a8 #define NV10_3D_FOG_COLOR_R__MASK 0x000000ff #define NV10_3D_FOG_COLOR_R__SHIFT 0 #define NV10_3D_FOG_COLOR_G__MASK 0x0000ff00 #define NV10_3D_FOG_COLOR_G__SHIFT 8 #define NV10_3D_FOG_COLOR_B__MASK 0x00ff0000 #define NV10_3D_FOG_COLOR_B__SHIFT 16 #define NV10_3D_FOG_COLOR_A__MASK 0xff000000 #define NV10_3D_FOG_COLOR_A__SHIFT 24 #define NV10_3D_FOG_COEFF(i0) (0x00000680 + 0x4*(i0)) #define NV10_3D_FOG_COEFF__ESIZE 0x00000004 #define NV10_3D_FOG_COEFF__LEN 0x00000003 #define NV10_3D_TEX_GEN_MODE(i0, i1) (0x000003c0 + 0x10*(i0) + 0x4*(i1)) #define NV10_3D_TEX_GEN_MODE__ESIZE 0x00000004 #define NV10_3D_TEX_GEN_MODE__LEN 0x00000004 #define NV10_3D_TEX_GEN_MODE_FALSE 0x00000000 #define NV10_3D_TEX_GEN_MODE_EYE_LINEAR 0x00002400 #define NV10_3D_TEX_GEN_MODE_OBJECT_LINEAR 0x00002401 #define NV10_3D_TEX_GEN_MODE_SPHERE_MAP 0x00002402 #define NV10_3D_TEX_GEN_MODE_NORMAL_MAP 0x00008511 #define NV10_3D_TEX_GEN_MODE_REFLECTION_MAP 0x00008512 #define NV10_3D_TEX_GEN_COEFF(i0, i1) (0x00000600 + 0x40*(i0) + 0x10*(i1)) #define NV10_3D_TEX_GEN_COEFF__ESIZE 0x00000010 #define NV10_3D_TEX_GEN_COEFF__LEN 0x00000004 #define NV10_3D_TEX_GEN_COEFF_A(i0, i1) (0x00000600 + 0x40*(i0) + 0x10*(i1)) #define NV10_3D_TEX_GEN_COEFF_B(i0, i1) (0x00000604 + 0x40*(i0) + 0x10*(i1)) #define NV10_3D_TEX_GEN_COEFF_C(i0, i1) (0x00000608 + 0x40*(i0) + 0x10*(i1)) #define NV10_3D_TEX_GEN_COEFF_D(i0, i1) (0x0000060c + 0x40*(i0) + 0x10*(i1)) #define NV10_3D_TEX_MATRIX_ENABLE(i0) (0x000003e0 + 0x4*(i0)) #define NV10_3D_TEX_MATRIX_ENABLE__ESIZE 0x00000004 #define NV10_3D_TEX_MATRIX_ENABLE__LEN 0x00000002 #define NV10_3D_TEX_MATRIX(i0, i1) (0x00000540 + 0x40*(i0) + 0x4*(i1)) #define NV10_3D_TEX_MATRIX__ESIZE 0x00000004 #define NV10_3D_TEX_MATRIX__LEN 0x00000010 #define NV10_3D_TEX(i0) (0x00000000 + 0x4*(i0)) #define NV10_3D_TEX__ESIZE 0x00000004 #define NV10_3D_TEX__LEN 0x00000002 #define NV10_3D_TEX_OFFSET(i0) (0x00000218 + 0x4*(i0)) #define NV10_3D_TEX_FORMAT(i0) (0x00000220 + 0x4*(i0)) #define NV10_3D_TEX_FORMAT_DMA0 0x00000001 #define NV10_3D_TEX_FORMAT_DMA1 0x00000002 #define NV10_3D_TEX_FORMAT_CUBE_MAP 0x00000004 #define NV10_3D_TEX_FORMAT_FORMAT__MASK 0x00000f80 #define NV10_3D_TEX_FORMAT_FORMAT__SHIFT 7 #define NV10_3D_TEX_FORMAT_FORMAT_L8 0x00000000 #define NV10_3D_TEX_FORMAT_FORMAT_I8 0x00000080 #define NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5 0x00000100 #define NV10_3D_TEX_FORMAT_FORMAT_A4R4G4B4 0x00000200 #define NV10_3D_TEX_FORMAT_FORMAT_R5G6B5 0x00000280 #define NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8 0x00000300 #define NV10_3D_TEX_FORMAT_FORMAT_X8R8G8B8 0x00000380 #define NV10_3D_TEX_FORMAT_FORMAT_INDEX8 0x00000580 #define NV10_3D_TEX_FORMAT_FORMAT_DXT1 0x00000600 #define NV10_3D_TEX_FORMAT_FORMAT_DXT3 0x00000700 #define NV10_3D_TEX_FORMAT_FORMAT_DXT5 0x00000780 #define NV10_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00000800 #define NV10_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT 0x00000880 #define NV10_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00000900 #define NV10_3D_TEX_FORMAT_FORMAT_I8_RECT 0x00000980 #define NV10_3D_TEX_FORMAT_MIPMAP 0x00008000 #define NV10_3D_TEX_FORMAT_BASE_SIZE_U__MASK 0x000f0000 #define NV10_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT 16 #define NV10_3D_TEX_FORMAT_BASE_SIZE_V__MASK 0x00f00000 #define NV10_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT 20 #define NV10_3D_TEX_FORMAT_WRAP_S__MASK 0x0f000000 #define NV10_3D_TEX_FORMAT_WRAP_S__SHIFT 24 #define NV10_3D_TEX_FORMAT_WRAP_S_REPEAT 0x01000000 #define NV10_3D_TEX_FORMAT_WRAP_S_MIRRORED_REPEAT 0x02000000 #define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP_TO_EDGE 0x03000000 #define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP_TO_BORDER 0x04000000 #define NV10_3D_TEX_FORMAT_WRAP_S_CLAMP 0x05000000 #define NV10_3D_TEX_FORMAT_WRAP_T__MASK 0xf0000000 #define NV10_3D_TEX_FORMAT_WRAP_T__SHIFT 28 #define NV10_3D_TEX_FORMAT_WRAP_T_REPEAT 0x10000000 #define NV10_3D_TEX_FORMAT_WRAP_T_MIRRORED_REPEAT 0x20000000 #define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP_TO_EDGE 0x30000000 #define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP_TO_BORDER 0x40000000 #define NV10_3D_TEX_FORMAT_WRAP_T_CLAMP 0x50000000 #define NV10_3D_TEX_ENABLE(i0) (0x00000228 + 0x4*(i0)) #define NV10_3D_TEX_ENABLE_CULL__MASK 0x0000000f #define NV10_3D_TEX_ENABLE_CULL__SHIFT 0 #define NV10_3D_TEX_ENABLE_CULL_DISABLED 0x00000000 #define NV10_3D_TEX_ENABLE_CULL_TEST_ALL 0x00000003 #define NV10_3D_TEX_ENABLE_CULL_TEST_ALPHA 0x00000004 #define NV10_3D_TEX_ENABLE_ANISOTROPY__MASK 0x00000030 #define NV10_3D_TEX_ENABLE_ANISOTROPY__SHIFT 4 #define NV10_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK 0x0003c000 #define NV10_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT 14 #define NV10_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK 0x3c000000 #define NV10_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT 26 #define NV10_3D_TEX_ENABLE_ENABLE 0x40000000 #define NV10_3D_TEX_NPOT_PITCH(i0) (0x00000230 + 0x4*(i0)) #define NV10_3D_TEX_NPOT_PITCH_PITCH__MASK 0xffff0000 #define NV10_3D_TEX_NPOT_PITCH_PITCH__SHIFT 16 #define NV10_3D_TEX_NPOT_SIZE(i0) (0x00000240 + 0x4*(i0)) #define NV10_3D_TEX_NPOT_SIZE_H__MASK 0x0000ffff #define NV10_3D_TEX_NPOT_SIZE_H__SHIFT 0 #define NV10_3D_TEX_NPOT_SIZE_W__MASK 0xffff0000 #define NV10_3D_TEX_NPOT_SIZE_W__SHIFT 16 #define NV10_3D_TEX_FILTER(i0) (0x00000248 + 0x4*(i0)) #define NV10_3D_TEX_FILTER_LOD_BIAS__MASK 0x00000f00 #define NV10_3D_TEX_FILTER_LOD_BIAS__SHIFT 8 #define NV10_3D_TEX_FILTER_MINIFY__MASK 0x0f000000 #define NV10_3D_TEX_FILTER_MINIFY__SHIFT 24 #define NV10_3D_TEX_FILTER_MINIFY_NEAREST 0x01000000 #define NV10_3D_TEX_FILTER_MINIFY_LINEAR 0x02000000 #define NV10_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_NEAREST 0x03000000 #define NV10_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_NEAREST 0x04000000 #define NV10_3D_TEX_FILTER_MINIFY_NEAREST_MIPMAP_LINEAR 0x05000000 #define NV10_3D_TEX_FILTER_MINIFY_LINEAR_MIPMAP_LINEAR 0x06000000 #define NV10_3D_TEX_FILTER_MAGNIFY__MASK 0xf0000000 #define NV10_3D_TEX_FILTER_MAGNIFY__SHIFT 28 #define NV10_3D_TEX_FILTER_MAGNIFY_NEAREST 0x10000000 #define NV10_3D_TEX_FILTER_MAGNIFY_LINEAR 0x20000000 #define NV10_3D_TEX_PALETTE_OFFSET(i0) (0x00000250 + 0x4*(i0)) #define NV10_3D_RC_IN_ALPHA(i0) (0x00000260 + 0x4*(i0)) #define NV10_3D_RC_IN_ALPHA_D_INPUT__MASK 0x0000000f #define NV10_3D_RC_IN_ALPHA_D_INPUT__SHIFT 0 #define NV10_3D_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV10_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV10_3D_RC_IN_ALPHA_D_INPUT_FOG 0x00000003 #define NV10_3D_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV10_3D_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008 #define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009 #define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a #define NV10_3D_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b #define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c #define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d #define NV10_3D_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV10_3D_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f #define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__MASK 0x00000010 #define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__SHIFT 4 #define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000 #define NV10_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV10_3D_RC_IN_ALPHA_D_MAPPING__MASK 0x000000e0 #define NV10_3D_RC_IN_ALPHA_D_MAPPING__SHIFT 5 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV10_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV10_3D_RC_IN_ALPHA_C_INPUT__MASK 0x00000f00 #define NV10_3D_RC_IN_ALPHA_C_INPUT__SHIFT 8 #define NV10_3D_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_IN_ALPHA_C_INPUT_FOG 0x00000300 #define NV10_3D_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00 #define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00 #define NV10_3D_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__MASK 0x00001000 #define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__SHIFT 12 #define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000 #define NV10_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING__MASK 0x0000e000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING__SHIFT 13 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV10_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV10_3D_RC_IN_ALPHA_B_INPUT__MASK 0x000f0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT__SHIFT 16 #define NV10_3D_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_FOG 0x00030000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV10_3D_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000 #define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__MASK 0x00100000 #define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__SHIFT 20 #define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000 #define NV10_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING__MASK 0x00e00000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING__SHIFT 21 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV10_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV10_3D_RC_IN_ALPHA_A_INPUT__MASK 0x0f000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT__SHIFT 24 #define NV10_3D_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_FOG 0x03000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV10_3D_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000 #define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__MASK 0x10000000 #define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__SHIFT 28 #define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000 #define NV10_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING__MASK 0xe0000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING__SHIFT 29 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV10_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV10_3D_RC_IN_RGB(i0) (0x00000268 + 0x4*(i0)) #define NV10_3D_RC_IN_RGB_D_INPUT__MASK 0x0000000f #define NV10_3D_RC_IN_RGB_D_INPUT__SHIFT 0 #define NV10_3D_RC_IN_RGB_D_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV10_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV10_3D_RC_IN_RGB_D_INPUT_FOG 0x00000003 #define NV10_3D_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV10_3D_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008 #define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009 #define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a #define NV10_3D_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b #define NV10_3D_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c #define NV10_3D_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d #define NV10_3D_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV10_3D_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f #define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE__MASK 0x00000010 #define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE__SHIFT 4 #define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV10_3D_RC_IN_RGB_D_MAPPING__MASK 0x000000e0 #define NV10_3D_RC_IN_RGB_D_MAPPING__SHIFT 5 #define NV10_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV10_3D_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV10_3D_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV10_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV10_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV10_3D_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV10_3D_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV10_3D_RC_IN_RGB_C_INPUT__MASK 0x00000f00 #define NV10_3D_RC_IN_RGB_C_INPUT__SHIFT 8 #define NV10_3D_RC_IN_RGB_C_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_IN_RGB_C_INPUT_FOG 0x00000300 #define NV10_3D_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00 #define NV10_3D_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00 #define NV10_3D_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE__MASK 0x00001000 #define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE__SHIFT 12 #define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV10_3D_RC_IN_RGB_C_MAPPING__MASK 0x0000e000 #define NV10_3D_RC_IN_RGB_C_MAPPING__SHIFT 13 #define NV10_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV10_3D_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV10_3D_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV10_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV10_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV10_3D_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV10_3D_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV10_3D_RC_IN_RGB_B_INPUT__MASK 0x000f0000 #define NV10_3D_RC_IN_RGB_B_INPUT__SHIFT 16 #define NV10_3D_RC_IN_RGB_B_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV10_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV10_3D_RC_IN_RGB_B_INPUT_FOG 0x00030000 #define NV10_3D_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV10_3D_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000 #define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000 #define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000 #define NV10_3D_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000 #define NV10_3D_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000 #define NV10_3D_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000 #define NV10_3D_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV10_3D_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000 #define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE__MASK 0x00100000 #define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE__SHIFT 20 #define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV10_3D_RC_IN_RGB_B_MAPPING__MASK 0x00e00000 #define NV10_3D_RC_IN_RGB_B_MAPPING__SHIFT 21 #define NV10_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV10_3D_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV10_3D_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV10_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV10_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV10_3D_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV10_3D_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV10_3D_RC_IN_RGB_A_INPUT__MASK 0x0f000000 #define NV10_3D_RC_IN_RGB_A_INPUT__SHIFT 24 #define NV10_3D_RC_IN_RGB_A_INPUT_ZERO 0x00000000 #define NV10_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV10_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV10_3D_RC_IN_RGB_A_INPUT_FOG 0x03000000 #define NV10_3D_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV10_3D_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000 #define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000 #define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000 #define NV10_3D_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000 #define NV10_3D_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000 #define NV10_3D_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000 #define NV10_3D_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV10_3D_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000 #define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE__MASK 0x10000000 #define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE__SHIFT 28 #define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV10_3D_RC_IN_RGB_A_MAPPING__MASK 0xe0000000 #define NV10_3D_RC_IN_RGB_A_MAPPING__SHIFT 29 #define NV10_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV10_3D_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV10_3D_RC_COLOR(i0) (0x00000270 + 0x4*(i0)) #define NV10_3D_RC_COLOR_B__MASK 0x000000ff #define NV10_3D_RC_COLOR_B__SHIFT 0 #define NV10_3D_RC_COLOR_G__MASK 0x0000ff00 #define NV10_3D_RC_COLOR_G__SHIFT 8 #define NV10_3D_RC_COLOR_R__MASK 0x00ff0000 #define NV10_3D_RC_COLOR_R__SHIFT 16 #define NV10_3D_RC_COLOR_A__MASK 0xff000000 #define NV10_3D_RC_COLOR_A__SHIFT 24 #define NV10_3D_RC_OUT_ALPHA(i0) (0x00000278 + 0x4*(i0)) #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT__MASK 0x0000000f #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT__SHIFT 0 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009 #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV10_3D_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT__MASK 0x000000f0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT__SHIFT 4 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0 #define NV10_3D_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT__MASK 0x00000f00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT__SHIFT 8 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_OUT_ALPHA_CD_DOT_PRODUCT 0x00001000 #define NV10_3D_RC_OUT_ALPHA_AB_DOT_PRODUCT 0x00002000 #define NV10_3D_RC_OUT_ALPHA_MUX_SUM 0x00004000 #define NV10_3D_RC_OUT_ALPHA_BIAS__MASK 0x00008000 #define NV10_3D_RC_OUT_ALPHA_BIAS__SHIFT 15 #define NV10_3D_RC_OUT_ALPHA_BIAS_NONE 0x00000000 #define NV10_3D_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000 #define NV10_3D_RC_OUT_ALPHA_SCALE__MASK 0x00030000 #define NV10_3D_RC_OUT_ALPHA_SCALE__SHIFT 16 #define NV10_3D_RC_OUT_ALPHA_SCALE_NONE 0x00000000 #define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000 #define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000 #define NV10_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000 #define NV10_3D_RC_OUT_RGB(i0) (0x00000280 + 0x4*(i0)) #define NV10_3D_RC_OUT_RGB_CD_OUTPUT__MASK 0x0000000f #define NV10_3D_RC_OUT_RGB_CD_OUTPUT__SHIFT 0 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009 #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV10_3D_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f #define NV10_3D_RC_OUT_RGB_AB_OUTPUT__MASK 0x000000f0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT__SHIFT 4 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0 #define NV10_3D_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT__MASK 0x00000f00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT__SHIFT 8 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_OUT_RGB_CD_DOT_PRODUCT 0x00001000 #define NV10_3D_RC_OUT_RGB_AB_DOT_PRODUCT 0x00002000 #define NV10_3D_RC_OUT_RGB_MUX_SUM 0x00004000 #define NV10_3D_RC_OUT_RGB_BIAS__MASK 0x00008000 #define NV10_3D_RC_OUT_RGB_BIAS__SHIFT 15 #define NV10_3D_RC_OUT_RGB_BIAS_NONE 0x00000000 #define NV10_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000 #define NV10_3D_RC_OUT_RGB_SCALE__MASK 0x00030000 #define NV10_3D_RC_OUT_RGB_SCALE__SHIFT 16 #define NV10_3D_RC_OUT_RGB_SCALE_NONE 0x00000000 #define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000 #define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000 #define NV10_3D_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000 #define NV10_3D_RC_OUT_RGB_OPERATION__MASK 0x38000000 #define NV10_3D_RC_OUT_RGB_OPERATION__SHIFT 27 #define NV10_3D_RC_FINAL0 0x00000288 #define NV10_3D_RC_FINAL0_D_INPUT__MASK 0x0000000f #define NV10_3D_RC_FINAL0_D_INPUT__SHIFT 0 #define NV10_3D_RC_FINAL0_D_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV10_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV10_3D_RC_FINAL0_D_INPUT_FOG 0x00000003 #define NV10_3D_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV10_3D_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008 #define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009 #define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a #define NV10_3D_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b #define NV10_3D_RC_FINAL0_D_INPUT_SPARE0 0x0000000c #define NV10_3D_RC_FINAL0_D_INPUT_SPARE1 0x0000000d #define NV10_3D_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV10_3D_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f #define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE__MASK 0x00000010 #define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE__SHIFT 4 #define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV10_3D_RC_FINAL0_D_MAPPING__MASK 0x000000e0 #define NV10_3D_RC_FINAL0_D_MAPPING__SHIFT 5 #define NV10_3D_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV10_3D_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV10_3D_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV10_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV10_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV10_3D_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV10_3D_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV10_3D_RC_FINAL0_C_INPUT__MASK 0x00000f00 #define NV10_3D_RC_FINAL0_C_INPUT__SHIFT 8 #define NV10_3D_RC_FINAL0_C_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_FINAL0_C_INPUT_FOG 0x00000300 #define NV10_3D_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_FINAL0_C_INPUT_SPARE0 0x00000c00 #define NV10_3D_RC_FINAL0_C_INPUT_SPARE1 0x00000d00 #define NV10_3D_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE__MASK 0x00001000 #define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE__SHIFT 12 #define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV10_3D_RC_FINAL0_C_MAPPING__MASK 0x0000e000 #define NV10_3D_RC_FINAL0_C_MAPPING__SHIFT 13 #define NV10_3D_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV10_3D_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV10_3D_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV10_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV10_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV10_3D_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV10_3D_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV10_3D_RC_FINAL0_B_INPUT__MASK 0x000f0000 #define NV10_3D_RC_FINAL0_B_INPUT__SHIFT 16 #define NV10_3D_RC_FINAL0_B_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV10_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV10_3D_RC_FINAL0_B_INPUT_FOG 0x00030000 #define NV10_3D_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV10_3D_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000 #define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000 #define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000 #define NV10_3D_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000 #define NV10_3D_RC_FINAL0_B_INPUT_SPARE0 0x000c0000 #define NV10_3D_RC_FINAL0_B_INPUT_SPARE1 0x000d0000 #define NV10_3D_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV10_3D_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000 #define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE__MASK 0x00100000 #define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE__SHIFT 20 #define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV10_3D_RC_FINAL0_B_MAPPING__MASK 0x00e00000 #define NV10_3D_RC_FINAL0_B_MAPPING__SHIFT 21 #define NV10_3D_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV10_3D_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV10_3D_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV10_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV10_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV10_3D_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV10_3D_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV10_3D_RC_FINAL0_A_INPUT__MASK 0x0f000000 #define NV10_3D_RC_FINAL0_A_INPUT__SHIFT 24 #define NV10_3D_RC_FINAL0_A_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV10_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV10_3D_RC_FINAL0_A_INPUT_FOG 0x03000000 #define NV10_3D_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV10_3D_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000 #define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000 #define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000 #define NV10_3D_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000 #define NV10_3D_RC_FINAL0_A_INPUT_SPARE0 0x0c000000 #define NV10_3D_RC_FINAL0_A_INPUT_SPARE1 0x0d000000 #define NV10_3D_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV10_3D_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000 #define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE__MASK 0x10000000 #define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE__SHIFT 28 #define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV10_3D_RC_FINAL0_A_MAPPING__MASK 0xe0000000 #define NV10_3D_RC_FINAL0_A_MAPPING__SHIFT 29 #define NV10_3D_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV10_3D_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV10_3D_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV10_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV10_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV10_3D_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV10_3D_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV10_3D_RC_FINAL1 0x0000028c #define NV10_3D_RC_FINAL1_COLOR_SUM_CLAMP 0x00000080 #define NV10_3D_RC_FINAL1_G_INPUT__MASK 0x00000f00 #define NV10_3D_RC_FINAL1_G_INPUT__SHIFT 8 #define NV10_3D_RC_FINAL1_G_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100 #define NV10_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200 #define NV10_3D_RC_FINAL1_G_INPUT_FOG 0x00000300 #define NV10_3D_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400 #define NV10_3D_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500 #define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800 #define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900 #define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00 #define NV10_3D_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00 #define NV10_3D_RC_FINAL1_G_INPUT_SPARE0 0x00000c00 #define NV10_3D_RC_FINAL1_G_INPUT_SPARE1 0x00000d00 #define NV10_3D_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV10_3D_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00 #define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE__MASK 0x00001000 #define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE__SHIFT 12 #define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000 #define NV10_3D_RC_FINAL1_G_MAPPING__MASK 0x0000e000 #define NV10_3D_RC_FINAL1_G_MAPPING__SHIFT 13 #define NV10_3D_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV10_3D_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000 #define NV10_3D_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000 #define NV10_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV10_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV10_3D_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV10_3D_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV10_3D_RC_FINAL1_F_INPUT__MASK 0x000f0000 #define NV10_3D_RC_FINAL1_F_INPUT__SHIFT 16 #define NV10_3D_RC_FINAL1_F_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000 #define NV10_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000 #define NV10_3D_RC_FINAL1_F_INPUT_FOG 0x00030000 #define NV10_3D_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000 #define NV10_3D_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000 #define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000 #define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000 #define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000 #define NV10_3D_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000 #define NV10_3D_RC_FINAL1_F_INPUT_SPARE0 0x000c0000 #define NV10_3D_RC_FINAL1_F_INPUT_SPARE1 0x000d0000 #define NV10_3D_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV10_3D_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000 #define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE__MASK 0x00100000 #define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE__SHIFT 20 #define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000 #define NV10_3D_RC_FINAL1_F_MAPPING__MASK 0x00e00000 #define NV10_3D_RC_FINAL1_F_MAPPING__SHIFT 21 #define NV10_3D_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV10_3D_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000 #define NV10_3D_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000 #define NV10_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV10_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV10_3D_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV10_3D_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV10_3D_RC_FINAL1_E_INPUT__MASK 0x0f000000 #define NV10_3D_RC_FINAL1_E_INPUT__SHIFT 24 #define NV10_3D_RC_FINAL1_E_INPUT_ZERO 0x00000000 #define NV10_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000 #define NV10_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000 #define NV10_3D_RC_FINAL1_E_INPUT_FOG 0x03000000 #define NV10_3D_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000 #define NV10_3D_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000 #define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000 #define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000 #define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000 #define NV10_3D_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000 #define NV10_3D_RC_FINAL1_E_INPUT_SPARE0 0x0c000000 #define NV10_3D_RC_FINAL1_E_INPUT_SPARE1 0x0d000000 #define NV10_3D_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV10_3D_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000 #define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE__MASK 0x10000000 #define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE__SHIFT 28 #define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000 #define NV10_3D_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000 #define NV10_3D_RC_FINAL1_E_MAPPING__MASK 0xe0000000 #define NV10_3D_RC_FINAL1_E_MAPPING__SHIFT 29 #define NV10_3D_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV10_3D_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV10_3D_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000 #define NV10_3D_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000 #define NV10_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV10_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV10_3D_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV10_3D_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV17_3D_DMA_HIERZ 0x000001b0 #define NV17_3D_HIERZ_PITCH 0x00000d5c #define NV17_3D_HIERZ_OFFSET 0x00000d60 #define NV17_3D_HIERZ_FILL_VALUE 0x00000d68 #define NV17_3D_HIERZ_BUFFER_CLEAR 0x00000d6c #define NV17_3D_UNK0D74 0x00000d74 #define NV17_3D_UNK0D84 0x00000d84 #define NV17_3D_HIERZ_WINDOW 0x00001638 #define NV17_3D_HIERZ_WINDOW_X 0x00001638 #define NV17_3D_HIERZ_WINDOW_Y 0x0000163c #define NV17_3D_HIERZ_WINDOW_Z 0x00001640 #define NV17_3D_HIERZ_WINDOW_W 0x00001644 #define NV17_3D_HIERZ_ENABLE 0x00001658 #define NV17_3D_UNK01AC 0x000001ac #define NV17_3D_UNK0258 0x00000258 #define NV17_3D_UNK025C 0x0000025c #define NV10_3D_UNK0290 0x00000290 #define NV17_3D_COLOR_MASK_ENABLE 0x000002bc #define NV10_3D_UNK03F0 0x000003f0 #define NV10_3D_UNK03F4 0x000003f4 #define NV17_3D_ZCLEAR_ENABLE 0x000003f8 #define NV17_3D_ZCLEAR_VALUE 0x000003fc #define NV17_3D_ZCLEAR_VALUE_DEPTH__MASK 0xffffff00 #define NV17_3D_ZCLEAR_VALUE_DEPTH__SHIFT 8 #define NV17_3D_ZCLEAR_VALUE_SEQUENCE__MASK 0x000000ff #define NV17_3D_ZCLEAR_VALUE_SEQUENCE__SHIFT 0 #define NV10_3D_POINT_SIZE 0x000003ec #define NV10_3D_POINT_PARAMETER(i0) (0x000006f8 + 0x4*(i0)) #define NV10_3D_POINT_PARAMETER__ESIZE 0x00000004 #define NV10_3D_POINT_PARAMETER__LEN 0x00000008 #define NV15_3D_COLOR_LOGIC_OP 0x00000d40 #define NV15_3D_COLOR_LOGIC_OP_ENABLE 0x00000d40 #define NV15_3D_COLOR_LOGIC_OP_OP 0x00000d44 #define NV15_3D_COLOR_LOGIC_OP_OP_CLEAR 0x00001500 #define NV15_3D_COLOR_LOGIC_OP_OP_AND 0x00001501 #define NV15_3D_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502 #define NV15_3D_COLOR_LOGIC_OP_OP_COPY 0x00001503 #define NV15_3D_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504 #define NV15_3D_COLOR_LOGIC_OP_OP_NOOP 0x00001505 #define NV15_3D_COLOR_LOGIC_OP_OP_XOR 0x00001506 #define NV15_3D_COLOR_LOGIC_OP_OP_OR 0x00001507 #define NV15_3D_COLOR_LOGIC_OP_OP_NOR 0x00001508 #define NV15_3D_COLOR_LOGIC_OP_OP_EQUIV 0x00001509 #define NV15_3D_COLOR_LOGIC_OP_OP_INVERT 0x0000150a #define NV15_3D_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b #define NV15_3D_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c #define NV15_3D_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d #define NV15_3D_COLOR_LOGIC_OP_OP_NAND 0x0000150e #define NV15_3D_COLOR_LOGIC_OP_OP_SET 0x0000150f #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV10_3D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv30-40_3d.xml.h0000644000175000017500000030107314713424663015273 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV30_3D_FLIP_SET_READ 0x00000120 #define NV30_3D_FLIP_SET_WRITE 0x00000124 #define NV30_3D_FLIP_MAX 0x00000128 #define NV30_3D_FLIP_INCR_WRITE 0x0000012c #define NV30_3D_FLIP_WAIT 0x00000130 #define NV30_3D_DMA_NOTIFY 0x00000180 #define NV30_3D_DMA_TEXTURE0 0x00000184 #define NV30_3D_DMA_TEXTURE1 0x00000188 #define NV30_3D_DMA_COLOR1 0x0000018c #define NV30_3D_DMA_UNK190 0x00000190 #define NV30_3D_DMA_COLOR0 0x00000194 #define NV30_3D_DMA_ZETA 0x00000198 #define NV30_3D_DMA_VTXBUF0 0x0000019c #define NV30_3D_DMA_VTXBUF1 0x000001a0 #define NV30_3D_DMA_FENCE 0x000001a4 #define NV30_3D_DMA_QUERY 0x000001a8 #define NV30_3D_DMA_UNK1AC 0x000001ac #define NV30_3D_DMA_UNK1B0 0x000001b0 #define NV40_3D_DMA_COLOR2 0x000001b4 #define NV40_3D_DMA_COLOR3 0x000001b8 #define NV30_3D_RT_HORIZ 0x00000200 #define NV30_3D_RT_HORIZ_X__MASK 0x0000ffff #define NV30_3D_RT_HORIZ_X__SHIFT 0 #define NV30_3D_RT_HORIZ_W__MASK 0xffff0000 #define NV30_3D_RT_HORIZ_W__SHIFT 16 #define NV30_3D_RT_VERT 0x00000204 #define NV30_3D_RT_VERT_Y__MASK 0x0000ffff #define NV30_3D_RT_VERT_Y__SHIFT 0 #define NV30_3D_RT_VERT_H__MASK 0xffff0000 #define NV30_3D_RT_VERT_H__SHIFT 16 #define NV30_3D_RT_FORMAT 0x00000208 #define NV30_3D_RT_FORMAT_COLOR__MASK 0x0000001f #define NV30_3D_RT_FORMAT_COLOR__SHIFT 0 #define NV30_3D_RT_FORMAT_COLOR_R5G6B5 0x00000003 #define NV30_3D_RT_FORMAT_COLOR_X8R8G8B8 0x00000005 #define NV30_3D_RT_FORMAT_COLOR_A8R8G8B8 0x00000008 #define NV30_3D_RT_FORMAT_COLOR_B8 0x00000009 #define NV30_3D_RT_FORMAT_COLOR_A16B16G16R16_FLOAT 0x0000000b #define NV30_3D_RT_FORMAT_COLOR_A32B32G32R32_FLOAT 0x0000000c #define NV30_3D_RT_FORMAT_COLOR_R32_FLOAT 0x0000000d #define NV30_3D_RT_FORMAT_COLOR_UNK0D 0x0000000d #define NV30_3D_RT_FORMAT_COLOR_X8B8G8R8 0x0000000f #define NV30_3D_RT_FORMAT_COLOR_A8B8G8R8 0x00000010 #define NV30_3D_RT_FORMAT_ZETA__MASK 0x000000e0 #define NV30_3D_RT_FORMAT_ZETA__SHIFT 5 #define NV30_3D_RT_FORMAT_ZETA_Z16 0x00000020 #define NV30_3D_RT_FORMAT_ZETA_Z24S8 0x00000040 #define NV30_3D_RT_FORMAT_TYPE__MASK 0x00000f00 #define NV30_3D_RT_FORMAT_TYPE__SHIFT 8 #define NV30_3D_RT_FORMAT_TYPE_LINEAR 0x00000100 #define NV30_3D_RT_FORMAT_TYPE_SWIZZLED 0x00000200 #define NV30_3D_RT_FORMAT_LOG2_WIDTH__MASK 0x00ff0000 #define NV30_3D_RT_FORMAT_LOG2_WIDTH__SHIFT 16 #define NV30_3D_RT_FORMAT_LOG2_HEIGHT__MASK 0xff000000 #define NV30_3D_RT_FORMAT_LOG2_HEIGHT__SHIFT 24 #define NV30_3D_COLOR0_PITCH 0x0000020c #define NV30_3D_COLOR0_PITCH_COLOR0__MASK 0x0000ffff #define NV30_3D_COLOR0_PITCH_COLOR0__SHIFT 0 #define NV30_3D_COLOR0_PITCH_ZETA__MASK 0xffff0000 #define NV30_3D_COLOR0_PITCH_ZETA__SHIFT 16 #define NV40_3D_COLOR0_PITCH 0x0000020c #define NV30_3D_COLOR0_OFFSET 0x00000210 #define NV30_3D_ZETA_OFFSET 0x00000214 #define NV30_3D_COLOR1_OFFSET 0x00000218 #define NV30_3D_COLOR1_PITCH 0x0000021c #define NV30_3D_RT_ENABLE 0x00000220 #define NV30_3D_RT_ENABLE_COLOR0 0x00000001 #define NV30_3D_RT_ENABLE_COLOR1 0x00000002 #define NV40_3D_RT_ENABLE_COLOR2 0x00000004 #define NV40_3D_RT_ENABLE_COLOR3 0x00000008 #define NV30_3D_RT_ENABLE_MRT 0x00000010 #define NV40_3D_ZETA_PITCH 0x0000022c #define NV30_3D_HIERZ_PITCH 0x0000022c #define NV30_3D_HIERZ_OFFSET 0x00000230 #define NV30_3D_TEX_UNITS_ENABLE 0x0000023c #define NV30_3D_TEX_UNITS_ENABLE_TX0 0x00000001 #define NV30_3D_TEX_UNITS_ENABLE_TX1 0x00000002 #define NV30_3D_TEX_UNITS_ENABLE_TX2 0x00000004 #define NV30_3D_TEX_UNITS_ENABLE_TX3 0x00000008 #define NV30_3D_TEX_UNITS_ENABLE_TX4 0x00000010 #define NV30_3D_TEX_UNITS_ENABLE_TX5 0x00000020 #define NV30_3D_TEX_UNITS_ENABLE_TX6 0x00000040 #define NV30_3D_TEX_UNITS_ENABLE_TX7 0x00000080 #define NV30_3D_TEX_MATRIX_ENABLE(i0) (0x00000240 + 0x4*(i0)) #define NV30_3D_TEX_MATRIX_ENABLE__ESIZE 0x00000004 #define NV30_3D_TEX_MATRIX_ENABLE__LEN 0x00000008 #define NV40_3D_COLOR2_PITCH 0x00000280 #define NV40_3D_COLOR3_PITCH 0x00000284 #define NV40_3D_COLOR2_OFFSET 0x00000288 #define NV40_3D_COLOR3_OFFSET 0x0000028c #define NV30_3D_VIEWPORT_TX_ORIGIN 0x000002b8 #define NV30_3D_VIEWPORT_TX_ORIGIN_X__MASK 0x0000ffff #define NV30_3D_VIEWPORT_TX_ORIGIN_X__SHIFT 0 #define NV30_3D_VIEWPORT_TX_ORIGIN_Y__MASK 0xffff0000 #define NV30_3D_VIEWPORT_TX_ORIGIN_Y__SHIFT 16 #define NV30_3D_VIEWPORT_CLIP_MODE 0x000002bc #define NV30_3D_VIEWPORT_CLIP_HORIZ(i0) (0x000002c0 + 0x8*(i0)) #define NV30_3D_VIEWPORT_CLIP_HORIZ__ESIZE 0x00000008 #define NV30_3D_VIEWPORT_CLIP_HORIZ__LEN 0x00000008 #define NV30_3D_VIEWPORT_CLIP_HORIZ_L__MASK 0x0000ffff #define NV30_3D_VIEWPORT_CLIP_HORIZ_L__SHIFT 0 #define NV30_3D_VIEWPORT_CLIP_HORIZ_R__MASK 0xffff0000 #define NV30_3D_VIEWPORT_CLIP_HORIZ_R__SHIFT 16 #define NV30_3D_VIEWPORT_CLIP_VERT(i0) (0x000002c4 + 0x8*(i0)) #define NV30_3D_VIEWPORT_CLIP_VERT__ESIZE 0x00000008 #define NV30_3D_VIEWPORT_CLIP_VERT__LEN 0x00000008 #define NV30_3D_VIEWPORT_CLIP_VERT_T__MASK 0x0000ffff #define NV30_3D_VIEWPORT_CLIP_VERT_T__SHIFT 0 #define NV30_3D_VIEWPORT_CLIP_VERT_D__MASK 0xffff0000 #define NV30_3D_VIEWPORT_CLIP_VERT_D__SHIFT 16 #define NV30_3D_DITHER_ENABLE 0x00000300 #define NV30_3D_ALPHA_FUNC_ENABLE 0x00000304 #define NV30_3D_ALPHA_FUNC_FUNC 0x00000308 #define NV30_3D_ALPHA_FUNC_FUNC_NEVER 0x00000200 #define NV30_3D_ALPHA_FUNC_FUNC_LESS 0x00000201 #define NV30_3D_ALPHA_FUNC_FUNC_EQUAL 0x00000202 #define NV30_3D_ALPHA_FUNC_FUNC_LEQUAL 0x00000203 #define NV30_3D_ALPHA_FUNC_FUNC_GREATER 0x00000204 #define NV30_3D_ALPHA_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV30_3D_ALPHA_FUNC_FUNC_GEQUAL 0x00000206 #define NV30_3D_ALPHA_FUNC_FUNC_ALWAYS 0x00000207 #define NV30_3D_ALPHA_FUNC_REF 0x0000030c #define NV30_3D_BLEND_FUNC_ENABLE 0x00000310 #define NV30_3D_BLEND_FUNC_SRC 0x00000314 #define NV30_3D_BLEND_FUNC_SRC_RGB__MASK 0x0000ffff #define NV30_3D_BLEND_FUNC_SRC_RGB__SHIFT 0 #define NV30_3D_BLEND_FUNC_SRC_RGB_ZERO 0x00000000 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE 0x00000001 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_COLOR 0x00000300 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_COLOR 0x00000301 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_ALPHA 0x00000302 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_SRC_ALPHA 0x00000303 #define NV30_3D_BLEND_FUNC_SRC_RGB_DST_ALPHA 0x00000304 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_ALPHA 0x00000305 #define NV30_3D_BLEND_FUNC_SRC_RGB_DST_COLOR 0x00000306 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_DST_COLOR 0x00000307 #define NV30_3D_BLEND_FUNC_SRC_RGB_SRC_ALPHA_SATURATE 0x00000308 #define NV30_3D_BLEND_FUNC_SRC_RGB_CONSTANT_COLOR 0x00008001 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_COLOR 0x00008002 #define NV30_3D_BLEND_FUNC_SRC_RGB_CONSTANT_ALPHA 0x00008003 #define NV30_3D_BLEND_FUNC_SRC_RGB_ONE_MINUS_CONSTANT_ALPHA 0x00008004 #define NV30_3D_BLEND_FUNC_SRC_ALPHA__MASK 0xffff0000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA__SHIFT 16 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ZERO 0x00000000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE 0x00010000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_COLOR 0x03000000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_COLOR 0x03010000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA 0x03020000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_SRC_ALPHA 0x03030000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_DST_ALPHA 0x03040000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_ALPHA 0x03050000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_DST_COLOR 0x03060000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_DST_COLOR 0x03070000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_SRC_ALPHA_SATURATE 0x03080000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_CONSTANT_COLOR 0x80010000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_COLOR 0x80020000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_CONSTANT_ALPHA 0x80030000 #define NV30_3D_BLEND_FUNC_SRC_ALPHA_ONE_MINUS_CONSTANT_ALPHA 0x80040000 #define NV30_3D_BLEND_FUNC_DST 0x00000318 #define NV30_3D_BLEND_FUNC_DST_RGB__MASK 0x0000ffff #define NV30_3D_BLEND_FUNC_DST_RGB__SHIFT 0 #define NV30_3D_BLEND_FUNC_DST_RGB_ZERO 0x00000000 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE 0x00000001 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_COLOR 0x00000300 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_COLOR 0x00000301 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_ALPHA 0x00000302 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_SRC_ALPHA 0x00000303 #define NV30_3D_BLEND_FUNC_DST_RGB_DST_ALPHA 0x00000304 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_ALPHA 0x00000305 #define NV30_3D_BLEND_FUNC_DST_RGB_DST_COLOR 0x00000306 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_DST_COLOR 0x00000307 #define NV30_3D_BLEND_FUNC_DST_RGB_SRC_ALPHA_SATURATE 0x00000308 #define NV30_3D_BLEND_FUNC_DST_RGB_CONSTANT_COLOR 0x00008001 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_COLOR 0x00008002 #define NV30_3D_BLEND_FUNC_DST_RGB_CONSTANT_ALPHA 0x00008003 #define NV30_3D_BLEND_FUNC_DST_RGB_ONE_MINUS_CONSTANT_ALPHA 0x00008004 #define NV30_3D_BLEND_FUNC_DST_ALPHA__MASK 0xffff0000 #define NV30_3D_BLEND_FUNC_DST_ALPHA__SHIFT 16 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ZERO 0x00000000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE 0x00010000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_COLOR 0x03000000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_COLOR 0x03010000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_ALPHA 0x03020000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_SRC_ALPHA 0x03030000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_DST_ALPHA 0x03040000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_ALPHA 0x03050000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_DST_COLOR 0x03060000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_DST_COLOR 0x03070000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_SRC_ALPHA_SATURATE 0x03080000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_CONSTANT_COLOR 0x80010000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_COLOR 0x80020000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_CONSTANT_ALPHA 0x80030000 #define NV30_3D_BLEND_FUNC_DST_ALPHA_ONE_MINUS_CONSTANT_ALPHA 0x80040000 #define NV30_3D_BLEND_COLOR 0x0000031c #define NV30_3D_BLEND_COLOR_B__MASK 0x000000ff #define NV30_3D_BLEND_COLOR_B__SHIFT 0 #define NV30_3D_BLEND_COLOR_G__MASK 0x0000ff00 #define NV30_3D_BLEND_COLOR_G__SHIFT 8 #define NV30_3D_BLEND_COLOR_R__MASK 0x00ff0000 #define NV30_3D_BLEND_COLOR_R__SHIFT 16 #define NV30_3D_BLEND_COLOR_A__MASK 0xff000000 #define NV30_3D_BLEND_COLOR_A__SHIFT 24 #define NV30_3D_BLEND_EQUATION 0x00000320 #define NV30_3D_BLEND_EQUATION_FUNC_ADD 0x00008006 #define NV30_3D_BLEND_EQUATION_MIN 0x00008007 #define NV30_3D_BLEND_EQUATION_MAX 0x00008008 #define NV30_3D_BLEND_EQUATION_FUNC_SUBTRACT 0x0000800a #define NV30_3D_BLEND_EQUATION_FUNC_REVERSE_SUBTRACT 0x0000800b #define NV40_3D_BLEND_EQUATION 0x00000320 #define NV40_3D_BLEND_EQUATION_RGB__MASK 0x0000ffff #define NV40_3D_BLEND_EQUATION_RGB__SHIFT 0 #define NV40_3D_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006 #define NV40_3D_BLEND_EQUATION_RGB_MIN 0x00008007 #define NV40_3D_BLEND_EQUATION_RGB_MAX 0x00008008 #define NV40_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a #define NV40_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b #define NV40_3D_BLEND_EQUATION_ALPHA__MASK 0xffff0000 #define NV40_3D_BLEND_EQUATION_ALPHA__SHIFT 16 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_ADD 0x80060000 #define NV40_3D_BLEND_EQUATION_ALPHA_MIN 0x80070000 #define NV40_3D_BLEND_EQUATION_ALPHA_MAX 0x80080000 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x800a0000 #define NV40_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x800b0000 #define NV30_3D_COLOR_MASK 0x00000324 #define NV30_3D_COLOR_MASK_B 0x000000ff #define NV30_3D_COLOR_MASK_G 0x0000ff00 #define NV30_3D_COLOR_MASK_R 0x00ff0000 #define NV30_3D_COLOR_MASK_A 0xff000000 #define NV30_3D_STENCIL(i0) (0x00000328 + 0x20*(i0)) #define NV30_3D_STENCIL__ESIZE 0x00000020 #define NV30_3D_STENCIL__LEN 0x00000002 #define NV30_3D_STENCIL_ENABLE(i0) (0x00000328 + 0x20*(i0)) #define NV30_3D_STENCIL_MASK(i0) (0x0000032c + 0x20*(i0)) #define NV30_3D_STENCIL_FUNC_FUNC(i0) (0x00000330 + 0x20*(i0)) #define NV30_3D_STENCIL_FUNC_FUNC_NEVER 0x00000200 #define NV30_3D_STENCIL_FUNC_FUNC_LESS 0x00000201 #define NV30_3D_STENCIL_FUNC_FUNC_EQUAL 0x00000202 #define NV30_3D_STENCIL_FUNC_FUNC_LEQUAL 0x00000203 #define NV30_3D_STENCIL_FUNC_FUNC_GREATER 0x00000204 #define NV30_3D_STENCIL_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV30_3D_STENCIL_FUNC_FUNC_GEQUAL 0x00000206 #define NV30_3D_STENCIL_FUNC_FUNC_ALWAYS 0x00000207 #define NV30_3D_STENCIL_FUNC_REF(i0) (0x00000334 + 0x20*(i0)) #define NV30_3D_STENCIL_FUNC_MASK(i0) (0x00000338 + 0x20*(i0)) #define NV30_3D_STENCIL_OP_FAIL(i0) (0x0000033c + 0x20*(i0)) #define NV30_3D_STENCIL_OP_FAIL_ZERO 0x00000000 #define NV30_3D_STENCIL_OP_FAIL_INVERT 0x0000150a #define NV30_3D_STENCIL_OP_FAIL_KEEP 0x00001e00 #define NV30_3D_STENCIL_OP_FAIL_REPLACE 0x00001e01 #define NV30_3D_STENCIL_OP_FAIL_INCR 0x00001e02 #define NV30_3D_STENCIL_OP_FAIL_DECR 0x00001e03 #define NV30_3D_STENCIL_OP_FAIL_INCR_WRAP 0x00008507 #define NV30_3D_STENCIL_OP_FAIL_DECR_WRAP 0x00008508 #define NV30_3D_STENCIL_OP_ZFAIL(i0) (0x00000340 + 0x20*(i0)) #define NV30_3D_STENCIL_OP_ZFAIL_ZERO 0x00000000 #define NV30_3D_STENCIL_OP_ZFAIL_INVERT 0x0000150a #define NV30_3D_STENCIL_OP_ZFAIL_KEEP 0x00001e00 #define NV30_3D_STENCIL_OP_ZFAIL_REPLACE 0x00001e01 #define NV30_3D_STENCIL_OP_ZFAIL_INCR 0x00001e02 #define NV30_3D_STENCIL_OP_ZFAIL_DECR 0x00001e03 #define NV30_3D_STENCIL_OP_ZFAIL_INCR_WRAP 0x00008507 #define NV30_3D_STENCIL_OP_ZFAIL_DECR_WRAP 0x00008508 #define NV30_3D_STENCIL_OP_ZPASS(i0) (0x00000344 + 0x20*(i0)) #define NV30_3D_STENCIL_OP_ZPASS_ZERO 0x00000000 #define NV30_3D_STENCIL_OP_ZPASS_INVERT 0x0000150a #define NV30_3D_STENCIL_OP_ZPASS_KEEP 0x00001e00 #define NV30_3D_STENCIL_OP_ZPASS_REPLACE 0x00001e01 #define NV30_3D_STENCIL_OP_ZPASS_INCR 0x00001e02 #define NV30_3D_STENCIL_OP_ZPASS_DECR 0x00001e03 #define NV30_3D_STENCIL_OP_ZPASS_INCR_WRAP 0x00008507 #define NV30_3D_STENCIL_OP_ZPASS_DECR_WRAP 0x00008508 #define NV30_3D_SHADE_MODEL 0x00000368 #define NV30_3D_SHADE_MODEL_FLAT 0x00001d00 #define NV30_3D_SHADE_MODEL_SMOOTH 0x00001d01 #define NV30_3D_FOG_ENABLE 0x0000036c #define NV30_3D_FOG_COLOR 0x00000370 #define NV30_3D_FOG_COLOR_R__MASK 0x000000ff #define NV30_3D_FOG_COLOR_R__SHIFT 0 #define NV30_3D_FOG_COLOR_G__MASK 0x0000ff00 #define NV30_3D_FOG_COLOR_G__SHIFT 8 #define NV30_3D_FOG_COLOR_B__MASK 0x00ff0000 #define NV30_3D_FOG_COLOR_B__SHIFT 16 #define NV30_3D_FOG_COLOR_A__MASK 0xff000000 #define NV30_3D_FOG_COLOR_A__SHIFT 24 #define NV40_3D_MRT_COLOR_MASK 0x00000370 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_A 0x00000010 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_R 0x00000020 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_G 0x00000040 #define NV40_3D_MRT_COLOR_MASK_BUFFER1_B 0x00000080 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_A 0x00000100 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_R 0x00000200 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_G 0x00000400 #define NV40_3D_MRT_COLOR_MASK_BUFFER2_B 0x00000800 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_A 0x00001000 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_R 0x00002000 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_G 0x00004000 #define NV40_3D_MRT_COLOR_MASK_BUFFER3_B 0x00008000 #define NV30_3D_COLOR_LOGIC_OP_ENABLE 0x00000374 #define NV30_3D_COLOR_LOGIC_OP_OP 0x00000378 #define NV30_3D_COLOR_LOGIC_OP_OP_CLEAR 0x00001500 #define NV30_3D_COLOR_LOGIC_OP_OP_AND 0x00001501 #define NV30_3D_COLOR_LOGIC_OP_OP_AND_REVERSE 0x00001502 #define NV30_3D_COLOR_LOGIC_OP_OP_COPY 0x00001503 #define NV30_3D_COLOR_LOGIC_OP_OP_AND_INVERTED 0x00001504 #define NV30_3D_COLOR_LOGIC_OP_OP_NOOP 0x00001505 #define NV30_3D_COLOR_LOGIC_OP_OP_XOR 0x00001506 #define NV30_3D_COLOR_LOGIC_OP_OP_OR 0x00001507 #define NV30_3D_COLOR_LOGIC_OP_OP_NOR 0x00001508 #define NV30_3D_COLOR_LOGIC_OP_OP_EQUIV 0x00001509 #define NV30_3D_COLOR_LOGIC_OP_OP_INVERT 0x0000150a #define NV30_3D_COLOR_LOGIC_OP_OP_OR_REVERSE 0x0000150b #define NV30_3D_COLOR_LOGIC_OP_OP_COPY_INVERTED 0x0000150c #define NV30_3D_COLOR_LOGIC_OP_OP_OR_INVERTED 0x0000150d #define NV30_3D_COLOR_LOGIC_OP_OP_NAND 0x0000150e #define NV30_3D_COLOR_LOGIC_OP_OP_SET 0x0000150f #define NV30_3D_NORMALIZE_ENABLE 0x0000037c #define NV30_3D_COLOR_MATERIAL 0x00000390 #define NV30_3D_COLOR_MATERIAL_FRONT_EMISSION_ENABLE 0x00000001 #define NV30_3D_COLOR_MATERIAL_FRONT_AMBIENT_ENABLE 0x00000004 #define NV30_3D_COLOR_MATERIAL_FRONT_DIFFUSE_ENABLE 0x00000010 #define NV30_3D_COLOR_MATERIAL_FRONT_SPECULAR_ENABLE 0x00000040 #define NV30_3D_COLOR_MATERIAL_BACK_EMISSION_ENABLE 0x00000100 #define NV30_3D_COLOR_MATERIAL_BACK_AMBIENT_ENABLE 0x00000400 #define NV30_3D_COLOR_MATERIAL_BACK_DIFFUSE_ENABLE 0x00001000 #define NV30_3D_COLOR_MATERIAL_BACK_SPECULAR_ENABLE 0x00004000 #define NV30_3D_DEPTH_RANGE_NEAR 0x00000394 #define NV30_3D_DEPTH_RANGE_FAR 0x00000398 #define NV30_3D_COLOR_MATERIAL_FRONT 0x000003a0 #define NV30_3D_COLOR_MATERIAL_FRONT_R 0x000003a0 #define NV30_3D_COLOR_MATERIAL_FRONT_G 0x000003a4 #define NV30_3D_COLOR_MATERIAL_FRONT_B 0x000003a8 #define NV30_3D_COLOR_MATERIAL_FRONT_A 0x000003ac #define NV40_3D_MIPMAP_ROUNDING 0x000003b0 #define NV40_3D_MIPMAP_ROUNDING_MODE__MASK 0x00100000 #define NV40_3D_MIPMAP_ROUNDING_MODE__SHIFT 20 #define NV40_3D_MIPMAP_ROUNDING_MODE_UP 0x00000000 #define NV40_3D_MIPMAP_ROUNDING_MODE_DOWN 0x00100000 #define NV30_3D_LINE_WIDTH 0x000003b8 #define NV30_3D_LINE_SMOOTH_ENABLE 0x000003bc #define NV30_3D_TEX_GEN_MODE(i0, i1) (0x00000400 + 0x10*(i0) + 0x4*(i1)) #define NV30_3D_TEX_GEN_MODE__ESIZE 0x00000004 #define NV30_3D_TEX_GEN_MODE__LEN 0x00000004 #define NV30_3D_TEX_GEN_MODE_FALSE 0x00000000 #define NV30_3D_TEX_GEN_MODE_EYE_LINEAR 0x00002400 #define NV30_3D_TEX_GEN_MODE_OBJECT_LINEAR 0x00002401 #define NV30_3D_TEX_GEN_MODE_SPHERE_MAP 0x00002402 #define NV30_3D_TEX_GEN_MODE_NORMAL_MAP 0x00008511 #define NV30_3D_TEX_GEN_MODE_REFLECTION_MAP 0x00008512 #define NV30_3D_MODELVIEW_MATRIX(i0) (0x00000480 + 0x4*(i0)) #define NV30_3D_MODELVIEW_MATRIX__ESIZE 0x00000004 #define NV30_3D_MODELVIEW_MATRIX__LEN 0x00000010 #define NV30_3D_INVERSE_MODELVIEW_MATRIX(i0) (0x00000580 + 0x4*(i0)) #define NV30_3D_INVERSE_MODELVIEW_MATRIX__ESIZE 0x00000004 #define NV30_3D_INVERSE_MODELVIEW_MATRIX__LEN 0x0000000c #define NV30_3D_PROJECTION_MATRIX(i0) (0x00000680 + 0x4*(i0)) #define NV30_3D_PROJECTION_MATRIX__ESIZE 0x00000004 #define NV30_3D_PROJECTION_MATRIX__LEN 0x00000010 #define NV30_3D_TEX_MATRIX(i0, i1) (0x000006c0 + 0x40*(i0) + 0x4*(i1)) #define NV30_3D_TEX_MATRIX__ESIZE 0x00000004 #define NV30_3D_TEX_MATRIX__LEN 0x00000010 #define NV30_3D_SCISSOR_HORIZ 0x000008c0 #define NV30_3D_SCISSOR_HORIZ_X__MASK 0x0000ffff #define NV30_3D_SCISSOR_HORIZ_X__SHIFT 0 #define NV30_3D_SCISSOR_HORIZ_W__MASK 0xffff0000 #define NV30_3D_SCISSOR_HORIZ_W__SHIFT 16 #define NV30_3D_SCISSOR_VERT 0x000008c4 #define NV30_3D_SCISSOR_VERT_Y__MASK 0x0000ffff #define NV30_3D_SCISSOR_VERT_Y__SHIFT 0 #define NV30_3D_SCISSOR_VERT_H__MASK 0xffff0000 #define NV30_3D_SCISSOR_VERT_H__SHIFT 16 #define NV30_3D_FOG_COORD_DIST 0x000008c8 #define NV30_3D_FOG_MODE 0x000008cc #define NV30_3D_FOG_EQUATION_CONSTANT 0x000008d0 #define NV30_3D_FOG_EQUATION_LINEAR 0x000008d4 #define NV30_3D_FOG_EQUATION_QUADRATIC 0x000008d8 #define NV30_3D_FP_ACTIVE_PROGRAM 0x000008e4 #define NV30_3D_FP_ACTIVE_PROGRAM_DMA0 0x00000001 #define NV30_3D_FP_ACTIVE_PROGRAM_DMA1 0x00000002 #define NV30_3D_FP_ACTIVE_PROGRAM_OFFSET__MASK 0xfffffffc #define NV30_3D_FP_ACTIVE_PROGRAM_OFFSET__SHIFT 2 #define NV30_3D_RC_COLOR0 0x000008ec #define NV30_3D_RC_COLOR0_B__MASK 0x000000ff #define NV30_3D_RC_COLOR0_B__SHIFT 0 #define NV30_3D_RC_COLOR0_G__MASK 0x0000ff00 #define NV30_3D_RC_COLOR0_G__SHIFT 8 #define NV30_3D_RC_COLOR0_R__MASK 0x00ff0000 #define NV30_3D_RC_COLOR0_R__SHIFT 16 #define NV30_3D_RC_COLOR0_A__MASK 0xff000000 #define NV30_3D_RC_COLOR0_A__SHIFT 24 #define NV30_3D_RC_COLOR1 0x000008f0 #define NV30_3D_RC_COLOR1_B__MASK 0x000000ff #define NV30_3D_RC_COLOR1_B__SHIFT 0 #define NV30_3D_RC_COLOR1_G__MASK 0x0000ff00 #define NV30_3D_RC_COLOR1_G__SHIFT 8 #define NV30_3D_RC_COLOR1_R__MASK 0x00ff0000 #define NV30_3D_RC_COLOR1_R__SHIFT 16 #define NV30_3D_RC_COLOR1_A__MASK 0xff000000 #define NV30_3D_RC_COLOR1_A__SHIFT 24 #define NV30_3D_RC_FINAL0 0x000008f4 #define NV30_3D_RC_FINAL0_D_INPUT__MASK 0x0000000f #define NV30_3D_RC_FINAL0_D_INPUT__SHIFT 0 #define NV30_3D_RC_FINAL0_D_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV30_3D_RC_FINAL0_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV30_3D_RC_FINAL0_D_INPUT_FOG 0x00000003 #define NV30_3D_RC_FINAL0_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV30_3D_RC_FINAL0_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE0 0x00000008 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE1 0x00000009 #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE2 0x0000000a #define NV30_3D_RC_FINAL0_D_INPUT_TEXTURE3 0x0000000b #define NV30_3D_RC_FINAL0_D_INPUT_SPARE0 0x0000000c #define NV30_3D_RC_FINAL0_D_INPUT_SPARE1 0x0000000d #define NV30_3D_RC_FINAL0_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV30_3D_RC_FINAL0_D_INPUT_E_TIMES_F 0x0000000f #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE__MASK 0x00000010 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE__SHIFT 4 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL0_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV30_3D_RC_FINAL0_D_MAPPING__MASK 0x000000e0 #define NV30_3D_RC_FINAL0_D_MAPPING__SHIFT 5 #define NV30_3D_RC_FINAL0_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL0_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV30_3D_RC_FINAL0_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV30_3D_RC_FINAL0_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV30_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV30_3D_RC_FINAL0_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV30_3D_RC_FINAL0_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV30_3D_RC_FINAL0_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV30_3D_RC_FINAL0_C_INPUT__MASK 0x00000f00 #define NV30_3D_RC_FINAL0_C_INPUT__SHIFT 8 #define NV30_3D_RC_FINAL0_C_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_FINAL0_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_FINAL0_C_INPUT_FOG 0x00000300 #define NV30_3D_RC_FINAL0_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_FINAL0_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_FINAL0_C_INPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE0 0x00000c00 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE1 0x00000d00 #define NV30_3D_RC_FINAL0_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_FINAL0_C_INPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE__MASK 0x00001000 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE__SHIFT 12 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL0_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV30_3D_RC_FINAL0_C_MAPPING__MASK 0x0000e000 #define NV30_3D_RC_FINAL0_C_MAPPING__SHIFT 13 #define NV30_3D_RC_FINAL0_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL0_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV30_3D_RC_FINAL0_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV30_3D_RC_FINAL0_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV30_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV30_3D_RC_FINAL0_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV30_3D_RC_FINAL0_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV30_3D_RC_FINAL0_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV30_3D_RC_FINAL0_B_INPUT__MASK 0x000f0000 #define NV30_3D_RC_FINAL0_B_INPUT__SHIFT 16 #define NV30_3D_RC_FINAL0_B_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV30_3D_RC_FINAL0_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV30_3D_RC_FINAL0_B_INPUT_FOG 0x00030000 #define NV30_3D_RC_FINAL0_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV30_3D_RC_FINAL0_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE0 0x00080000 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE1 0x00090000 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE2 0x000a0000 #define NV30_3D_RC_FINAL0_B_INPUT_TEXTURE3 0x000b0000 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE0 0x000c0000 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE1 0x000d0000 #define NV30_3D_RC_FINAL0_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV30_3D_RC_FINAL0_B_INPUT_E_TIMES_F 0x000f0000 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE__MASK 0x00100000 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE__SHIFT 20 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL0_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV30_3D_RC_FINAL0_B_MAPPING__MASK 0x00e00000 #define NV30_3D_RC_FINAL0_B_MAPPING__SHIFT 21 #define NV30_3D_RC_FINAL0_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL0_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV30_3D_RC_FINAL0_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV30_3D_RC_FINAL0_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV30_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV30_3D_RC_FINAL0_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV30_3D_RC_FINAL0_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV30_3D_RC_FINAL0_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV30_3D_RC_FINAL0_A_INPUT__MASK 0x0f000000 #define NV30_3D_RC_FINAL0_A_INPUT__SHIFT 24 #define NV30_3D_RC_FINAL0_A_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV30_3D_RC_FINAL0_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV30_3D_RC_FINAL0_A_INPUT_FOG 0x03000000 #define NV30_3D_RC_FINAL0_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV30_3D_RC_FINAL0_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE0 0x08000000 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE1 0x09000000 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE2 0x0a000000 #define NV30_3D_RC_FINAL0_A_INPUT_TEXTURE3 0x0b000000 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE0 0x0c000000 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE1 0x0d000000 #define NV30_3D_RC_FINAL0_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV30_3D_RC_FINAL0_A_INPUT_E_TIMES_F 0x0f000000 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE__MASK 0x10000000 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE__SHIFT 28 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL0_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV30_3D_RC_FINAL0_A_MAPPING__MASK 0xe0000000 #define NV30_3D_RC_FINAL0_A_MAPPING__SHIFT 29 #define NV30_3D_RC_FINAL0_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL0_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV30_3D_RC_FINAL0_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV30_3D_RC_FINAL0_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV30_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV30_3D_RC_FINAL0_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV30_3D_RC_FINAL0_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV30_3D_RC_FINAL0_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV30_3D_RC_FINAL1 0x000008f8 #define NV30_3D_RC_FINAL1_COLOR_SUM_CLAMP 0x00000080 #define NV30_3D_RC_FINAL1_G_INPUT__MASK 0x00000f00 #define NV30_3D_RC_FINAL1_G_INPUT__SHIFT 8 #define NV30_3D_RC_FINAL1_G_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_FINAL1_G_INPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_FINAL1_G_INPUT_FOG 0x00000300 #define NV30_3D_RC_FINAL1_G_INPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_FINAL1_G_INPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_FINAL1_G_INPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE0 0x00000c00 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE1 0x00000d00 #define NV30_3D_RC_FINAL1_G_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_FINAL1_G_INPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE__MASK 0x00001000 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE__SHIFT 12 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL1_G_COMPONENT_USAGE_ALPHA 0x00001000 #define NV30_3D_RC_FINAL1_G_MAPPING__MASK 0x0000e000 #define NV30_3D_RC_FINAL1_G_MAPPING__SHIFT 13 #define NV30_3D_RC_FINAL1_G_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL1_G_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV30_3D_RC_FINAL1_G_MAPPING_EXPAND_NORMAL 0x00004000 #define NV30_3D_RC_FINAL1_G_MAPPING_EXPAND_NEGATE 0x00006000 #define NV30_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV30_3D_RC_FINAL1_G_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV30_3D_RC_FINAL1_G_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV30_3D_RC_FINAL1_G_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV30_3D_RC_FINAL1_F_INPUT__MASK 0x000f0000 #define NV30_3D_RC_FINAL1_F_INPUT__SHIFT 16 #define NV30_3D_RC_FINAL1_F_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR0 0x00010000 #define NV30_3D_RC_FINAL1_F_INPUT_CONSTANT_COLOR1 0x00020000 #define NV30_3D_RC_FINAL1_F_INPUT_FOG 0x00030000 #define NV30_3D_RC_FINAL1_F_INPUT_PRIMARY_COLOR 0x00040000 #define NV30_3D_RC_FINAL1_F_INPUT_SECONDARY_COLOR 0x00050000 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE0 0x00080000 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE1 0x00090000 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE2 0x000a0000 #define NV30_3D_RC_FINAL1_F_INPUT_TEXTURE3 0x000b0000 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE0 0x000c0000 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE1 0x000d0000 #define NV30_3D_RC_FINAL1_F_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV30_3D_RC_FINAL1_F_INPUT_E_TIMES_F 0x000f0000 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE__MASK 0x00100000 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE__SHIFT 20 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL1_F_COMPONENT_USAGE_ALPHA 0x00100000 #define NV30_3D_RC_FINAL1_F_MAPPING__MASK 0x00e00000 #define NV30_3D_RC_FINAL1_F_MAPPING__SHIFT 21 #define NV30_3D_RC_FINAL1_F_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL1_F_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV30_3D_RC_FINAL1_F_MAPPING_EXPAND_NORMAL 0x00400000 #define NV30_3D_RC_FINAL1_F_MAPPING_EXPAND_NEGATE 0x00600000 #define NV30_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV30_3D_RC_FINAL1_F_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV30_3D_RC_FINAL1_F_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV30_3D_RC_FINAL1_F_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV30_3D_RC_FINAL1_E_INPUT__MASK 0x0f000000 #define NV30_3D_RC_FINAL1_E_INPUT__SHIFT 24 #define NV30_3D_RC_FINAL1_E_INPUT_ZERO 0x00000000 #define NV30_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR0 0x01000000 #define NV30_3D_RC_FINAL1_E_INPUT_CONSTANT_COLOR1 0x02000000 #define NV30_3D_RC_FINAL1_E_INPUT_FOG 0x03000000 #define NV30_3D_RC_FINAL1_E_INPUT_PRIMARY_COLOR 0x04000000 #define NV30_3D_RC_FINAL1_E_INPUT_SECONDARY_COLOR 0x05000000 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE0 0x08000000 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE1 0x09000000 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE2 0x0a000000 #define NV30_3D_RC_FINAL1_E_INPUT_TEXTURE3 0x0b000000 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE0 0x0c000000 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE1 0x0d000000 #define NV30_3D_RC_FINAL1_E_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV30_3D_RC_FINAL1_E_INPUT_E_TIMES_F 0x0f000000 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE__MASK 0x10000000 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE__SHIFT 28 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_FINAL1_E_COMPONENT_USAGE_ALPHA 0x10000000 #define NV30_3D_RC_FINAL1_E_MAPPING__MASK 0xe0000000 #define NV30_3D_RC_FINAL1_E_MAPPING__SHIFT 29 #define NV30_3D_RC_FINAL1_E_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_FINAL1_E_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV30_3D_RC_FINAL1_E_MAPPING_EXPAND_NORMAL 0x40000000 #define NV30_3D_RC_FINAL1_E_MAPPING_EXPAND_NEGATE 0x60000000 #define NV30_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV30_3D_RC_FINAL1_E_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV30_3D_RC_FINAL1_E_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV30_3D_RC_FINAL1_E_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV30_3D_RC_ENABLE 0x000008fc #define NV30_3D_RC_ENABLE_NUM_COMBINERS__MASK 0x0000000f #define NV30_3D_RC_ENABLE_NUM_COMBINERS__SHIFT 0 #define NV30_3D_RC_ENABLE_STAGE_CONSTANT_COLOR0 0x0000f000 #define NV30_3D_RC_ENABLE_STAGE_CONSTANT_COLOR1 0x000f0000 #define NV30_3D_RC_IN_ALPHA(i0) (0x00000900 + 0x20*(i0)) #define NV30_3D_RC_IN_ALPHA_D_INPUT__MASK 0x0000000f #define NV30_3D_RC_IN_ALPHA_D_INPUT__SHIFT 0 #define NV30_3D_RC_IN_ALPHA_D_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV30_3D_RC_IN_ALPHA_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV30_3D_RC_IN_ALPHA_D_INPUT_FOG 0x00000003 #define NV30_3D_RC_IN_ALPHA_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV30_3D_RC_IN_ALPHA_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE0 0x00000008 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE1 0x00000009 #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE2 0x0000000a #define NV30_3D_RC_IN_ALPHA_D_INPUT_TEXTURE3 0x0000000b #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE0 0x0000000c #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE1 0x0000000d #define NV30_3D_RC_IN_ALPHA_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV30_3D_RC_IN_ALPHA_D_INPUT_E_TIMES_F 0x0000000f #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__MASK 0x00000010 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE__SHIFT 4 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_BLUE 0x00000000 #define NV30_3D_RC_IN_ALPHA_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV30_3D_RC_IN_ALPHA_D_MAPPING__MASK 0x000000e0 #define NV30_3D_RC_IN_ALPHA_D_MAPPING__SHIFT 5 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV30_3D_RC_IN_ALPHA_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV30_3D_RC_IN_ALPHA_C_INPUT__MASK 0x00000f00 #define NV30_3D_RC_IN_ALPHA_C_INPUT__SHIFT 8 #define NV30_3D_RC_IN_ALPHA_C_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_IN_ALPHA_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_IN_ALPHA_C_INPUT_FOG 0x00000300 #define NV30_3D_RC_IN_ALPHA_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_IN_ALPHA_C_INPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE0 0x00000c00 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE1 0x00000d00 #define NV30_3D_RC_IN_ALPHA_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_IN_ALPHA_C_INPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__MASK 0x00001000 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE__SHIFT 12 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_BLUE 0x00000000 #define NV30_3D_RC_IN_ALPHA_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING__MASK 0x0000e000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING__SHIFT 13 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV30_3D_RC_IN_ALPHA_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV30_3D_RC_IN_ALPHA_B_INPUT__MASK 0x000f0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT__SHIFT 16 #define NV30_3D_RC_IN_ALPHA_B_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_FOG 0x00030000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE0 0x00080000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE1 0x00090000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE2 0x000a0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_TEXTURE3 0x000b0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE0 0x000c0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE1 0x000d0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV30_3D_RC_IN_ALPHA_B_INPUT_E_TIMES_F 0x000f0000 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__MASK 0x00100000 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE__SHIFT 20 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_BLUE 0x00000000 #define NV30_3D_RC_IN_ALPHA_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING__MASK 0x00e00000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING__SHIFT 21 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV30_3D_RC_IN_ALPHA_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV30_3D_RC_IN_ALPHA_A_INPUT__MASK 0x0f000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT__SHIFT 24 #define NV30_3D_RC_IN_ALPHA_A_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_FOG 0x03000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE0 0x08000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE1 0x09000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE2 0x0a000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_TEXTURE3 0x0b000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE0 0x0c000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE1 0x0d000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV30_3D_RC_IN_ALPHA_A_INPUT_E_TIMES_F 0x0f000000 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__MASK 0x10000000 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE__SHIFT 28 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_BLUE 0x00000000 #define NV30_3D_RC_IN_ALPHA_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING__MASK 0xe0000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING__SHIFT 29 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV30_3D_RC_IN_ALPHA_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV30_3D_RC_IN_RGB(i0) (0x00000904 + 0x20*(i0)) #define NV30_3D_RC_IN_RGB_D_INPUT__MASK 0x0000000f #define NV30_3D_RC_IN_RGB_D_INPUT__SHIFT 0 #define NV30_3D_RC_IN_RGB_D_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR0 0x00000001 #define NV30_3D_RC_IN_RGB_D_INPUT_CONSTANT_COLOR1 0x00000002 #define NV30_3D_RC_IN_RGB_D_INPUT_FOG 0x00000003 #define NV30_3D_RC_IN_RGB_D_INPUT_PRIMARY_COLOR 0x00000004 #define NV30_3D_RC_IN_RGB_D_INPUT_SECONDARY_COLOR 0x00000005 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE0 0x00000008 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE1 0x00000009 #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE2 0x0000000a #define NV30_3D_RC_IN_RGB_D_INPUT_TEXTURE3 0x0000000b #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE0 0x0000000c #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE1 0x0000000d #define NV30_3D_RC_IN_RGB_D_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV30_3D_RC_IN_RGB_D_INPUT_E_TIMES_F 0x0000000f #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE__MASK 0x00000010 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE__SHIFT 4 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_IN_RGB_D_COMPONENT_USAGE_ALPHA 0x00000010 #define NV30_3D_RC_IN_RGB_D_MAPPING__MASK 0x000000e0 #define NV30_3D_RC_IN_RGB_D_MAPPING__SHIFT 5 #define NV30_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_RGB_D_MAPPING_UNSIGNED_INVERT 0x00000020 #define NV30_3D_RC_IN_RGB_D_MAPPING_EXPAND_NORMAL 0x00000040 #define NV30_3D_RC_IN_RGB_D_MAPPING_EXPAND_NEGATE 0x00000060 #define NV30_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NORMAL 0x00000080 #define NV30_3D_RC_IN_RGB_D_MAPPING_HALF_BIAS_NEGATE 0x000000a0 #define NV30_3D_RC_IN_RGB_D_MAPPING_SIGNED_IDENTITY 0x000000c0 #define NV30_3D_RC_IN_RGB_D_MAPPING_SIGNED_NEGATE 0x000000e0 #define NV30_3D_RC_IN_RGB_C_INPUT__MASK 0x00000f00 #define NV30_3D_RC_IN_RGB_C_INPUT__SHIFT 8 #define NV30_3D_RC_IN_RGB_C_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_IN_RGB_C_INPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_IN_RGB_C_INPUT_FOG 0x00000300 #define NV30_3D_RC_IN_RGB_C_INPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_IN_RGB_C_INPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_IN_RGB_C_INPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE0 0x00000c00 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE1 0x00000d00 #define NV30_3D_RC_IN_RGB_C_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_IN_RGB_C_INPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE__MASK 0x00001000 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE__SHIFT 12 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_IN_RGB_C_COMPONENT_USAGE_ALPHA 0x00001000 #define NV30_3D_RC_IN_RGB_C_MAPPING__MASK 0x0000e000 #define NV30_3D_RC_IN_RGB_C_MAPPING__SHIFT 13 #define NV30_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_RGB_C_MAPPING_UNSIGNED_INVERT 0x00002000 #define NV30_3D_RC_IN_RGB_C_MAPPING_EXPAND_NORMAL 0x00004000 #define NV30_3D_RC_IN_RGB_C_MAPPING_EXPAND_NEGATE 0x00006000 #define NV30_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NORMAL 0x00008000 #define NV30_3D_RC_IN_RGB_C_MAPPING_HALF_BIAS_NEGATE 0x0000a000 #define NV30_3D_RC_IN_RGB_C_MAPPING_SIGNED_IDENTITY 0x0000c000 #define NV30_3D_RC_IN_RGB_C_MAPPING_SIGNED_NEGATE 0x0000e000 #define NV30_3D_RC_IN_RGB_B_INPUT__MASK 0x000f0000 #define NV30_3D_RC_IN_RGB_B_INPUT__SHIFT 16 #define NV30_3D_RC_IN_RGB_B_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR0 0x00010000 #define NV30_3D_RC_IN_RGB_B_INPUT_CONSTANT_COLOR1 0x00020000 #define NV30_3D_RC_IN_RGB_B_INPUT_FOG 0x00030000 #define NV30_3D_RC_IN_RGB_B_INPUT_PRIMARY_COLOR 0x00040000 #define NV30_3D_RC_IN_RGB_B_INPUT_SECONDARY_COLOR 0x00050000 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE0 0x00080000 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE1 0x00090000 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE2 0x000a0000 #define NV30_3D_RC_IN_RGB_B_INPUT_TEXTURE3 0x000b0000 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE0 0x000c0000 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE1 0x000d0000 #define NV30_3D_RC_IN_RGB_B_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000e0000 #define NV30_3D_RC_IN_RGB_B_INPUT_E_TIMES_F 0x000f0000 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE__MASK 0x00100000 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE__SHIFT 20 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_IN_RGB_B_COMPONENT_USAGE_ALPHA 0x00100000 #define NV30_3D_RC_IN_RGB_B_MAPPING__MASK 0x00e00000 #define NV30_3D_RC_IN_RGB_B_MAPPING__SHIFT 21 #define NV30_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_RGB_B_MAPPING_UNSIGNED_INVERT 0x00200000 #define NV30_3D_RC_IN_RGB_B_MAPPING_EXPAND_NORMAL 0x00400000 #define NV30_3D_RC_IN_RGB_B_MAPPING_EXPAND_NEGATE 0x00600000 #define NV30_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NORMAL 0x00800000 #define NV30_3D_RC_IN_RGB_B_MAPPING_HALF_BIAS_NEGATE 0x00a00000 #define NV30_3D_RC_IN_RGB_B_MAPPING_SIGNED_IDENTITY 0x00c00000 #define NV30_3D_RC_IN_RGB_B_MAPPING_SIGNED_NEGATE 0x00e00000 #define NV30_3D_RC_IN_RGB_A_INPUT__MASK 0x0f000000 #define NV30_3D_RC_IN_RGB_A_INPUT__SHIFT 24 #define NV30_3D_RC_IN_RGB_A_INPUT_ZERO 0x00000000 #define NV30_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR0 0x01000000 #define NV30_3D_RC_IN_RGB_A_INPUT_CONSTANT_COLOR1 0x02000000 #define NV30_3D_RC_IN_RGB_A_INPUT_FOG 0x03000000 #define NV30_3D_RC_IN_RGB_A_INPUT_PRIMARY_COLOR 0x04000000 #define NV30_3D_RC_IN_RGB_A_INPUT_SECONDARY_COLOR 0x05000000 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE0 0x08000000 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE1 0x09000000 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE2 0x0a000000 #define NV30_3D_RC_IN_RGB_A_INPUT_TEXTURE3 0x0b000000 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE0 0x0c000000 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE1 0x0d000000 #define NV30_3D_RC_IN_RGB_A_INPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0e000000 #define NV30_3D_RC_IN_RGB_A_INPUT_E_TIMES_F 0x0f000000 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE__MASK 0x10000000 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE__SHIFT 28 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE_RGB 0x00000000 #define NV30_3D_RC_IN_RGB_A_COMPONENT_USAGE_ALPHA 0x10000000 #define NV30_3D_RC_IN_RGB_A_MAPPING__MASK 0xe0000000 #define NV30_3D_RC_IN_RGB_A_MAPPING__SHIFT 29 #define NV30_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_IDENTITY 0x00000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_UNSIGNED_INVERT 0x20000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_EXPAND_NORMAL 0x40000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_EXPAND_NEGATE 0x60000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NORMAL 0x80000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_HALF_BIAS_NEGATE 0xa0000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_SIGNED_IDENTITY 0xc0000000 #define NV30_3D_RC_IN_RGB_A_MAPPING_SIGNED_NEGATE 0xe0000000 #define NV30_3D_RC_CONSTANT_COLOR0(i0) (0x00000908 + 0x20*(i0)) #define NV30_3D_RC_CONSTANT_COLOR0_B__MASK 0x000000ff #define NV30_3D_RC_CONSTANT_COLOR0_B__SHIFT 0 #define NV30_3D_RC_CONSTANT_COLOR0_G__MASK 0x0000ff00 #define NV30_3D_RC_CONSTANT_COLOR0_G__SHIFT 8 #define NV30_3D_RC_CONSTANT_COLOR0_R__MASK 0x00ff0000 #define NV30_3D_RC_CONSTANT_COLOR0_R__SHIFT 16 #define NV30_3D_RC_CONSTANT_COLOR0_A__MASK 0xff000000 #define NV30_3D_RC_CONSTANT_COLOR0_A__SHIFT 24 #define NV30_3D_RC_CONSTANT_COLOR1(i0) (0x0000090c + 0x20*(i0)) #define NV30_3D_RC_CONSTANT_COLOR1_B__MASK 0x000000ff #define NV30_3D_RC_CONSTANT_COLOR1_B__SHIFT 0 #define NV30_3D_RC_CONSTANT_COLOR1_G__MASK 0x0000ff00 #define NV30_3D_RC_CONSTANT_COLOR1_G__SHIFT 8 #define NV30_3D_RC_CONSTANT_COLOR1_R__MASK 0x00ff0000 #define NV30_3D_RC_CONSTANT_COLOR1_R__SHIFT 16 #define NV30_3D_RC_CONSTANT_COLOR1_A__MASK 0xff000000 #define NV30_3D_RC_CONSTANT_COLOR1_A__SHIFT 24 #define NV30_3D_RC_OUT_ALPHA(i0) (0x00000910 + 0x20*(i0)) #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT__MASK 0x0000000f #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT__SHIFT 0 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR0 0x00000001 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_CONSTANT_COLOR1 0x00000002 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_FOG 0x00000003 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_PRIMARY_COLOR 0x00000004 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SECONDARY_COLOR 0x00000005 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE0 0x00000008 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE1 0x00000009 #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE2 0x0000000a #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_TEXTURE3 0x0000000b #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0 0x0000000c #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE1 0x0000000d #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV30_3D_RC_OUT_ALPHA_CD_OUTPUT_E_TIMES_F 0x0000000f #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT__MASK 0x000000f0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT__SHIFT 4 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR0 0x00000010 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_CONSTANT_COLOR1 0x00000020 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_FOG 0x00000030 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_PRIMARY_COLOR 0x00000040 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SECONDARY_COLOR 0x00000050 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE0 0x00000080 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE1 0x00000090 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE2 0x000000a0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_TEXTURE3 0x000000b0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0 0x000000c0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE1 0x000000d0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0 #define NV30_3D_RC_OUT_ALPHA_AB_OUTPUT_E_TIMES_F 0x000000f0 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT__MASK 0x00000f00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT__SHIFT 8 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_FOG 0x00000300 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0 0x00000c00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE1 0x00000d00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_OUT_ALPHA_SUM_OUTPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_OUT_ALPHA_CD_DOT_PRODUCT 0x00001000 #define NV30_3D_RC_OUT_ALPHA_AB_DOT_PRODUCT 0x00002000 #define NV30_3D_RC_OUT_ALPHA_MUX_SUM 0x00004000 #define NV30_3D_RC_OUT_ALPHA_BIAS__MASK 0x00008000 #define NV30_3D_RC_OUT_ALPHA_BIAS__SHIFT 15 #define NV30_3D_RC_OUT_ALPHA_BIAS_NONE 0x00000000 #define NV30_3D_RC_OUT_ALPHA_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000 #define NV30_3D_RC_OUT_ALPHA_SCALE__MASK 0x00030000 #define NV30_3D_RC_OUT_ALPHA_SCALE__SHIFT 16 #define NV30_3D_RC_OUT_ALPHA_SCALE_NONE 0x00000000 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_TWO 0x00010000 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_FOUR 0x00020000 #define NV30_3D_RC_OUT_ALPHA_SCALE_SCALE_BY_ONE_HALF 0x00030000 #define NV30_3D_RC_OUT_RGB(i0) (0x00000914 + 0x20*(i0)) #define NV30_3D_RC_OUT_RGB_CD_OUTPUT__MASK 0x0000000f #define NV30_3D_RC_OUT_RGB_CD_OUTPUT__SHIFT 0 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR0 0x00000001 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_CONSTANT_COLOR1 0x00000002 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_FOG 0x00000003 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_PRIMARY_COLOR 0x00000004 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SECONDARY_COLOR 0x00000005 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE0 0x00000008 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE1 0x00000009 #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE2 0x0000000a #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_TEXTURE3 0x0000000b #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0 0x0000000c #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE1 0x0000000d #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x0000000e #define NV30_3D_RC_OUT_RGB_CD_OUTPUT_E_TIMES_F 0x0000000f #define NV30_3D_RC_OUT_RGB_AB_OUTPUT__MASK 0x000000f0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT__SHIFT 4 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR0 0x00000010 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_CONSTANT_COLOR1 0x00000020 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_FOG 0x00000030 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_PRIMARY_COLOR 0x00000040 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SECONDARY_COLOR 0x00000050 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE0 0x00000080 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE1 0x00000090 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE2 0x000000a0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_TEXTURE3 0x000000b0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0 0x000000c0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE1 0x000000d0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x000000e0 #define NV30_3D_RC_OUT_RGB_AB_OUTPUT_E_TIMES_F 0x000000f0 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT__MASK 0x00000f00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT__SHIFT 8 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_ZERO 0x00000000 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR0 0x00000100 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_CONSTANT_COLOR1 0x00000200 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_FOG 0x00000300 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_PRIMARY_COLOR 0x00000400 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SECONDARY_COLOR 0x00000500 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE0 0x00000800 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE1 0x00000900 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE2 0x00000a00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_TEXTURE3 0x00000b00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0 0x00000c00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE1 0x00000d00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_SPARE0_PLUS_SECONDARY_COLOR 0x00000e00 #define NV30_3D_RC_OUT_RGB_SUM_OUTPUT_E_TIMES_F 0x00000f00 #define NV30_3D_RC_OUT_RGB_CD_DOT_PRODUCT 0x00001000 #define NV30_3D_RC_OUT_RGB_AB_DOT_PRODUCT 0x00002000 #define NV30_3D_RC_OUT_RGB_MUX_SUM 0x00004000 #define NV30_3D_RC_OUT_RGB_BIAS__MASK 0x00008000 #define NV30_3D_RC_OUT_RGB_BIAS__SHIFT 15 #define NV30_3D_RC_OUT_RGB_BIAS_NONE 0x00000000 #define NV30_3D_RC_OUT_RGB_BIAS_BIAS_BY_NEGATIVE_ONE_HALF 0x00008000 #define NV30_3D_RC_OUT_RGB_SCALE__MASK 0x00030000 #define NV30_3D_RC_OUT_RGB_SCALE__SHIFT 16 #define NV30_3D_RC_OUT_RGB_SCALE_NONE 0x00000000 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_TWO 0x00010000 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_FOUR 0x00020000 #define NV30_3D_RC_OUT_RGB_SCALE_SCALE_BY_ONE_HALF 0x00030000 #define NV30_3D_VIEWPORT_HORIZ 0x00000a00 #define NV30_3D_VIEWPORT_HORIZ_X__MASK 0x0000ffff #define NV30_3D_VIEWPORT_HORIZ_X__SHIFT 0 #define NV30_3D_VIEWPORT_HORIZ_W__MASK 0xffff0000 #define NV30_3D_VIEWPORT_HORIZ_W__SHIFT 16 #define NV30_3D_VIEWPORT_VERT 0x00000a04 #define NV30_3D_VIEWPORT_VERT_Y__MASK 0x0000ffff #define NV30_3D_VIEWPORT_VERT_Y__SHIFT 0 #define NV30_3D_VIEWPORT_VERT_H__MASK 0xffff0000 #define NV30_3D_VIEWPORT_VERT_H__SHIFT 16 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x00000a10 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x00000a10 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x00000a14 #define NV30_3D_LIGHT_MODEL_FRONT_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x00000a18 #define NV30_3D_VIEWPORT_TRANSLATE 0x00000a20 #define NV30_3D_VIEWPORT_TRANSLATE_X 0x00000a20 #define NV30_3D_VIEWPORT_TRANSLATE_Y 0x00000a24 #define NV30_3D_VIEWPORT_TRANSLATE_Z 0x00000a28 #define NV30_3D_VIEWPORT_TRANSLATE_W 0x00000a2c #define NV30_3D_VIEWPORT_SCALE 0x00000a30 #define NV30_3D_VIEWPORT_SCALE_X 0x00000a30 #define NV30_3D_VIEWPORT_SCALE_Y 0x00000a34 #define NV30_3D_VIEWPORT_SCALE_Z 0x00000a38 #define NV30_3D_VIEWPORT_SCALE_W 0x00000a3c #define NV30_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000a60 #define NV30_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000a64 #define NV30_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000a68 #define NV30_3D_DEPTH_FUNC 0x00000a6c #define NV30_3D_DEPTH_FUNC_NEVER 0x00000200 #define NV30_3D_DEPTH_FUNC_LESS 0x00000201 #define NV30_3D_DEPTH_FUNC_EQUAL 0x00000202 #define NV30_3D_DEPTH_FUNC_LEQUAL 0x00000203 #define NV30_3D_DEPTH_FUNC_GREATER 0x00000204 #define NV30_3D_DEPTH_FUNC_NOTEQUAL 0x00000205 #define NV30_3D_DEPTH_FUNC_GEQUAL 0x00000206 #define NV30_3D_DEPTH_FUNC_ALWAYS 0x00000207 #define NV30_3D_DEPTH_WRITE_ENABLE 0x00000a70 #define NV30_3D_DEPTH_TEST_ENABLE 0x00000a74 #define NV30_3D_POLYGON_OFFSET_FACTOR 0x00000a78 #define NV30_3D_POLYGON_OFFSET_UNITS 0x00000a7c #define NV30_3D_VTX_ATTR_3I_XY(i0) (0x00000a80 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_3I_XY__ESIZE 0x00000008 #define NV30_3D_VTX_ATTR_3I_XY__LEN 0x00000010 #define NV30_3D_VTX_ATTR_3I_XY_X__MASK 0x0000ffff #define NV30_3D_VTX_ATTR_3I_XY_X__SHIFT 0 #define NV30_3D_VTX_ATTR_3I_XY_Y__MASK 0xffff0000 #define NV30_3D_VTX_ATTR_3I_XY_Y__SHIFT 16 #define NV30_3D_VTX_ATTR_3I_Z(i0) (0x00000a84 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_3I_Z__ESIZE 0x00000008 #define NV30_3D_VTX_ATTR_3I_Z__LEN 0x00000010 #define NV30_3D_VTX_ATTR_3I_Z_Z__MASK 0x0000ffff #define NV30_3D_VTX_ATTR_3I_Z_Z__SHIFT 0 #define NV30_3D_TEX_FILTER_OPTIMIZATION(i0) (0x00000b00 + 0x4*(i0)) #define NV30_3D_TEX_FILTER_OPTIMIZATION__ESIZE 0x00000004 #define NV30_3D_TEX_FILTER_OPTIMIZATION__LEN 0x00000004 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR__MASK 0x0000001f #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR__SHIFT 0 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_OFF 0x00000000 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_HIGH_QUALITY 0x00000004 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_QUALITY 0x00000006 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_PERFORMANCE 0x00000008 #define NV40_3D_TEX_FILTER_OPTIMIZATION_TRILINEAR_HIGH_PERFORMANCE 0x00000018 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE__MASK 0x000001c0 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE__SHIFT 6 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_OFF 0x00000000 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_HIGH_QUALITY 0x000000c0 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_QUALITY 0x000001c0 #define NV40_3D_TEX_FILTER_OPTIMIZATION_ANISO_SAMPLE_PERFORMANCE 0x00000140 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN__MASK 0x00007c00 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN__SHIFT 10 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_OFF 0x00000000 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_PARTIAL 0x00002c00 #define NV40_3D_TEX_FILTER_OPTIMIZATION_UNKNOWN_FULL 0x00007c00 #define NV40_3D_UNK0B40(i0) (0x00000b40 + 0x4*(i0)) #define NV40_3D_UNK0B40__ESIZE 0x00000004 #define NV40_3D_UNK0B40__LEN 0x00000008 #define NV30_3D_VP_UPLOAD_INST(i0) (0x00000b80 + 0x4*(i0)) #define NV30_3D_VP_UPLOAD_INST__ESIZE 0x00000004 #define NV30_3D_VP_UPLOAD_INST__LEN 0x00000004 #define NV30_3D_TEX_CLIP_PLANE(i0) (0x00000e00 + 0x10*(i0)) #define NV30_3D_TEX_CLIP_PLANE_X(i0) (0x00000e00 + 0x10*(i0)) #define NV30_3D_TEX_CLIP_PLANE_Y(i0) (0x00000e04 + 0x10*(i0)) #define NV30_3D_TEX_CLIP_PLANE_Z(i0) (0x00000e08 + 0x10*(i0)) #define NV30_3D_TEX_CLIP_PLANE_W(i0) (0x00000e0c + 0x10*(i0)) #define NV30_3D_LIGHT 0x00001000 #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT(i0) (0x00001000 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_R(i0) (0x00001000 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_G(i0) (0x00001004 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(i0) (0x00001008 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE(i0) (0x0000100c + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_R(i0) (0x0000100c + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_G(i0) (0x00001010 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(i0) (0x00001014 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR(i0) (0x00001018 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_R(i0) (0x00001018 + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_G(i0) (0x0000101c + 0x40*(i0)) #define NV30_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(i0) (0x00001020 + 0x40*(i0)) #define NV30_3D_LIGHT_UNK24(i0) (0x00001024 + 0x40*(i0)) #define NV30_3D_LIGHT_HALF_VECTOR(i0) (0x00001028 + 0x40*(i0)) #define NV30_3D_LIGHT_HALF_VECTOR_X(i0) (0x00001028 + 0x40*(i0)) #define NV30_3D_LIGHT_HALF_VECTOR_Y(i0) (0x0000102c + 0x40*(i0)) #define NV30_3D_LIGHT_HALF_VECTOR_Z(i0) (0x00001030 + 0x40*(i0)) #define NV30_3D_LIGHT_DIRECTION(i0) (0x00001034 + 0x40*(i0)) #define NV30_3D_LIGHT_DIRECTION_X(i0) (0x00001034 + 0x40*(i0)) #define NV30_3D_LIGHT_DIRECTION_Y(i0) (0x00001038 + 0x40*(i0)) #define NV30_3D_LIGHT_DIRECTION_Z(i0) (0x0000103c + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_CUTOFF_A(i0) (0x00001200 + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_CUTOFF_B(i0) (0x00001204 + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_CUTOFF_C(i0) (0x00001208 + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_DIR(i0) (0x0000120c + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_DIR_X(i0) (0x0000120c + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_DIR_Y(i0) (0x00001210 + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_DIR_Z(i0) (0x00001214 + 0x40*(i0)) #define NV30_3D_LIGHT_SPOT_CUTOFF_D(i0) (0x00001218 + 0x40*(i0)) #define NV30_3D_LIGHT_POSITION(i0) (0x0000121c + 0x40*(i0)) #define NV30_3D_LIGHT_POSITION_X(i0) (0x0000121c + 0x40*(i0)) #define NV30_3D_LIGHT_POSITION_Y(i0) (0x00001220 + 0x40*(i0)) #define NV30_3D_LIGHT_POSITION_Z(i0) (0x00001224 + 0x40*(i0)) #define NV30_3D_LIGHT_ATTENUATION(i0) (0x00001228 + 0x40*(i0)) #define NV30_3D_LIGHT_ATTENUATION_CONSTANT(i0) (0x00001228 + 0x40*(i0)) #define NV30_3D_LIGHT_ATTENUATION_LINEAR(i0) (0x0000122c + 0x40*(i0)) #define NV30_3D_LIGHT_ATTENUATION_QUADRATIC(i0) (0x00001230 + 0x40*(i0)) #define NV30_3D_FRONT_MATERIAL_SHININESS(i0) (0x00001400 + 0x4*(i0)) #define NV30_3D_FRONT_MATERIAL_SHININESS__ESIZE 0x00000004 #define NV30_3D_FRONT_MATERIAL_SHININESS__LEN 0x00000006 #define NV30_3D_ENABLED_LIGHTS 0x00001420 #define NV30_3D_VERTEX_TWO_SIDE_ENABLE 0x0000142c #define NV30_3D_FP_REG_CONTROL 0x00001450 #define NV30_3D_FP_REG_CONTROL_UNK0__MASK 0x0000ffff #define NV30_3D_FP_REG_CONTROL_UNK0__SHIFT 0 #define NV30_3D_FP_REG_CONTROL_UNK1__MASK 0xffff0000 #define NV30_3D_FP_REG_CONTROL_UNK1__SHIFT 16 #define NV30_3D_FLATSHADE_FIRST 0x00001454 #define NV30_3D_EDGEFLAG 0x0000145c #define NV30_3D_EDGEFLAG_ENABLE 0x00000001 #define NV30_3D_VP_CLIP_PLANES_ENABLE 0x00001478 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE0 0x00000002 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE1 0x00000020 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE2 0x00000200 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE3 0x00002000 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE4 0x00020000 #define NV30_3D_VP_CLIP_PLANES_ENABLE_PLANE5 0x00200000 #define NV30_3D_POLYGON_STIPPLE_ENABLE 0x0000147c #define NV30_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001480 + 0x4*(i0)) #define NV30_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004 #define NV30_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020 #define NV30_3D_VTX_ATTR_3F(i0) (0x00001500 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_3F__ESIZE 0x00000010 #define NV30_3D_VTX_ATTR_3F__LEN 0x00000010 #define NV30_3D_VTX_ATTR_3F_X(i0) (0x00001500 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_3F_Y(i0) (0x00001504 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_3F_Z(i0) (0x00001508 + 0x10*(i0)) #define NV30_3D_VP_CLIP_PLANE(i0, i1) (0x00001600 + 0x10*(i0) + 0x4*(i1)) #define NV30_3D_VP_CLIP_PLANE__ESIZE 0x00000004 #define NV30_3D_VP_CLIP_PLANE__LEN 0x00000004 #define NV30_3D_VTXBUF(i0) (0x00001680 + 0x4*(i0)) #define NV30_3D_VTXBUF__ESIZE 0x00000004 #define NV30_3D_VTXBUF__LEN 0x00000010 #define NV30_3D_VTXBUF_OFFSET__MASK 0x0fffffff #define NV30_3D_VTXBUF_OFFSET__SHIFT 0 #define NV30_3D_VTXBUF_DMA1 0x80000000 #define NV40_3D_VTX_CACHE_INVALIDATE 0x00001714 #define NV30_3D_VTXFMT(i0) (0x00001740 + 0x4*(i0)) #define NV30_3D_VTXFMT__ESIZE 0x00000004 #define NV30_3D_VTXFMT__LEN 0x00000010 #define NV30_3D_VTXFMT_TYPE__MASK 0x0000000f #define NV30_3D_VTXFMT_TYPE__SHIFT 0 #define NV30_3D_VTXFMT_TYPE_B8G8R8A8_UNORM 0x00000000 #define NV30_3D_VTXFMT_TYPE_V16_SNORM 0x00000001 #define NV30_3D_VTXFMT_TYPE_V32_FLOAT 0x00000002 #define NV30_3D_VTXFMT_TYPE_V16_FLOAT 0x00000003 #define NV30_3D_VTXFMT_TYPE_U8_UNORM 0x00000004 #define NV30_3D_VTXFMT_TYPE_V16_SSCALED 0x00000005 #define NV30_3D_VTXFMT_TYPE_U8_USCALED 0x00000007 #define NV30_3D_VTXFMT_SIZE__MASK 0x000000f0 #define NV30_3D_VTXFMT_SIZE__SHIFT 4 #define NV30_3D_VTXFMT_STRIDE__MASK 0x0000ff00 #define NV30_3D_VTXFMT_STRIDE__SHIFT 8 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION 0x000017a0 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_R 0x000017a0 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_G 0x000017a4 #define NV30_3D_LIGHT_MODEL_BACK_SIDE_PRODUCT_AMBIENT_PLUS_EMISSION_B 0x000017a8 #define NV30_3D_COLOR_MATERIAL_BACK 0x000017b0 #define NV30_3D_COLOR_MATERIAL_BACK_R 0x000017b0 #define NV30_3D_COLOR_MATERIAL_BACK_G 0x000017b4 #define NV30_3D_COLOR_MATERIAL_BACK_B 0x000017b8 #define NV30_3D_COLOR_MATERIAL_BACK_A 0x000017bc #define NV30_3D_QUERY_RESET 0x000017c8 #define NV30_3D_QUERY_ENABLE 0x000017cc #define NV30_3D_QUERY_GET 0x00001800 #define NV30_3D_QUERY_GET_OFFSET__MASK 0x00ffffff #define NV30_3D_QUERY_GET_OFFSET__SHIFT 0 #define NV30_3D_QUERY_GET_UNK24__MASK 0xff000000 #define NV30_3D_QUERY_GET_UNK24__SHIFT 24 #define NV30_3D_VERTEX_BEGIN_END 0x00001808 #define NV30_3D_VERTEX_BEGIN_END_STOP 0x00000000 #define NV30_3D_VERTEX_BEGIN_END_POINTS 0x00000001 #define NV30_3D_VERTEX_BEGIN_END_LINES 0x00000002 #define NV30_3D_VERTEX_BEGIN_END_LINE_LOOP 0x00000003 #define NV30_3D_VERTEX_BEGIN_END_LINE_STRIP 0x00000004 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLES 0x00000005 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLE_STRIP 0x00000006 #define NV30_3D_VERTEX_BEGIN_END_TRIANGLE_FAN 0x00000007 #define NV30_3D_VERTEX_BEGIN_END_QUADS 0x00000008 #define NV30_3D_VERTEX_BEGIN_END_QUAD_STRIP 0x00000009 #define NV30_3D_VERTEX_BEGIN_END_POLYGON 0x0000000a #define NV30_3D_VB_ELEMENT_U16 0x0000180c #define NV30_3D_VB_ELEMENT_U16_0__MASK 0x0000ffff #define NV30_3D_VB_ELEMENT_U16_0__SHIFT 0 #define NV30_3D_VB_ELEMENT_U16_1__MASK 0xffff0000 #define NV30_3D_VB_ELEMENT_U16_1__SHIFT 16 #define NV30_3D_VB_ELEMENT_U32 0x00001810 #define NV30_3D_VB_VERTEX_BATCH 0x00001814 #define NV30_3D_VB_VERTEX_BATCH_OFFSET__MASK 0x00ffffff #define NV30_3D_VB_VERTEX_BATCH_OFFSET__SHIFT 0 #define NV30_3D_VB_VERTEX_BATCH_COUNT__MASK 0xff000000 #define NV30_3D_VB_VERTEX_BATCH_COUNT__SHIFT 24 #define NV30_3D_VERTEX_DATA 0x00001818 #define NV30_3D_IDXBUF_OFFSET 0x0000181c #define NV30_3D_IDXBUF_FORMAT 0x00001820 #define NV30_3D_IDXBUF_FORMAT_DMA1 0x00000001 #define NV30_3D_IDXBUF_FORMAT_TYPE__MASK 0x000000f0 #define NV30_3D_IDXBUF_FORMAT_TYPE__SHIFT 4 #define NV30_3D_IDXBUF_FORMAT_TYPE_U32 0x00000000 #define NV30_3D_IDXBUF_FORMAT_TYPE_U16 0x00000010 #define NV30_3D_VB_INDEX_BATCH 0x00001824 #define NV30_3D_VB_INDEX_BATCH_START__MASK 0x00ffffff #define NV30_3D_VB_INDEX_BATCH_START__SHIFT 0 #define NV30_3D_VB_INDEX_BATCH_COUNT__MASK 0xff000000 #define NV30_3D_VB_INDEX_BATCH_COUNT__SHIFT 24 #define NV30_3D_POLYGON_MODE_FRONT 0x00001828 #define NV30_3D_POLYGON_MODE_FRONT_POINT 0x00001b00 #define NV30_3D_POLYGON_MODE_FRONT_LINE 0x00001b01 #define NV30_3D_POLYGON_MODE_FRONT_FILL 0x00001b02 #define NV30_3D_POLYGON_MODE_BACK 0x0000182c #define NV30_3D_POLYGON_MODE_BACK_POINT 0x00001b00 #define NV30_3D_POLYGON_MODE_BACK_LINE 0x00001b01 #define NV30_3D_POLYGON_MODE_BACK_FILL 0x00001b02 #define NV30_3D_CULL_FACE 0x00001830 #define NV30_3D_CULL_FACE_FRONT 0x00000404 #define NV30_3D_CULL_FACE_BACK 0x00000405 #define NV30_3D_CULL_FACE_FRONT_AND_BACK 0x00000408 #define NV30_3D_FRONT_FACE 0x00001834 #define NV30_3D_FRONT_FACE_CW 0x00000900 #define NV30_3D_FRONT_FACE_CCW 0x00000901 #define NV30_3D_POLYGON_SMOOTH_ENABLE 0x00001838 #define NV30_3D_CULL_FACE_ENABLE 0x0000183c #define NV30_3D_TEX_PALETTE_OFFSET(i0) (0x00001840 + 0x4*(i0)) #define NV30_3D_TEX_PALETTE_OFFSET__ESIZE 0x00000004 #define NV30_3D_TEX_PALETTE_OFFSET__LEN 0x00000008 #define NV40_3D_TEX_SIZE1(i0) (0x00001840 + 0x4*(i0)) #define NV40_3D_TEX_SIZE1__ESIZE 0x00000004 #define NV40_3D_TEX_SIZE1__LEN 0x00000008 #define NV40_3D_TEX_SIZE1_DEPTH__MASK 0xfff00000 #define NV40_3D_TEX_SIZE1_DEPTH__SHIFT 20 #define NV40_3D_TEX_SIZE1_PITCH__MASK 0x0000ffff #define NV40_3D_TEX_SIZE1_PITCH__SHIFT 0 #define NV30_3D_VTX_ATTR_2F(i0) (0x00001880 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_2F__ESIZE 0x00000008 #define NV30_3D_VTX_ATTR_2F__LEN 0x00000010 #define NV30_3D_VTX_ATTR_2F_X(i0) (0x00001880 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_2F_Y(i0) (0x00001884 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_2I(i0) (0x00001900 + 0x4*(i0)) #define NV30_3D_VTX_ATTR_2I__ESIZE 0x00000004 #define NV30_3D_VTX_ATTR_2I__LEN 0x00000010 #define NV30_3D_VTX_ATTR_2I_X__MASK 0x0000ffff #define NV30_3D_VTX_ATTR_2I_X__SHIFT 0 #define NV30_3D_VTX_ATTR_2I_Y__MASK 0xffff0000 #define NV30_3D_VTX_ATTR_2I_Y__SHIFT 16 #define NV30_3D_VTX_ATTR_4UB(i0) (0x00001940 + 0x4*(i0)) #define NV30_3D_VTX_ATTR_4UB__ESIZE 0x00000004 #define NV30_3D_VTX_ATTR_4UB__LEN 0x00000010 #define NV30_3D_VTX_ATTR_4UB_X__MASK 0x000000ff #define NV30_3D_VTX_ATTR_4UB_X__SHIFT 0 #define NV30_3D_VTX_ATTR_4UB_Y__MASK 0x0000ff00 #define NV30_3D_VTX_ATTR_4UB_Y__SHIFT 8 #define NV30_3D_VTX_ATTR_4UB_Z__MASK 0x00ff0000 #define NV30_3D_VTX_ATTR_4UB_Z__SHIFT 16 #define NV30_3D_VTX_ATTR_4UB_W__MASK 0xff000000 #define NV30_3D_VTX_ATTR_4UB_W__SHIFT 24 #define NV30_3D_VTX_ATTR_4I(i0) (0x00001980 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_4I__ESIZE 0x00000008 #define NV30_3D_VTX_ATTR_4I__LEN 0x00000010 #define NV30_3D_VTX_ATTR_4I_XY(i0) (0x00001980 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_4I_XY_X__MASK 0x0000ffff #define NV30_3D_VTX_ATTR_4I_XY_X__SHIFT 0 #define NV30_3D_VTX_ATTR_4I_XY_Y__MASK 0xffff0000 #define NV30_3D_VTX_ATTR_4I_XY_Y__SHIFT 16 #define NV30_3D_VTX_ATTR_4I_ZW(i0) (0x00001984 + 0x8*(i0)) #define NV30_3D_VTX_ATTR_4I_ZW_Z__MASK 0x0000ffff #define NV30_3D_VTX_ATTR_4I_ZW_Z__SHIFT 0 #define NV30_3D_VTX_ATTR_4I_ZW_W__MASK 0xffff0000 #define NV30_3D_VTX_ATTR_4I_ZW_W__SHIFT 16 #define NV30_3D_TEX_OFFSET(i0) (0x00001a00 + 0x20*(i0)) #define NV30_3D_TEX_OFFSET__ESIZE 0x00000020 #define NV30_3D_TEX_OFFSET__LEN 0x00000008 #define NV30_3D_TEX_FORMAT(i0) (0x00001a04 + 0x20*(i0)) #define NV30_3D_TEX_FORMAT__ESIZE 0x00000020 #define NV30_3D_TEX_FORMAT__LEN 0x00000008 #define NV30_3D_TEX_FORMAT_DMA0 0x00000001 #define NV30_3D_TEX_FORMAT_DMA1 0x00000002 #define NV30_3D_TEX_FORMAT_CUBIC 0x00000004 #define NV30_3D_TEX_FORMAT_NO_BORDER 0x00000008 #define NV30_3D_TEX_FORMAT_DIMS__MASK 0x000000f0 #define NV30_3D_TEX_FORMAT_DIMS__SHIFT 4 #define NV30_3D_TEX_FORMAT_DIMS_1D 0x00000010 #define NV30_3D_TEX_FORMAT_DIMS_2D 0x00000020 #define NV30_3D_TEX_FORMAT_DIMS_3D 0x00000030 #define NV30_3D_TEX_FORMAT_FORMAT__MASK 0x0000ff00 #define NV30_3D_TEX_FORMAT_FORMAT__SHIFT 8 #define NV30_3D_TEX_FORMAT_FORMAT_L8 0x00000000 #define NV30_3D_TEX_FORMAT_FORMAT_I8 0x00000100 #define NV30_3D_TEX_FORMAT_FORMAT_A1R5G5B5 0x00000200 #define NV30_3D_TEX_FORMAT_FORMAT_A4R4G4B4 0x00000400 #define NV30_3D_TEX_FORMAT_FORMAT_R5G6B5 0x00000500 #define NV30_3D_TEX_FORMAT_FORMAT_A8R8G8B8 0x00000600 #define NV30_3D_TEX_FORMAT_FORMAT_X8R8G8B8 0x00000700 #define NV30_3D_TEX_FORMAT_FORMAT_INDEX8 0x00000b00 #define NV30_3D_TEX_FORMAT_FORMAT_DXT1 0x00000c00 #define NV30_3D_TEX_FORMAT_FORMAT_DXT3 0x00000e00 #define NV30_3D_TEX_FORMAT_FORMAT_DXT5 0x00000f00 #define NV30_3D_TEX_FORMAT_FORMAT_A1R5G5B5_RECT 0x00001000 #define NV30_3D_TEX_FORMAT_FORMAT_R5G6B5_RECT 0x00001100 #define NV30_3D_TEX_FORMAT_FORMAT_A8R8G8B8_RECT 0x00001200 #define NV30_3D_TEX_FORMAT_FORMAT_L8_RECT 0x00001300 #define NV30_3D_TEX_FORMAT_FORMAT_DSDT8_RECT 0x00001700 #define NV30_3D_TEX_FORMAT_FORMAT_A8L8 0x00001a00 #define NV30_3D_TEX_FORMAT_FORMAT_I8_RECT 0x00001b00 #define NV30_3D_TEX_FORMAT_FORMAT_A4R4G4B4_RECT 0x00001d00 #define NV30_3D_TEX_FORMAT_FORMAT_R8G8B8_RECT 0x00001e00 #define NV30_3D_TEX_FORMAT_FORMAT_A8L8_RECT 0x00002000 #define NV30_3D_TEX_FORMAT_FORMAT_Z24 0x00002a00 #define NV30_3D_TEX_FORMAT_FORMAT_Z24_RECT 0x00002b00 #define NV30_3D_TEX_FORMAT_FORMAT_Z16 0x00002c00 #define NV30_3D_TEX_FORMAT_FORMAT_Z16_RECT 0x00002d00 #define NV30_3D_TEX_FORMAT_FORMAT_DSDT8 0x00002800 #define NV30_3D_TEX_FORMAT_FORMAT_HILO16 0x00003300 #define NV30_3D_TEX_FORMAT_FORMAT_HILO16_RECT 0x00003600 #define NV30_3D_TEX_FORMAT_FORMAT_HILO8 0x00004400 #define NV30_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8 0x00004500 #define NV30_3D_TEX_FORMAT_FORMAT_HILO8_RECT 0x00004600 #define NV30_3D_TEX_FORMAT_FORMAT_SIGNED_HILO8_RECT 0x00004700 #define NV30_3D_TEX_FORMAT_FORMAT_A16 0x00003200 #define NV30_3D_TEX_FORMAT_FORMAT_A16_RECT 0x00003500 #define NV30_3D_TEX_FORMAT_FORMAT_UNK3F 0x00003f00 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_RGBA16_NV 0x00004a00 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_RGBA32_NV 0x00004b00 #define NV30_3D_TEX_FORMAT_FORMAT_FLOAT_R32_NV 0x00004c00 #define NV40_3D_TEX_FORMAT_FORMAT__MASK 0x00001f00 #define NV40_3D_TEX_FORMAT_FORMAT__SHIFT 8 #define NV40_3D_TEX_FORMAT_FORMAT_L8 0x00000100 #define NV40_3D_TEX_FORMAT_FORMAT_A1R5G5B5 0x00000200 #define NV40_3D_TEX_FORMAT_FORMAT_A4R4G4B4 0x00000300 #define NV40_3D_TEX_FORMAT_FORMAT_R5G6B5 0x00000400 #define NV40_3D_TEX_FORMAT_FORMAT_A8R8G8B8 0x00000500 #define NV40_3D_TEX_FORMAT_FORMAT_DXT1 0x00000600 #define NV40_3D_TEX_FORMAT_FORMAT_DXT3 0x00000700 #define NV40_3D_TEX_FORMAT_FORMAT_DXT5 0x00000800 #define NV40_3D_TEX_FORMAT_FORMAT_A8L8 0x00000b00 #define NV40_3D_TEX_FORMAT_FORMAT_Z24 0x00001000 #define NV40_3D_TEX_FORMAT_FORMAT_Z16 0x00001200 #define NV40_3D_TEX_FORMAT_FORMAT_A16 0x00001400 #define NV40_3D_TEX_FORMAT_FORMAT_A16L16 0x00001500 #define NV40_3D_TEX_FORMAT_FORMAT_HILO8 0x00001800 #define NV40_3D_TEX_FORMAT_FORMAT_RGBA16F 0x00001a00 #define NV40_3D_TEX_FORMAT_FORMAT_RGBA32F 0x00001b00 #define NV40_3D_TEX_FORMAT_LINEAR 0x00002000 #define NV40_3D_TEX_FORMAT_RECT 0x00004000 #define NV40_3D_TEX_FORMAT_MIPMAP_COUNT__MASK 0x000f0000 #define NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT 16 #define NV30_3D_TEX_FORMAT_MIPMAP 0x00080000 #define NV30_3D_TEX_FORMAT_BASE_SIZE_U__MASK 0x00f00000 #define NV30_3D_TEX_FORMAT_BASE_SIZE_U__SHIFT 20 #define NV30_3D_TEX_FORMAT_BASE_SIZE_V__MASK 0x0f000000 #define NV30_3D_TEX_FORMAT_BASE_SIZE_V__SHIFT 24 #define NV30_3D_TEX_FORMAT_BASE_SIZE_W__MASK 0xf0000000 #define NV30_3D_TEX_FORMAT_BASE_SIZE_W__SHIFT 28 #define NV30_3D_TEX_WRAP(i0) (0x00001a08 + 0x20*(i0)) #define NV30_3D_TEX_WRAP__ESIZE 0x00000020 #define NV30_3D_TEX_WRAP__LEN 0x00000008 #define NV30_3D_TEX_WRAP_S__MASK 0x000000ff #define NV30_3D_TEX_WRAP_S__SHIFT 0 #define NV30_3D_TEX_WRAP_S_REPEAT 0x00000001 #define NV30_3D_TEX_WRAP_S_MIRRORED_REPEAT 0x00000002 #define NV30_3D_TEX_WRAP_S_CLAMP_TO_EDGE 0x00000003 #define NV30_3D_TEX_WRAP_S_CLAMP_TO_BORDER 0x00000004 #define NV30_3D_TEX_WRAP_S_CLAMP 0x00000005 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP_TO_EDGE 0x00000006 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP_TO_BORDER 0x00000007 #define NV40_3D_TEX_WRAP_S_MIRROR_CLAMP 0x00000008 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION__MASK 0x00000070 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION__SHIFT 4 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_OFF 0x00000000 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_QUALITY 0x00000020 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_PERFORMANCE 0x00000030 #define NV40_3D_TEX_WRAP_ANISO_MIP_FILTER_OPTIMIZATION_HIGH_PERFORMANCE 0x00000070 #define NV30_3D_TEX_WRAP_T__MASK 0x00000f00 #define NV30_3D_TEX_WRAP_T__SHIFT 8 #define NV30_3D_TEX_WRAP_T_REPEAT 0x00000100 #define NV30_3D_TEX_WRAP_T_MIRRORED_REPEAT 0x00000200 #define NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE 0x00000300 #define NV30_3D_TEX_WRAP_T_CLAMP_TO_BORDER 0x00000400 #define NV30_3D_TEX_WRAP_T_CLAMP 0x00000500 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP_TO_EDGE 0x00000600 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP_TO_BORDER 0x00000700 #define NV40_3D_TEX_WRAP_T_MIRROR_CLAMP 0x00000800 #define NV30_3D_TEX_WRAP_EXPAND_NORMAL 0x0000f000 #define NV30_3D_TEX_WRAP_R__MASK 0x000f0000 #define NV30_3D_TEX_WRAP_R__SHIFT 16 #define NV30_3D_TEX_WRAP_R_REPEAT 0x00010000 #define NV30_3D_TEX_WRAP_R_MIRRORED_REPEAT 0x00020000 #define NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE 0x00030000 #define NV30_3D_TEX_WRAP_R_CLAMP_TO_BORDER 0x00040000 #define NV30_3D_TEX_WRAP_R_CLAMP 0x00050000 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP_TO_EDGE 0x00060000 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP_TO_BORDER 0x00070000 #define NV40_3D_TEX_WRAP_R_MIRROR_CLAMP 0x00080000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER__MASK 0x00f00000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER__SHIFT 20 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_NONE 0x00000000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_RED 0x00100000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_GREEN 0x00200000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_BLUE 0x00400000 #define NV40_3D_TEX_WRAP_GAMMA_DECREASE_FILTER_ALL 0x00f00000 #define NV30_3D_TEX_WRAP_RCOMP__MASK 0xf0000000 #define NV30_3D_TEX_WRAP_RCOMP__SHIFT 28 #define NV30_3D_TEX_WRAP_RCOMP_NEVER 0x00000000 #define NV30_3D_TEX_WRAP_RCOMP_GREATER 0x10000000 #define NV30_3D_TEX_WRAP_RCOMP_EQUAL 0x20000000 #define NV30_3D_TEX_WRAP_RCOMP_GEQUAL 0x30000000 #define NV30_3D_TEX_WRAP_RCOMP_LESS 0x40000000 #define NV30_3D_TEX_WRAP_RCOMP_NOTEQUAL 0x50000000 #define NV30_3D_TEX_WRAP_RCOMP_LEQUAL 0x60000000 #define NV30_3D_TEX_WRAP_RCOMP_ALWAYS 0x70000000 #define NV30_3D_TEX_ENABLE(i0) (0x00001a0c + 0x20*(i0)) #define NV30_3D_TEX_ENABLE__ESIZE 0x00000020 #define NV30_3D_TEX_ENABLE__LEN 0x00000008 #define NV30_3D_TEX_ENABLE_ANISO__MASK 0x00000030 #define NV30_3D_TEX_ENABLE_ANISO__SHIFT 4 #define NV30_3D_TEX_ENABLE_ANISO_NONE 0x00000000 #define NV30_3D_TEX_ENABLE_ANISO_2X 0x00000010 #define NV30_3D_TEX_ENABLE_ANISO_4X 0x00000020 #define NV30_3D_TEX_ENABLE_ANISO_8X 0x00000030 #define NV40_3D_TEX_ENABLE_ANISO__MASK 0x000000f0 #define NV40_3D_TEX_ENABLE_ANISO__SHIFT 4 #define NV40_3D_TEX_ENABLE_ANISO_NONE 0x00000000 #define NV40_3D_TEX_ENABLE_ANISO_2X 0x00000010 #define NV40_3D_TEX_ENABLE_ANISO_4X 0x00000020 #define NV40_3D_TEX_ENABLE_ANISO_6X 0x00000030 #define NV40_3D_TEX_ENABLE_ANISO_8X 0x00000040 #define NV40_3D_TEX_ENABLE_ANISO_10X 0x00000050 #define NV40_3D_TEX_ENABLE_ANISO_12X 0x00000060 #define NV40_3D_TEX_ENABLE_ANISO_16X 0x00000070 #define NV30_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK 0x0003c000 #define NV30_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT 14 #define NV40_3D_TEX_ENABLE_MIPMAP_MAX_LOD__MASK 0x00038000 #define NV40_3D_TEX_ENABLE_MIPMAP_MAX_LOD__SHIFT 15 #define NV30_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK 0x3c000000 #define NV30_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT 26 #define NV40_3D_TEX_ENABLE_MIPMAP_MIN_LOD__MASK 0x38000000 #define NV40_3D_TEX_ENABLE_MIPMAP_MIN_LOD__SHIFT 27 #define NV30_3D_TEX_ENABLE_ENABLE 0x40000000 #define NV40_3D_TEX_ENABLE_ENABLE 0x80000000 #define NV30_3D_TEX_SWIZZLE(i0) (0x00001a10 + 0x20*(i0)) #define NV30_3D_TEX_SWIZZLE__ESIZE 0x00000020 #define NV30_3D_TEX_SWIZZLE__LEN 0x00000008 #define NV30_3D_TEX_SWIZZLE_S1_W__MASK 0x00000003 #define NV30_3D_TEX_SWIZZLE_S1_W__SHIFT 0 #define NV30_3D_TEX_SWIZZLE_S1_W_W 0x00000000 #define NV30_3D_TEX_SWIZZLE_S1_W_Z 0x00000001 #define NV30_3D_TEX_SWIZZLE_S1_W_Y 0x00000002 #define NV30_3D_TEX_SWIZZLE_S1_W_X 0x00000003 #define NV30_3D_TEX_SWIZZLE_S1_Z__MASK 0x0000000c #define NV30_3D_TEX_SWIZZLE_S1_Z__SHIFT 2 #define NV30_3D_TEX_SWIZZLE_S1_Z_W 0x00000000 #define NV30_3D_TEX_SWIZZLE_S1_Z_Z 0x00000004 #define NV30_3D_TEX_SWIZZLE_S1_Z_Y 0x00000008 #define NV30_3D_TEX_SWIZZLE_S1_Z_X 0x0000000c #define NV30_3D_TEX_SWIZZLE_S1_Y__MASK 0x00000030 #define NV30_3D_TEX_SWIZZLE_S1_Y__SHIFT 4 #define NV30_3D_TEX_SWIZZLE_S1_Y_W 0x00000000 #define NV30_3D_TEX_SWIZZLE_S1_Y_Z 0x00000010 #define NV30_3D_TEX_SWIZZLE_S1_Y_Y 0x00000020 #define NV30_3D_TEX_SWIZZLE_S1_Y_X 0x00000030 #define NV30_3D_TEX_SWIZZLE_S1_X__MASK 0x000000c0 #define NV30_3D_TEX_SWIZZLE_S1_X__SHIFT 6 #define NV30_3D_TEX_SWIZZLE_S1_X_W 0x00000000 #define NV30_3D_TEX_SWIZZLE_S1_X_Z 0x00000040 #define NV30_3D_TEX_SWIZZLE_S1_X_Y 0x00000080 #define NV30_3D_TEX_SWIZZLE_S1_X_X 0x000000c0 #define NV30_3D_TEX_SWIZZLE_S0_W__MASK 0x00000300 #define NV30_3D_TEX_SWIZZLE_S0_W__SHIFT 8 #define NV30_3D_TEX_SWIZZLE_S0_W_ZERO 0x00000000 #define NV30_3D_TEX_SWIZZLE_S0_W_ONE 0x00000100 #define NV30_3D_TEX_SWIZZLE_S0_W_S1 0x00000200 #define NV30_3D_TEX_SWIZZLE_S0_Z__MASK 0x00000c00 #define NV30_3D_TEX_SWIZZLE_S0_Z__SHIFT 10 #define NV30_3D_TEX_SWIZZLE_S0_Z_ZERO 0x00000000 #define NV30_3D_TEX_SWIZZLE_S0_Z_ONE 0x00000400 #define NV30_3D_TEX_SWIZZLE_S0_Z_S1 0x00000800 #define NV30_3D_TEX_SWIZZLE_S0_Y__MASK 0x00003000 #define NV30_3D_TEX_SWIZZLE_S0_Y__SHIFT 12 #define NV30_3D_TEX_SWIZZLE_S0_Y_ZERO 0x00000000 #define NV30_3D_TEX_SWIZZLE_S0_Y_ONE 0x00001000 #define NV30_3D_TEX_SWIZZLE_S0_Y_S1 0x00002000 #define NV30_3D_TEX_SWIZZLE_S0_X__MASK 0x0000c000 #define NV30_3D_TEX_SWIZZLE_S0_X__SHIFT 14 #define NV30_3D_TEX_SWIZZLE_S0_X_ZERO 0x00000000 #define NV30_3D_TEX_SWIZZLE_S0_X_ONE 0x00004000 #define NV30_3D_TEX_SWIZZLE_S0_X_S1 0x00008000 #define NV30_3D_TEX_SWIZZLE_RECT_PITCH__MASK 0xffff0000 #define NV30_3D_TEX_SWIZZLE_RECT_PITCH__SHIFT 16 #define NV30_3D_TEX_FILTER(i0) (0x00001a14 + 0x20*(i0)) #define NV30_3D_TEX_FILTER__ESIZE 0x00000020 #define NV30_3D_TEX_FILTER__LEN 0x00000008 #define NV30_3D_TEX_FILTER_LOD_BIAS__MASK 0x00000f00 #define NV30_3D_TEX_FILTER_LOD_BIAS__SHIFT 8 #define NV30_3D_TEX_FILTER_MIN__MASK 0x000f0000 #define NV30_3D_TEX_FILTER_MIN__SHIFT 16 #define NV30_3D_TEX_FILTER_MIN_NEAREST 0x00010000 #define NV30_3D_TEX_FILTER_MIN_LINEAR 0x00020000 #define NV30_3D_TEX_FILTER_MIN_NEAREST_MIPMAP_NEAREST 0x00030000 #define NV30_3D_TEX_FILTER_MIN_LINEAR_MIPMAP_NEAREST 0x00040000 #define NV30_3D_TEX_FILTER_MIN_NEAREST_MIPMAP_LINEAR 0x00050000 #define NV30_3D_TEX_FILTER_MIN_LINEAR_MIPMAP_LINEAR 0x00060000 #define NV30_3D_TEX_FILTER_MAG__MASK 0x0f000000 #define NV30_3D_TEX_FILTER_MAG__SHIFT 24 #define NV30_3D_TEX_FILTER_MAG_NEAREST 0x01000000 #define NV30_3D_TEX_FILTER_MAG_LINEAR 0x02000000 #define NV30_3D_TEX_FILTER_SIGNED_BLUE 0x10000000 #define NV30_3D_TEX_FILTER_SIGNED_GREEN 0x20000000 #define NV30_3D_TEX_FILTER_SIGNED_RED 0x40000000 #define NV30_3D_TEX_FILTER_SIGNED_ALPHA 0x80000000 #define NV30_3D_TEX_NPOT_SIZE(i0) (0x00001a18 + 0x20*(i0)) #define NV30_3D_TEX_NPOT_SIZE__ESIZE 0x00000020 #define NV30_3D_TEX_NPOT_SIZE__LEN 0x00000008 #define NV30_3D_TEX_NPOT_SIZE_H__MASK 0x0000ffff #define NV30_3D_TEX_NPOT_SIZE_H__SHIFT 0 #define NV30_3D_TEX_NPOT_SIZE_W__MASK 0xffff0000 #define NV30_3D_TEX_NPOT_SIZE_W__SHIFT 16 #define NV30_3D_TEX_BORDER_COLOR(i0) (0x00001a1c + 0x20*(i0)) #define NV30_3D_TEX_BORDER_COLOR__ESIZE 0x00000020 #define NV30_3D_TEX_BORDER_COLOR__LEN 0x00000008 #define NV30_3D_TEX_BORDER_COLOR_B__MASK 0x000000ff #define NV30_3D_TEX_BORDER_COLOR_B__SHIFT 0 #define NV30_3D_TEX_BORDER_COLOR_G__MASK 0x0000ff00 #define NV30_3D_TEX_BORDER_COLOR_G__SHIFT 8 #define NV30_3D_TEX_BORDER_COLOR_R__MASK 0x00ff0000 #define NV30_3D_TEX_BORDER_COLOR_R__SHIFT 16 #define NV30_3D_TEX_BORDER_COLOR_A__MASK 0xff000000 #define NV30_3D_TEX_BORDER_COLOR_A__SHIFT 24 #define NV30_3D_VTX_ATTR_4F(i0) (0x00001c00 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_4F__ESIZE 0x00000010 #define NV30_3D_VTX_ATTR_4F__LEN 0x00000010 #define NV30_3D_VTX_ATTR_4F_X(i0) (0x00001c00 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_4F_Y(i0) (0x00001c04 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_4F_Z(i0) (0x00001c08 + 0x10*(i0)) #define NV30_3D_VTX_ATTR_4F_W(i0) (0x00001c0c + 0x10*(i0)) #define NV30_3D_FP_CONTROL 0x00001d60 #define NV30_3D_FP_CONTROL_USED_REGS_MINUS1_DIV2__MASK 0x0000000f #define NV30_3D_FP_CONTROL_USED_REGS_MINUS1_DIV2__SHIFT 0 #define NV30_3D_FP_CONTROL_USES_KIL 0x00000080 #define NV40_3D_FP_CONTROL_KIL 0x00000080 #define NV40_3D_FP_CONTROL_TEMP_COUNT__MASK 0xff000000 #define NV40_3D_FP_CONTROL_TEMP_COUNT__SHIFT 24 #define NV30_3D_DEPTH_CONTROL 0x00001d78 #define NV30_3D_DEPTH_CONTROL_CLAMP 0x000000f0 #define NV30_3D_MULTISAMPLE_CONTROL 0x00001d7c #define NV30_3D_MULTISAMPLE_CONTROL_ENABLE 0x00000001 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_ALPHA_TO_COVERAGE 0x00000010 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_ALPHA_TO_ONE 0x00000100 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_COVERAGE__MASK 0xffff0000 #define NV30_3D_MULTISAMPLE_CONTROL_SAMPLE_COVERAGE__SHIFT 16 #define NV30_3D_COORD_CONVENTIONS 0x00001d88 #define NV30_3D_COORD_CONVENTIONS_HEIGHT__MASK 0x00000fff #define NV30_3D_COORD_CONVENTIONS_HEIGHT__SHIFT 0 #define NV30_3D_COORD_CONVENTIONS_ORIGIN__MASK 0x00001000 #define NV30_3D_COORD_CONVENTIONS_ORIGIN__SHIFT 12 #define NV30_3D_COORD_CONVENTIONS_ORIGIN_NORMAL 0x00000000 #define NV30_3D_COORD_CONVENTIONS_ORIGIN_INVERTED 0x00001000 #define NV30_3D_COORD_CONVENTIONS_CENTER__MASK 0x00010000 #define NV30_3D_COORD_CONVENTIONS_CENTER__SHIFT 16 #define NV30_3D_COORD_CONVENTIONS_CENTER_HALF_INTEGER 0x00000000 #define NV30_3D_COORD_CONVENTIONS_CENTER_INTEGER 0x00010000 #define NV30_3D_CLEAR_DEPTH_VALUE 0x00001d8c #define NV30_3D_CLEAR_COLOR_VALUE 0x00001d90 #define NV30_3D_CLEAR_COLOR_VALUE_B__MASK 0x000000ff #define NV30_3D_CLEAR_COLOR_VALUE_B__SHIFT 0 #define NV30_3D_CLEAR_COLOR_VALUE_G__MASK 0x0000ff00 #define NV30_3D_CLEAR_COLOR_VALUE_G__SHIFT 8 #define NV30_3D_CLEAR_COLOR_VALUE_R__MASK 0x00ff0000 #define NV30_3D_CLEAR_COLOR_VALUE_R__SHIFT 16 #define NV30_3D_CLEAR_COLOR_VALUE_A__MASK 0xff000000 #define NV30_3D_CLEAR_COLOR_VALUE_A__SHIFT 24 #define NV30_3D_CLEAR_BUFFERS 0x00001d94 #define NV30_3D_CLEAR_BUFFERS_DEPTH 0x00000001 #define NV30_3D_CLEAR_BUFFERS_STENCIL 0x00000002 #define NV30_3D_CLEAR_BUFFERS_COLOR_R 0x00000010 #define NV30_3D_CLEAR_BUFFERS_COLOR_G 0x00000020 #define NV30_3D_CLEAR_BUFFERS_COLOR_B 0x00000040 #define NV30_3D_CLEAR_BUFFERS_COLOR_A 0x00000080 #define NV30_3D_PRIMITIVE_RESTART_ENABLE 0x00001dac #define NV30_3D_PRIMITIVE_RESTART_INDEX 0x00001db0 #define NV30_3D_LINE_STIPPLE_ENABLE 0x00001db4 #define NV30_3D_LINE_STIPPLE_PATTERN 0x00001db8 #define NV30_3D_LINE_STIPPLE_PATTERN_FACTOR__MASK 0x0000ffff #define NV30_3D_LINE_STIPPLE_PATTERN_FACTOR__SHIFT 0 #define NV30_3D_LINE_STIPPLE_PATTERN_PATTERN__MASK 0xffff0000 #define NV30_3D_LINE_STIPPLE_PATTERN_PATTERN__SHIFT 16 #define NV30_3D_BACK_MATERIAL_SHININESS(i0) (0x00001e20 + 0x4*(i0)) #define NV30_3D_BACK_MATERIAL_SHININESS__ESIZE 0x00000004 #define NV30_3D_BACK_MATERIAL_SHININESS__LEN 0x00000006 #define NV30_3D_VTX_ATTR_1F(i0) (0x00001e40 + 0x4*(i0)) #define NV30_3D_VTX_ATTR_1F__ESIZE 0x00000004 #define NV30_3D_VTX_ATTR_1F__LEN 0x00000010 #define NV30_3D_ENGINE 0x00001e94 #define NV30_3D_ENGINE_FP 0x00000001 #define NV30_3D_ENGINE_VP 0x00000002 #define NV30_3D_ENGINE_FIXED 0x00000004 #define NV30_3D_VP_UPLOAD_FROM_ID 0x00001e9c #define NV30_3D_VP_START_FROM_ID 0x00001ea0 #define NV30_3D_POINT_PARAMETERS(i0) (0x00001ec0 + 0x4*(i0)) #define NV30_3D_POINT_PARAMETERS__ESIZE 0x00000004 #define NV30_3D_POINT_PARAMETERS__LEN 0x00000008 #define NV30_3D_POINT_SIZE 0x00001ee0 #define NV30_3D_POINT_PARAMETERS_ENABLE 0x00001ee4 #define NV30_3D_POINT_SPRITE 0x00001ee8 #define NV30_3D_POINT_SPRITE_ENABLE 0x00000001 #define NV30_3D_POINT_SPRITE_R_MODE__MASK 0x00000006 #define NV30_3D_POINT_SPRITE_R_MODE__SHIFT 1 #define NV30_3D_POINT_SPRITE_R_MODE_ZERO 0x00000000 #define NV30_3D_POINT_SPRITE_R_MODE_R 0x00000002 #define NV30_3D_POINT_SPRITE_R_MODE_S 0x00000004 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_0 0x00000100 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_1 0x00000200 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_2 0x00000400 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_3 0x00000800 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_4 0x00001000 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_5 0x00002000 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_6 0x00004000 #define NV30_3D_POINT_SPRITE_COORD_REPLACE_7 0x00008000 #define NV30_3D_VP_UPLOAD_CONST_ID 0x00001efc #define NV30_3D_VP_UPLOAD_CONST(i0) (0x00001f00 + 0x10*(i0)) #define NV30_3D_VP_UPLOAD_CONST__ESIZE 0x00000010 #define NV30_3D_VP_UPLOAD_CONST__LEN 0x00000004 #define NV30_3D_VP_UPLOAD_CONST_X(i0) (0x00001f00 + 0x10*(i0)) #define NV30_3D_VP_UPLOAD_CONST_Y(i0) (0x00001f04 + 0x10*(i0)) #define NV30_3D_VP_UPLOAD_CONST_Z(i0) (0x00001f08 + 0x10*(i0)) #define NV30_3D_VP_UPLOAD_CONST_W(i0) (0x00001f0c + 0x10*(i0)) #define NV30_3D_UNK1F80(i0) (0x00001f80 + 0x4*(i0)) #define NV30_3D_UNK1F80__ESIZE 0x00000004 #define NV30_3D_UNK1F80__LEN 0x00000010 #define NV40_3D_TEX_CACHE_CTL 0x00001fd8 #define NV40_3D_VP_ATTRIB_EN 0x00001ff0 #define NV40_3D_VP_RESULT_EN 0x00001ff4 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV30_40_3D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv50_3d.xml.h0000644000175000017500000026061714713424663015064 #ifndef _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_3D_XML #define _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_3D_XML /* Autogenerated file, DO NOT EDIT manually! This file was generated by the rules-ng-ng headergen tool in this git repository: http://0x04.net/cgit/index.cgi/rules-ng-ng git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: - /home/skeggsb/git/envytools/rnndb/nv_objects.xml ( 794 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/copyright.xml ( 6452 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_m2mf.xml ( 2696 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_object.xml ( 12672 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvchipsets.xml ( 3617 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_defs.xml ( 4437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_defs.xml ( 5468 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_m2mf.xml ( 2687 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv01_2d.xml ( 32584 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_dvd.xml ( 3000 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv03_3d.xml ( 5209 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv04_3d.xml ( 17759 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv_3ddefs.xml ( 16394 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv10_3d.xml ( 18437 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv20_3d.xml ( 21107 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv30-40_3d.xml ( 31987 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_2d.xml ( 11113 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv50_3d.xml ( 65233 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv50_compute.xml ( 14012 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nv84_crypt.xml ( 2071 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nv31_mpeg.xml ( 2269 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/nvc0_3d.xml ( 52547 bytes, from 2011-11-30 05:49:35) - /home/skeggsb/git/envytools/rnndb/nvc0_compute.xml ( 10865 bytes, from 2011-10-22 08:01:09) - /home/skeggsb/git/envytools/rnndb/blob_nvc0_pcopy.xml ( 4516 bytes, from 2011-10-22 08:01:09) Copyright (C) 2006-2011 by the following authors: - Artur Huillet (ahuillet) - Ben Skeggs (darktama, darktama_) - B. R. (koala_br) - Carlos Martin (carlosmn) - Christoph Bumiller (calim, chrisbmr) - Dawid Gajownik (gajownik) - Dmitry Baryshkov - Dmitry Eremin-Solenikov (lumag) - EdB (edb_) - Erik Waling (erikwaling) - Francisco Jerez (curro) - imirkin (imirkin) - jb17bsome (jb17bsome) - Jeremy Kolb (kjeremy) - Laurent Carlier (lordheavy) - Luca Barbieri (lb, lb1) - Maarten Maathuis (stillunknown) - Marcin Kościelnicki (mwk, koriakin) - Mark Carey (careym) - Matthieu Castet (mat-c) - nvidiaman (nvidiaman) - Patrice Mandin (pmandin, pmdata) - Pekka Paalanen (pq, ppaalanen) - Peter Popov (ironpeter) - Richard Hughes (hughsient) - Rudi Cilibrasi (cilibrar) - Serge Martin - Simon Raffeiner - Stephane Loeuillet (leroutier) - Stephane Marchesin (marcheu) - sturmflut (sturmflut) - Sylvain Munaut - Victor Stinner (haypo) - Wladmir van der Laan (miathan6) - Younes Manton (ymanton) 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 the rights to use, copy, modify, merge, publish, distribute, sublicense, 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 NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS 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. */ #define NV50_3D_DMA_NOTIFY 0x00000180 #define NV50_3D_DMA_ZETA 0x00000184 #define NV50_3D_DMA_QUERY 0x00000188 #define NV50_3D_DMA_VTXBUF 0x0000018c #define NV50_3D_DMA_LOCAL 0x00000190 #define NV50_3D_DMA_STACK 0x00000194 #define NV50_3D_DMA_CODE_CB 0x00000198 #define NV50_3D_DMA_TSC 0x0000019c #define NV50_3D_DMA_TIC 0x000001a0 #define NV50_3D_DMA_TEXTURE 0x000001a4 #define NV50_3D_DMA_STRMOUT 0x000001a8 #define NV50_3D_DMA_CLIPID 0x000001ac #define NV50_3D_DMA_COLOR(i0) (0x000001c0 + 0x4*(i0)) #define NV50_3D_DMA_COLOR__ESIZE 0x00000004 #define NV50_3D_DMA_COLOR__LEN 0x00000008 #define NV50_3D_RT(i0) (0x00000200 + 0x20*(i0)) #define NV50_3D_RT__ESIZE 0x00000020 #define NV50_3D_RT__LEN 0x00000008 #define NV50_3D_RT_ADDRESS_HIGH(i0) (0x00000200 + 0x20*(i0)) #define NV50_3D_RT_ADDRESS_LOW(i0) (0x00000204 + 0x20*(i0)) #define NV50_3D_RT_FORMAT(i0) (0x00000208 + 0x20*(i0)) #define NV50_3D_RT_TILE_MODE(i0) (0x0000020c + 0x20*(i0)) #define NV50_3D_RT_TILE_MODE_X__MASK 0x0000000f #define NV50_3D_RT_TILE_MODE_X__SHIFT 0 #define NV50_3D_RT_TILE_MODE_Y__MASK 0x000000f0 #define NV50_3D_RT_TILE_MODE_Y__SHIFT 4 #define NV50_3D_RT_TILE_MODE_Z__MASK 0x00000f00 #define NV50_3D_RT_TILE_MODE_Z__SHIFT 8 #define NV50_3D_RT_LAYER_STRIDE(i0) (0x00000210 + 0x20*(i0)) #define NV50_3D_RT_LAYER_STRIDE__SHR 2 #define NV50_3D_RT_UNK14(i0) (0x00000214 + 0x20*(i0)) #define NV50_3D_VTX_ATTR_1F(i0) (0x00000300 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_1F__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_1F__LEN 0x00000010 #define NV50_3D_VTX_ATTR_2H(i0) (0x00000340 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_2H__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_2H__LEN 0x00000010 #define NV50_3D_VTX_ATTR_2H_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_2H_X__SHIFT 0 #define NV50_3D_VTX_ATTR_2H_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_2H_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_2F_X(i0) (0x00000380 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_2F_X__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_2F_X__LEN 0x00000010 #define NV50_3D_VTX_ATTR_2F_Y(i0) (0x00000384 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_2F_Y__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_2F_Y__LEN 0x00000010 #define NV50_3D_VTX_ATTR_3F_X(i0) (0x00000400 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_3F_X__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_3F_X__LEN 0x00000010 #define NV50_3D_VTX_ATTR_3F_Y(i0) (0x00000404 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_3F_Y__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_3F_Y__LEN 0x00000010 #define NV50_3D_VTX_ATTR_3F_Z(i0) (0x00000408 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_3F_Z__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_3F_Z__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4F_X(i0) (0x00000500 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_4F_X__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_4F_X__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4F_Y(i0) (0x00000504 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_4F_Y__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_4F_Y__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4F_Z(i0) (0x00000508 + 0x10*(i0)) #define NV50_3D_VTX_ATTR_4F_Z__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_4F_Z__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4F_W(i0) (0x0000050c + 0x10*(i0)) #define NV50_3D_VTX_ATTR_4F_W__ESIZE 0x00000010 #define NV50_3D_VTX_ATTR_4F_W__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4H_0(i0) (0x00000600 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4H_0__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4H_0__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4H_0_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4H_0_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4H_0_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4H_0_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_4H_1(i0) (0x00000604 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4H_1__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4H_1__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4H_1_Z__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4H_1_Z__SHIFT 0 #define NV50_3D_VTX_ATTR_4H_1_W__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4H_1_W__SHIFT 16 #define NV50_3D_VTX_ATTR_2I(i0) (0x00000680 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_2I__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_2I__LEN 0x00000010 #define NV50_3D_VTX_ATTR_2I_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_2I_X__SHIFT 0 #define NV50_3D_VTX_ATTR_2I_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_2I_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_2NI(i0) (0x000006c0 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_2NI__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_2NI__LEN 0x00000010 #define NV50_3D_VTX_ATTR_2NI_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_2NI_X__SHIFT 0 #define NV50_3D_VTX_ATTR_2NI_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_2NI_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_4I_0(i0) (0x00000700 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4I_0__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4I_0__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4I_0_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4I_0_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4I_0_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4I_0_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_4I_1(i0) (0x00000704 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4I_1__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4I_1__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4I_1_Z__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4I_1_Z__SHIFT 0 #define NV50_3D_VTX_ATTR_4I_1_W__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4I_1_W__SHIFT 16 #define NV50_3D_VTX_ATTR_4NI_0(i0) (0x00000780 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4NI_0__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4NI_0__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4NI_0_X__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4NI_0_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4NI_0_Y__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4NI_0_Y__SHIFT 16 #define NV50_3D_VTX_ATTR_4NI_1(i0) (0x00000784 + 0x8*(i0)) #define NV50_3D_VTX_ATTR_4NI_1__ESIZE 0x00000008 #define NV50_3D_VTX_ATTR_4NI_1__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4NI_1_Z__MASK 0x0000ffff #define NV50_3D_VTX_ATTR_4NI_1_Z__SHIFT 0 #define NV50_3D_VTX_ATTR_4NI_1_W__MASK 0xffff0000 #define NV50_3D_VTX_ATTR_4NI_1_W__SHIFT 16 #define NV50_3D_VTX_ATTR_4UB(i0) (0x00000800 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_4UB__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_4UB__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4UB_X__MASK 0x000000ff #define NV50_3D_VTX_ATTR_4UB_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4UB_Y__MASK 0x0000ff00 #define NV50_3D_VTX_ATTR_4UB_Y__SHIFT 8 #define NV50_3D_VTX_ATTR_4UB_Z__MASK 0x00ff0000 #define NV50_3D_VTX_ATTR_4UB_Z__SHIFT 16 #define NV50_3D_VTX_ATTR_4UB_W__MASK 0xff000000 #define NV50_3D_VTX_ATTR_4UB_W__SHIFT 24 #define NV50_3D_VTX_ATTR_4B(i0) (0x00000840 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_4B__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_4B__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4B_X__MASK 0x000000ff #define NV50_3D_VTX_ATTR_4B_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4B_Y__MASK 0x0000ff00 #define NV50_3D_VTX_ATTR_4B_Y__SHIFT 8 #define NV50_3D_VTX_ATTR_4B_Z__MASK 0x00ff0000 #define NV50_3D_VTX_ATTR_4B_Z__SHIFT 16 #define NV50_3D_VTX_ATTR_4B_W__MASK 0xff000000 #define NV50_3D_VTX_ATTR_4B_W__SHIFT 24 #define NV50_3D_VTX_ATTR_4NUB(i0) (0x00000880 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_4NUB__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_4NUB__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4NUB_X__MASK 0x000000ff #define NV50_3D_VTX_ATTR_4NUB_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4NUB_Y__MASK 0x0000ff00 #define NV50_3D_VTX_ATTR_4NUB_Y__SHIFT 8 #define NV50_3D_VTX_ATTR_4NUB_Z__MASK 0x00ff0000 #define NV50_3D_VTX_ATTR_4NUB_Z__SHIFT 16 #define NV50_3D_VTX_ATTR_4NUB_W__MASK 0xff000000 #define NV50_3D_VTX_ATTR_4NUB_W__SHIFT 24 #define NV50_3D_VTX_ATTR_4NB(i0) (0x000008c0 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_4NB__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_4NB__LEN 0x00000010 #define NV50_3D_VTX_ATTR_4NB_X__MASK 0x000000ff #define NV50_3D_VTX_ATTR_4NB_X__SHIFT 0 #define NV50_3D_VTX_ATTR_4NB_Y__MASK 0x0000ff00 #define NV50_3D_VTX_ATTR_4NB_Y__SHIFT 8 #define NV50_3D_VTX_ATTR_4NB_Z__MASK 0x00ff0000 #define NV50_3D_VTX_ATTR_4NB_Z__SHIFT 16 #define NV50_3D_VTX_ATTR_4NB_W__MASK 0xff000000 #define NV50_3D_VTX_ATTR_4NB_W__SHIFT 24 #define NV50_3D_VERTEX_ARRAY_FETCH(i0) (0x00000900 + 0x10*(i0)) #define NV50_3D_VERTEX_ARRAY_FETCH__ESIZE 0x00000010 #define NV50_3D_VERTEX_ARRAY_FETCH__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_FETCH_STRIDE__MASK 0x00000fff #define NV50_3D_VERTEX_ARRAY_FETCH_STRIDE__SHIFT 0 #define NV50_3D_VERTEX_ARRAY_FETCH_ENABLE 0x20000000 #define NV50_3D_VERTEX_ARRAY_START_HIGH(i0) (0x00000904 + 0x10*(i0)) #define NV50_3D_VERTEX_ARRAY_START_HIGH__ESIZE 0x00000010 #define NV50_3D_VERTEX_ARRAY_START_HIGH__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_START_LOW(i0) (0x00000908 + 0x10*(i0)) #define NV50_3D_VERTEX_ARRAY_START_LOW__ESIZE 0x00000010 #define NV50_3D_VERTEX_ARRAY_START_LOW__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_DIVISOR(i0) (0x0000090c + 0x10*(i0)) #define NV50_3D_VERTEX_ARRAY_DIVISOR__ESIZE 0x00000010 #define NV50_3D_VERTEX_ARRAY_DIVISOR__LEN 0x00000010 #define NV50_3D_VIEWPORT_SCALE_X(i0) (0x00000a00 + 0x20*(i0)) #define NV50_3D_VIEWPORT_SCALE_X__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_SCALE_X__LEN 0x00000010 #define NV50_3D_VIEWPORT_SCALE_Y(i0) (0x00000a04 + 0x20*(i0)) #define NV50_3D_VIEWPORT_SCALE_Y__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_SCALE_Y__LEN 0x00000010 #define NV50_3D_VIEWPORT_SCALE_Z(i0) (0x00000a08 + 0x20*(i0)) #define NV50_3D_VIEWPORT_SCALE_Z__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_SCALE_Z__LEN 0x00000010 #define NV50_3D_VIEWPORT_TRANSLATE_X(i0) (0x00000a0c + 0x20*(i0)) #define NV50_3D_VIEWPORT_TRANSLATE_X__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_TRANSLATE_X__LEN 0x00000010 #define NV50_3D_VIEWPORT_TRANSLATE_Y(i0) (0x00000a10 + 0x20*(i0)) #define NV50_3D_VIEWPORT_TRANSLATE_Y__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_TRANSLATE_Y__LEN 0x00000010 #define NV50_3D_VIEWPORT_TRANSLATE_Z(i0) (0x00000a14 + 0x20*(i0)) #define NV50_3D_VIEWPORT_TRANSLATE_Z__ESIZE 0x00000020 #define NV50_3D_VIEWPORT_TRANSLATE_Z__LEN 0x00000010 #define NV50_3D_VIEWPORT_HORIZ(i0) (0x00000c00 + 0x10*(i0)) #define NV50_3D_VIEWPORT_HORIZ__ESIZE 0x00000010 #define NV50_3D_VIEWPORT_HORIZ__LEN 0x00000010 #define NV50_3D_VIEWPORT_HORIZ_X__MASK 0x0000ffff #define NV50_3D_VIEWPORT_HORIZ_X__SHIFT 0 #define NV50_3D_VIEWPORT_HORIZ_W__MASK 0xffff0000 #define NV50_3D_VIEWPORT_HORIZ_W__SHIFT 16 #define NV50_3D_VIEWPORT_VERT(i0) (0x00000c04 + 0x10*(i0)) #define NV50_3D_VIEWPORT_VERT__ESIZE 0x00000010 #define NV50_3D_VIEWPORT_VERT__LEN 0x00000010 #define NV50_3D_VIEWPORT_VERT_Y__MASK 0x0000ffff #define NV50_3D_VIEWPORT_VERT_Y__SHIFT 0 #define NV50_3D_VIEWPORT_VERT_H__MASK 0xffff0000 #define NV50_3D_VIEWPORT_VERT_H__SHIFT 16 #define NV50_3D_DEPTH_RANGE_NEAR(i0) (0x00000c08 + 0x10*(i0)) #define NV50_3D_DEPTH_RANGE_NEAR__ESIZE 0x00000010 #define NV50_3D_DEPTH_RANGE_NEAR__LEN 0x00000010 #define NV50_3D_DEPTH_RANGE_FAR(i0) (0x00000c0c + 0x10*(i0)) #define NV50_3D_DEPTH_RANGE_FAR__ESIZE 0x00000010 #define NV50_3D_DEPTH_RANGE_FAR__LEN 0x00000010 #define NV50_3D_CLIP_RECT_HORIZ(i0) (0x00000d00 + 0x8*(i0)) #define NV50_3D_CLIP_RECT_HORIZ__ESIZE 0x00000008 #define NV50_3D_CLIP_RECT_HORIZ__LEN 0x00000008 #define NV50_3D_CLIP_RECT_HORIZ_MIN__MASK 0x0000ffff #define NV50_3D_CLIP_RECT_HORIZ_MIN__SHIFT 0 #define NV50_3D_CLIP_RECT_HORIZ_MAX__MASK 0xffff0000 #define NV50_3D_CLIP_RECT_HORIZ_MAX__SHIFT 16 #define NV50_3D_CLIP_RECT_VERT(i0) (0x00000d04 + 0x8*(i0)) #define NV50_3D_CLIP_RECT_VERT__ESIZE 0x00000008 #define NV50_3D_CLIP_RECT_VERT__LEN 0x00000008 #define NV50_3D_CLIP_RECT_VERT_MIN__MASK 0x0000ffff #define NV50_3D_CLIP_RECT_VERT_MIN__SHIFT 0 #define NV50_3D_CLIP_RECT_VERT_MAX__MASK 0xffff0000 #define NV50_3D_CLIP_RECT_VERT_MAX__SHIFT 16 #define NV50_3D_CLIPID_REGION_HORIZ(i0) (0x00000d40 + 0x8*(i0)) #define NV50_3D_CLIPID_REGION_HORIZ__ESIZE 0x00000008 #define NV50_3D_CLIPID_REGION_HORIZ__LEN 0x00000004 #define NV50_3D_CLIPID_REGION_HORIZ_X__MASK 0x0000ffff #define NV50_3D_CLIPID_REGION_HORIZ_X__SHIFT 0 #define NV50_3D_CLIPID_REGION_HORIZ_W__MASK 0xffff0000 #define NV50_3D_CLIPID_REGION_HORIZ_W__SHIFT 16 #define NV50_3D_CLIPID_REGION_VERT(i0) (0x00000d44 + 0x8*(i0)) #define NV50_3D_CLIPID_REGION_VERT__ESIZE 0x00000008 #define NV50_3D_CLIPID_REGION_VERT__LEN 0x00000004 #define NV50_3D_CLIPID_REGION_VERT_Y__MASK 0x0000ffff #define NV50_3D_CLIPID_REGION_VERT_Y__SHIFT 0 #define NV50_3D_CLIPID_REGION_VERT_H__MASK 0xffff0000 #define NV50_3D_CLIPID_REGION_VERT_H__SHIFT 16 #define NV50_3D_UNK0D60 0x00000d60 #define NV50_3D_UNK0D64 0x00000d64 #define NV50_3D_COUNTER_ENABLE 0x00000d68 #define NV50_3D_COUNTER_ENABLE_VFETCH_VERTICES 0x00000001 #define NV50_3D_COUNTER_ENABLE_VFETCH_PRIMITIVES 0x00000002 #define NV50_3D_COUNTER_ENABLE_VP_LAUNCHES 0x00000004 #define NV50_3D_COUNTER_ENABLE_GP_LAUNCHES 0x00000008 #define NV50_3D_COUNTER_ENABLE_GP_PRIMITIVES_OUT 0x00000010 #define NV50_3D_COUNTER_ENABLE_TRANSFORM_FEEDBACK 0x00000020 #define NV50_3D_COUNTER_ENABLE_GENERATED_PRIMITIVES 0x00000040 #define NV50_3D_COUNTER_ENABLE_RAST_PRIMITIVES_PRECLIP 0x00000080 #define NV50_3D_COUNTER_ENABLE_RAST_PRIMITIVES_POSTCLIP 0x00000100 #define NV50_3D_COUNTER_ENABLE_FP_PIXELS 0x00000200 #define NV84_3D_COUNTER_ENABLE_UNK0A 0x00000400 #define NV50_3D_UNK0D6C(i0) (0x00000d6c + 0x4*(i0)) #define NV50_3D_UNK0D6C__ESIZE 0x00000004 #define NV50_3D_UNK0D6C__LEN 0x00000002 #define NV50_3D_UNK0D6C_X__MASK 0x0000ffff #define NV50_3D_UNK0D6C_X__SHIFT 0 #define NV50_3D_UNK0D6C_Y__MASK 0xffff0000 #define NV50_3D_UNK0D6C_Y__SHIFT 16 #define NV50_3D_VERTEX_BUFFER_FIRST 0x00000d74 #define NV50_3D_VERTEX_BUFFER_COUNT 0x00000d78 #define NV50_3D_UNK0D7C 0x00000d7c #define NV50_3D_CLEAR_COLOR(i0) (0x00000d80 + 0x4*(i0)) #define NV50_3D_CLEAR_COLOR__ESIZE 0x00000004 #define NV50_3D_CLEAR_COLOR__LEN 0x00000004 #define NV50_3D_CLEAR_DEPTH 0x00000d90 #define NV50_3D_STACK_ADDRESS_HIGH 0x00000d94 #define NV50_3D_STACK_ADDRESS_LOW 0x00000d98 #define NV50_3D_STACK_SIZE_LOG 0x00000d9c #define NV50_3D_CLEAR_STENCIL 0x00000da0 #define NV50_3D_STRMOUT_PARAMS_LATCH 0x00000da4 #define NV50_3D_STRMOUT_PRIMITIVE_LIMIT 0x00000da8 #define NV50_3D_POLYGON_MODE_FRONT 0x00000dac #define NV50_3D_POLYGON_MODE_FRONT_POINT 0x00001b00 #define NV50_3D_POLYGON_MODE_FRONT_LINE 0x00001b01 #define NV50_3D_POLYGON_MODE_FRONT_FILL 0x00001b02 #define NV50_3D_POLYGON_MODE_BACK 0x00000db0 #define NV50_3D_POLYGON_MODE_BACK_POINT 0x00001b00 #define NV50_3D_POLYGON_MODE_BACK_LINE 0x00001b01 #define NV50_3D_POLYGON_MODE_BACK_FILL 0x00001b02 #define NV50_3D_POLYGON_SMOOTH_ENABLE 0x00000db4 #define NV50_3D_UNK0DB8 0x00000db8 #define NV50_3D_ZCULL_UNK0DBC 0x00000dbc #define NV50_3D_ZCULL_UNK0DBC_UNK0 0x00000001 #define NV50_3D_ZCULL_UNK0DBC_UNK16__MASK 0x00030000 #define NV50_3D_ZCULL_UNK0DBC_UNK16__SHIFT 16 #define NV50_3D_POLYGON_OFFSET_POINT_ENABLE 0x00000dc0 #define NV50_3D_POLYGON_OFFSET_LINE_ENABLE 0x00000dc4 #define NV50_3D_POLYGON_OFFSET_FILL_ENABLE 0x00000dc8 #define NV50_3D_UNK0DCC 0x00000dcc #define NV50_3D_VTX_ATTR_MASK_UNK0DD0(i0) (0x00000dd0 + 0x4*(i0)) #define NV50_3D_VTX_ATTR_MASK_UNK0DD0__ESIZE 0x00000004 #define NV50_3D_VTX_ATTR_MASK_UNK0DD0__LEN 0x00000002 #define NV50_3D_ZCULL_UNK0DD8 0x00000dd8 #define NV50_3D_ZCULL_UNK0DD8_UNK0__MASK 0x00000007 #define NV50_3D_ZCULL_UNK0DD8_UNK0__SHIFT 0 #define NVA3_3D_ZCULL_UNK0DD8_UNK9 0x00000200 #define NV50_3D_ZCULL_UNK0DD8_UNK16__MASK 0xffff0000 #define NV50_3D_ZCULL_UNK0DD8_UNK16__SHIFT 16 #define NV50_3D_UNK0DDC 0x00000ddc #define NV50_3D_UNK0DE0 0x00000de0 #define NV50_3D_WATCHDOG_TIMER 0x00000de4 #define NV50_3D_UNK0DE8 0x00000de8 #define NV50_3D_UNK0DEC 0x00000dec #define NV50_3D_UNK0DF0 0x00000df0 #define NV50_3D_UNK0DF0_UNK0 0x00000001 #define NV50_3D_UNK0DF0_UNK1__MASK 0x00000ff0 #define NV50_3D_UNK0DF0_UNK1__SHIFT 4 #define NV50_3D_UNK0DF4 0x00000df4 #define NV50_3D_WINDOW_OFFSET_X 0x00000df8 #define NV50_3D_WINDOW_OFFSET_Y 0x00000dfc #define NV50_3D_SCISSOR_ENABLE(i0) (0x00000e00 + 0x10*(i0)) #define NV50_3D_SCISSOR_ENABLE__ESIZE 0x00000010 #define NV50_3D_SCISSOR_ENABLE__LEN 0x00000010 #define NV50_3D_SCISSOR_HORIZ(i0) (0x00000e04 + 0x10*(i0)) #define NV50_3D_SCISSOR_HORIZ__ESIZE 0x00000010 #define NV50_3D_SCISSOR_HORIZ__LEN 0x00000010 #define NV50_3D_SCISSOR_HORIZ_MIN__MASK 0x0000ffff #define NV50_3D_SCISSOR_HORIZ_MIN__SHIFT 0 #define NV50_3D_SCISSOR_HORIZ_MAX__MASK 0xffff0000 #define NV50_3D_SCISSOR_HORIZ_MAX__SHIFT 16 #define NV50_3D_SCISSOR_VERT(i0) (0x00000e08 + 0x10*(i0)) #define NV50_3D_SCISSOR_VERT__ESIZE 0x00000010 #define NV50_3D_SCISSOR_VERT__LEN 0x00000010 #define NV50_3D_SCISSOR_VERT_MIN__MASK 0x0000ffff #define NV50_3D_SCISSOR_VERT_MIN__SHIFT 0 #define NV50_3D_SCISSOR_VERT_MAX__MASK 0xffff0000 #define NV50_3D_SCISSOR_VERT_MAX__SHIFT 16 #define NV50_3D_CB_ADDR 0x00000f00 #define NV50_3D_CB_ADDR_ID__MASK 0x003fff00 #define NV50_3D_CB_ADDR_ID__SHIFT 8 #define NV50_3D_CB_ADDR_BUFFER__MASK 0x0000007f #define NV50_3D_CB_ADDR_BUFFER__SHIFT 0 #define NV50_3D_CB_DATA(i0) (0x00000f04 + 0x4*(i0)) #define NV50_3D_CB_DATA__ESIZE 0x00000004 #define NV50_3D_CB_DATA__LEN 0x00000010 #define NV50_3D_LOCAL_WARPS_LOG_ALLOC 0x00000f44 #define NV50_3D_LOCAL_WARPS_NO_CLAMP 0x00000f48 #define NV50_3D_STACK_WARPS_LOG_ALLOC 0x00000f4c #define NV50_3D_STACK_WARPS_NO_CLAMP 0x00000f50 #define NV50_3D_STENCIL_BACK_FUNC_REF 0x00000f54 #define NV50_3D_STENCIL_BACK_MASK 0x00000f58 #define NV50_3D_STENCIL_BACK_FUNC_MASK 0x00000f5c #define NV50_3D_UNK0F60(i0) (0x00000f60 + 0x4*(i0)) #define NV50_3D_UNK0F60__ESIZE 0x00000004 #define NV50_3D_UNK0F60__LEN 0x00000004 #define NV50_3D_GP_ADDRESS_HIGH 0x00000f70 #define NV50_3D_GP_ADDRESS_LOW 0x00000f74 #define NV50_3D_UNK0F78 0x00000f78 #define NV50_3D_VP_ADDRESS_HIGH 0x00000f7c #define NV50_3D_VP_ADDRESS_LOW 0x00000f80 #define NV50_3D_VERTEX_RUNOUT_ADDRESS_HIGH 0x00000f84 #define NV50_3D_VERTEX_RUNOUT_ADDRESS_LOW 0x00000f88 #define NV50_3D_UNK0F8C 0x00000f8c #define NV50_3D_COLOR_MASK_COMMON 0x00000f90 #define NV50_3D_UNK0F94 0x00000f94 #define NV50_3D_UNK0F98 0x00000f98 #define NV50_3D_DEPTH_BOUNDS(i0) (0x00000f9c + 0x4*(i0)) #define NV50_3D_DEPTH_BOUNDS__ESIZE 0x00000004 #define NV50_3D_DEPTH_BOUNDS__LEN 0x00000002 #define NV50_3D_FP_ADDRESS_HIGH 0x00000fa4 #define NV50_3D_FP_ADDRESS_LOW 0x00000fa8 #define NV50_3D_UNK0FAC 0x00000fac #define NV50_3D_UNK0FAC_UNK0 0x00000001 #define NVA0_3D_UNK0FAC_UNK2 0x00000002 #define NV50_3D_UNK0FAC_UNK1__MASK 0x000ffff0 #define NV50_3D_UNK0FAC_UNK1__SHIFT 4 #define NV50_3D_UNK0FB0 0x00000fb0 #define NV50_3D_UNK0FB4 0x00000fb4 #define NV50_3D_UNK0FB8 0x00000fb8 #define NV50_3D_MSAA_MASK(i0) (0x00000fbc + 0x4*(i0)) #define NV50_3D_MSAA_MASK__ESIZE 0x00000004 #define NV50_3D_MSAA_MASK__LEN 0x00000004 #define NV50_3D_CLIPID_ADDRESS_HIGH 0x00000fcc #define NV50_3D_CLIPID_ADDRESS_LOW 0x00000fd0 #define NV50_3D_SEMANTIC_VIEWPORT 0x00000fd4 #define NV50_3D_SEMANTIC_VIEWPORT_VIEWPORT_ID__MASK 0x000000ff #define NV50_3D_SEMANTIC_VIEWPORT_VIEWPORT_ID__SHIFT 0 #define NV50_3D_UNK0FD8 0x00000fd8 #define NV50_3D_UNK0FD8_UNK0 0x00000001 #define NV50_3D_UNK0FD8_UNK1 0x00000010 #define NV50_3D_UNK0FDC 0x00000fdc #define NV50_3D_ZETA_ADDRESS_HIGH 0x00000fe0 #define NV50_3D_ZETA_ADDRESS_LOW 0x00000fe4 #define NV50_3D_ZETA_FORMAT 0x00000fe8 #define NV50_3D_ZETA_TILE_MODE 0x00000fec #define NV50_3D_ZETA_LAYER_STRIDE 0x00000ff0 #define NV50_3D_ZETA_LAYER_STRIDE__SHR 2 #define NV50_3D_SCREEN_SCISSOR_HORIZ 0x00000ff4 #define NV50_3D_SCREEN_SCISSOR_HORIZ_W__MASK 0xffff0000 #define NV50_3D_SCREEN_SCISSOR_HORIZ_W__SHIFT 16 #define NV50_3D_SCREEN_SCISSOR_HORIZ_X__MASK 0x0000ffff #define NV50_3D_SCREEN_SCISSOR_HORIZ_X__SHIFT 0 #define NV50_3D_SCREEN_SCISSOR_VERT 0x00000ff8 #define NV50_3D_SCREEN_SCISSOR_VERT_H__MASK 0xffff0000 #define NV50_3D_SCREEN_SCISSOR_VERT_H__SHIFT 16 #define NV50_3D_SCREEN_SCISSOR_VERT_Y__MASK 0x0000ffff #define NV50_3D_SCREEN_SCISSOR_VERT_Y__SHIFT 0 #define NV50_3D_UNK0FFC 0x00000ffc #define NV50_3D_VERTEX_ARRAY_PER_INSTANCE(i0) (0x00001000 + 0x4*(i0)) #define NV50_3D_VERTEX_ARRAY_PER_INSTANCE__ESIZE 0x00000004 #define NV50_3D_VERTEX_ARRAY_PER_INSTANCE__LEN 0x00000010 #define NV50_3D_UNK1040(i0) (0x00001040 + 0x4*(i0)) #define NV50_3D_UNK1040__ESIZE 0x00000004 #define NV50_3D_UNK1040__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH(i0) (0x00001080 + 0x8*(i0)) #define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH__ESIZE 0x00000008 #define NV50_3D_VERTEX_ARRAY_LIMIT_HIGH__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_LIMIT_LOW(i0) (0x00001084 + 0x8*(i0)) #define NV50_3D_VERTEX_ARRAY_LIMIT_LOW__ESIZE 0x00000008 #define NV50_3D_VERTEX_ARRAY_LIMIT_LOW__LEN 0x00000010 #define NV50_3D_UNK1100 0x00001100 #define NV84_3D_UNK1104 0x00001104 #define NV84_3D_UNK1104_0__MASK 0x0000ffff #define NV84_3D_UNK1104_0__SHIFT 0 #define NV84_3D_UNK1104_0__MAX 0x00002000 #define NV84_3D_UNK1104_0__ALIGN 0x00000040 #define NV84_3D_UNK1104_1__MASK 0xffff0000 #define NV84_3D_UNK1104_1__SHIFT 16 #define NV84_3D_UNK1104_1__MAX 0x00002000 #define NV84_3D_UNK1104_1__ALIGN 0x00000040 #define NV84_3D_UNK1108 0x00001108 #define NV84_3D_UNK1108_0 0x00000001 #define NV84_3D_UNK1108_1 0x00000010 #define NV84_3D_UNK110C 0x0000110c #define NV84_3D_UNK1110 0x00001110 #define NV84_3D_WRCACHE_FLUSH 0x00001114 #define NV84_3D_VERTEX_ID_BASE 0x00001118 #define NV84_3D_PRIMITIVE_ID 0x0000111c #define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT(i0) (0x00001120 + 0x4*(i0)) #define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT__ESIZE 0x00000004 #define NVA3_3D_VTX_ATTR_MASK_UNK0DD0_ALT__LEN 0x00000004 #define NVA3_3D_VP_ATTR_EN_ALT(i0) (0x00001130 + 0x4*(i0)) #define NVA3_3D_VP_ATTR_EN_ALT__ESIZE 0x00000004 #define NVA3_3D_VP_ATTR_EN_ALT__LEN 0x00000004 #define NVA3_3D_VP_ATTR_EN_ALT_7__MASK 0xf0000000 #define NVA3_3D_VP_ATTR_EN_ALT_7__SHIFT 28 #define NVA3_3D_VP_ATTR_EN_ALT_7_X 0x10000000 #define NVA3_3D_VP_ATTR_EN_ALT_7_Y 0x20000000 #define NVA3_3D_VP_ATTR_EN_ALT_7_Z 0x40000000 #define NVA3_3D_VP_ATTR_EN_ALT_7_W 0x80000000 #define NVA3_3D_VP_ATTR_EN_ALT_6__MASK 0x0f000000 #define NVA3_3D_VP_ATTR_EN_ALT_6__SHIFT 24 #define NVA3_3D_VP_ATTR_EN_ALT_6_X 0x01000000 #define NVA3_3D_VP_ATTR_EN_ALT_6_Y 0x02000000 #define NVA3_3D_VP_ATTR_EN_ALT_6_Z 0x04000000 #define NVA3_3D_VP_ATTR_EN_ALT_6_W 0x08000000 #define NVA3_3D_VP_ATTR_EN_ALT_5__MASK 0x00f00000 #define NVA3_3D_VP_ATTR_EN_ALT_5__SHIFT 20 #define NVA3_3D_VP_ATTR_EN_ALT_5_X 0x00100000 #define NVA3_3D_VP_ATTR_EN_ALT_5_Y 0x00200000 #define NVA3_3D_VP_ATTR_EN_ALT_5_Z 0x00400000 #define NVA3_3D_VP_ATTR_EN_ALT_5_W 0x00800000 #define NVA3_3D_VP_ATTR_EN_ALT_4__MASK 0x000f0000 #define NVA3_3D_VP_ATTR_EN_ALT_4__SHIFT 16 #define NVA3_3D_VP_ATTR_EN_ALT_4_X 0x00010000 #define NVA3_3D_VP_ATTR_EN_ALT_4_Y 0x00020000 #define NVA3_3D_VP_ATTR_EN_ALT_4_Z 0x00040000 #define NVA3_3D_VP_ATTR_EN_ALT_4_W 0x00080000 #define NVA3_3D_VP_ATTR_EN_ALT_3__MASK 0x0000f000 #define NVA3_3D_VP_ATTR_EN_ALT_3__SHIFT 12 #define NVA3_3D_VP_ATTR_EN_ALT_3_X 0x00001000 #define NVA3_3D_VP_ATTR_EN_ALT_3_Y 0x00002000 #define NVA3_3D_VP_ATTR_EN_ALT_3_Z 0x00004000 #define NVA3_3D_VP_ATTR_EN_ALT_3_W 0x00008000 #define NVA3_3D_VP_ATTR_EN_ALT_2__MASK 0x00000f00 #define NVA3_3D_VP_ATTR_EN_ALT_2__SHIFT 8 #define NVA3_3D_VP_ATTR_EN_ALT_2_X 0x00000100 #define NVA3_3D_VP_ATTR_EN_ALT_2_Y 0x00000200 #define NVA3_3D_VP_ATTR_EN_ALT_2_Z 0x00000400 #define NVA3_3D_VP_ATTR_EN_ALT_2_W 0x00000800 #define NVA3_3D_VP_ATTR_EN_ALT_1__MASK 0x000000f0 #define NVA3_3D_VP_ATTR_EN_ALT_1__SHIFT 4 #define NVA3_3D_VP_ATTR_EN_ALT_1_X 0x00000010 #define NVA3_3D_VP_ATTR_EN_ALT_1_Y 0x00000020 #define NVA3_3D_VP_ATTR_EN_ALT_1_Z 0x00000040 #define NVA3_3D_VP_ATTR_EN_ALT_1_W 0x00000080 #define NVA3_3D_VP_ATTR_EN_ALT_0__MASK 0x0000000f #define NVA3_3D_VP_ATTR_EN_ALT_0__SHIFT 0 #define NVA3_3D_VP_ATTR_EN_ALT_0_X 0x00000001 #define NVA3_3D_VP_ATTR_EN_ALT_0_Y 0x00000002 #define NVA3_3D_VP_ATTR_EN_ALT_0_Z 0x00000004 #define NVA3_3D_VP_ATTR_EN_ALT_0_W 0x00000008 #define NVA3_3D_UNK1140 0x00001140 #define NVA0_3D_UNK1144 0x00001144 #define NVA0_3D_VTX_ATTR_DEFINE 0x0000114c #define NVA0_3D_VTX_ATTR_DEFINE_ATTR__MASK 0x000000ff #define NVA0_3D_VTX_ATTR_DEFINE_ATTR__SHIFT 0 #define NVA0_3D_VTX_ATTR_DEFINE_COMP__MASK 0x00000700 #define NVA0_3D_VTX_ATTR_DEFINE_COMP__SHIFT 8 #define NVA0_3D_VTX_ATTR_DEFINE_COMP__MIN 0x00000001 #define NVA0_3D_VTX_ATTR_DEFINE_COMP__MAX 0x00000004 #define NVA0_3D_VTX_ATTR_DEFINE_SIZE__MASK 0x00007000 #define NVA0_3D_VTX_ATTR_DEFINE_SIZE__SHIFT 12 #define NVA0_3D_VTX_ATTR_DEFINE_SIZE_8 0x00001000 #define NVA0_3D_VTX_ATTR_DEFINE_SIZE_16 0x00002000 #define NVA0_3D_VTX_ATTR_DEFINE_SIZE_32 0x00004000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE__MASK 0x00070000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE__SHIFT 16 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SNORM 0x00010000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_UNORM 0x00020000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SINT 0x00030000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_UINT 0x00040000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_USCALED 0x00050000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_SSCALED 0x00060000 #define NVA0_3D_VTX_ATTR_DEFINE_TYPE_FLOAT 0x00070000 #define NVA0_3D_VTX_ATTR_DATA(i0) (0x00001150 + 0x4*(i0)) #define NVA0_3D_VTX_ATTR_DATA__ESIZE 0x00000004 #define NVA0_3D_VTX_ATTR_DATA__LEN 0x00000004 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT(i0) (0x00001160 + 0x4*(i0)) #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT__ESIZE 0x00000004 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT__LEN 0x00000020 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BUFFER__MASK 0x0000001f #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BUFFER__SHIFT 0 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_CONST 0x00000040 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_OFFSET__MASK 0x001fff80 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_OFFSET__SHIFT 7 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT__MASK 0x07e00000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT__SHIFT 21 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32_32_32 0x00200000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32_32 0x00400000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16_16_16 0x00600000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32_32 0x00800000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16_16 0x00a00000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8_8_8 0x01400000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16_16 0x01e00000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_32 0x02400000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8_8 0x02600000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8_8 0x03000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_16 0x03600000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_8 0x03a00000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_FORMAT_10_10_10_2 0x06000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__MASK 0x38000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE__SHIFT 27 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SNORM 0x08000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_UNORM 0x10000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SINT 0x18000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_UINT 0x20000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_USCALED 0x28000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_SSCALED 0x30000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_TYPE_FLOAT 0x38000000 #define NVA3_3D_VERTEX_ARRAY_ATTRIB_ALT_BGRA 0x80000000 #define NV50_3D_RT_CONTROL 0x0000121c #define NV50_3D_RT_CONTROL_COUNT__MASK 0x0000000f #define NV50_3D_RT_CONTROL_COUNT__SHIFT 0 #define NV50_3D_RT_CONTROL_MAP0__MASK 0x00000070 #define NV50_3D_RT_CONTROL_MAP0__SHIFT 4 #define NV50_3D_RT_CONTROL_MAP1__MASK 0x00000380 #define NV50_3D_RT_CONTROL_MAP1__SHIFT 7 #define NV50_3D_RT_CONTROL_MAP2__MASK 0x00001c00 #define NV50_3D_RT_CONTROL_MAP2__SHIFT 10 #define NV50_3D_RT_CONTROL_MAP3__MASK 0x0000e000 #define NV50_3D_RT_CONTROL_MAP3__SHIFT 13 #define NV50_3D_RT_CONTROL_MAP4__MASK 0x00070000 #define NV50_3D_RT_CONTROL_MAP4__SHIFT 16 #define NV50_3D_RT_CONTROL_MAP5__MASK 0x00380000 #define NV50_3D_RT_CONTROL_MAP5__SHIFT 19 #define NV50_3D_RT_CONTROL_MAP6__MASK 0x01c00000 #define NV50_3D_RT_CONTROL_MAP6__SHIFT 22 #define NV50_3D_RT_CONTROL_MAP7__MASK 0x0e000000 #define NV50_3D_RT_CONTROL_MAP7__SHIFT 25 #define NV50_3D_UNK1220 0x00001220 #define NV50_3D_RT_ARRAY_MODE 0x00001224 #define NV50_3D_RT_ARRAY_MODE_LAYERS__MASK 0x0000ffff #define NV50_3D_RT_ARRAY_MODE_LAYERS__SHIFT 0 #define NV50_3D_RT_ARRAY_MODE_MODE__MASK 0x00010000 #define NV50_3D_RT_ARRAY_MODE_MODE__SHIFT 16 #define NV50_3D_RT_ARRAY_MODE_MODE_2D_ARRAY 0x00000000 #define NV50_3D_RT_ARRAY_MODE_MODE_3D 0x00010000 #define NV50_3D_ZETA_HORIZ 0x00001228 #define NV50_3D_ZETA_VERT 0x0000122c #define NV50_3D_ZETA_ARRAY_MODE 0x00001230 #define NV50_3D_ZETA_ARRAY_MODE_LAYERS__MASK 0x0000ffff #define NV50_3D_ZETA_ARRAY_MODE_LAYERS__SHIFT 0 #define NV50_3D_ZETA_ARRAY_MODE_UNK 0x00010000 #define NV50_3D_LINKED_TSC 0x00001234 #define NV50_3D_UNK1238 0x00001238 #define NVA0_3D_DRAW_TFB_BYTES 0x0000123c #define NV50_3D_RT_HORIZ(i0) (0x00001240 + 0x8*(i0)) #define NV50_3D_RT_HORIZ__ESIZE 0x00000008 #define NV50_3D_RT_HORIZ__LEN 0x00000008 #define NV50_3D_RT_HORIZ_WIDTH__MASK 0x0fffffff #define NV50_3D_RT_HORIZ_WIDTH__SHIFT 0 #define NV50_3D_RT_HORIZ_LINEAR 0x80000000 #define NV50_3D_RT_VERT(i0) (0x00001244 + 0x8*(i0)) #define NV50_3D_RT_VERT__ESIZE 0x00000008 #define NV50_3D_RT_VERT__LEN 0x00000008 #define NV50_3D_CB_DEF_ADDRESS_HIGH 0x00001280 #define NV50_3D_CB_DEF_ADDRESS_LOW 0x00001284 #define NV50_3D_CB_DEF_SET 0x00001288 #define NV50_3D_CB_DEF_SET_SIZE__MASK 0x0000ffff #define NV50_3D_CB_DEF_SET_SIZE__SHIFT 0 #define NV50_3D_CB_DEF_SET_BUFFER__MASK 0x007f0000 #define NV50_3D_CB_DEF_SET_BUFFER__SHIFT 16 #define NV50_3D_UNK128C 0x0000128c #define NV50_3D_UNK128C_0__MASK 0x00000003 #define NV50_3D_UNK128C_0__SHIFT 0 #define NV50_3D_UNK128C_1__MASK 0x00000030 #define NV50_3D_UNK128C_1__SHIFT 4 #define NV50_3D_UNK128C_2__MASK 0x00000300 #define NV50_3D_UNK128C_2__SHIFT 8 #define NV50_3D_UNK128C_3__MASK 0x00003000 #define NV50_3D_UNK128C_3__SHIFT 12 #define NV50_3D_CALL_LIMIT_LOG 0x00001290 #define NV50_3D_CALL_LIMIT_LOG_VP__MASK 0x0000000f #define NV50_3D_CALL_LIMIT_LOG_VP__SHIFT 0 #define NV50_3D_CALL_LIMIT_LOG_GP__MASK 0x000000f0 #define NV50_3D_CALL_LIMIT_LOG_GP__SHIFT 4 #define NV50_3D_CALL_LIMIT_LOG_FP__MASK 0x00000f00 #define NV50_3D_CALL_LIMIT_LOG_FP__SHIFT 8 #define NV50_3D_STRMOUT_BUFFERS_CTRL 0x00001294 #define NV50_3D_STRMOUT_BUFFERS_CTRL_INTERLEAVED 0x00000001 #define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE__MASK 0x00000002 #define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE__SHIFT 1 #define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE_PRIMITIVES 0x00000000 #define NVA0_3D_STRMOUT_BUFFERS_CTRL_LIMIT_MODE_OFFSET 0x00000002 #define NV50_3D_STRMOUT_BUFFERS_CTRL_SEPARATE__MASK 0x000000f0 #define NV50_3D_STRMOUT_BUFFERS_CTRL_SEPARATE__SHIFT 4 #define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__MASK 0x000fff00 #define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__SHIFT 8 #define NV50_3D_STRMOUT_BUFFERS_CTRL_STRIDE__MAX 0x00000800 #define NV50_3D_FP_RESULT_COUNT 0x00001298 #define NV50_3D_VTX_UNK129C 0x0000129c #define NV50_3D_UNK12A0 0x000012a0 #define NV50_3D_UNK12A8 0x000012a8 #define NV50_3D_UNK12A8_UNK1 0x00000001 #define NV50_3D_UNK12A8_UNK2__MASK 0x000ffff0 #define NV50_3D_UNK12A8_UNK2__SHIFT 4 #define NV50_3D_UNK12AC 0x000012ac #define NV50_3D_UNK12B0 0x000012b0 #define NV50_3D_UNK12B0_UNK0__MASK 0x000000ff #define NV50_3D_UNK12B0_UNK0__SHIFT 0 #define NV50_3D_UNK12B0_UNK1__MASK 0x0000ff00 #define NV50_3D_UNK12B0_UNK1__SHIFT 8 #define NV50_3D_UNK12B0_UNK2__MASK 0x00ff0000 #define NV50_3D_UNK12B0_UNK2__SHIFT 16 #define NV50_3D_UNK12B0_UNK3__MASK 0xff000000 #define NV50_3D_UNK12B0_UNK3__SHIFT 24 #define NV50_3D_UNK12B0_UNK3__MAX 0x00000080 #define NV50_3D_UNK12B4 0x000012b4 #define NV50_3D_UNK12B8 0x000012b8 #define NV50_3D_DEPTH_TEST_ENABLE 0x000012cc #define NV50_3D_D3D_FILL_MODE 0x000012d0 #define NV50_3D_D3D_FILL_MODE_POINT 0x00000001 #define NV50_3D_D3D_FILL_MODE_WIREFRAME 0x00000002 #define NV50_3D_D3D_FILL_MODE_SOLID 0x00000003 #define NV50_3D_SHADE_MODEL 0x000012d4 #define NV50_3D_SHADE_MODEL_FLAT 0x00001d00 #define NV50_3D_SHADE_MODEL_SMOOTH 0x00001d01 #define NV50_3D_LOCAL_ADDRESS_HIGH 0x000012d8 #define NV50_3D_LOCAL_ADDRESS_LOW 0x000012dc #define NV50_3D_LOCAL_SIZE_LOG 0x000012e0 #define NV50_3D_BLEND_INDEPENDENT 0x000012e4 #define NV50_3D_DEPTH_WRITE_ENABLE 0x000012e8 #define NV50_3D_ALPHA_TEST_ENABLE 0x000012ec #define NV50_3D_PM_SET(i0) (0x000012f0 + 0x4*(i0)) #define NV50_3D_PM_SET__ESIZE 0x00000004 #define NV50_3D_PM_SET__LEN 0x00000004 #define NV50_3D_VB_ELEMENT_U8_SETUP 0x00001300 #define NV50_3D_VB_ELEMENT_U8_SETUP_OFFSET__MASK 0xc0000000 #define NV50_3D_VB_ELEMENT_U8_SETUP_OFFSET__SHIFT 30 #define NV50_3D_VB_ELEMENT_U8_SETUP_COUNT__MASK 0x3fffffff #define NV50_3D_VB_ELEMENT_U8_SETUP_COUNT__SHIFT 0 #define NV50_3D_VB_ELEMENT_U8 0x00001304 #define NV50_3D_VB_ELEMENT_U8_I0__MASK 0x000000ff #define NV50_3D_VB_ELEMENT_U8_I0__SHIFT 0 #define NV50_3D_VB_ELEMENT_U8_I1__MASK 0x0000ff00 #define NV50_3D_VB_ELEMENT_U8_I1__SHIFT 8 #define NV50_3D_VB_ELEMENT_U8_I2__MASK 0x00ff0000 #define NV50_3D_VB_ELEMENT_U8_I2__SHIFT 16 #define NV50_3D_VB_ELEMENT_U8_I3__MASK 0xff000000 #define NV50_3D_VB_ELEMENT_U8_I3__SHIFT 24 #define NV50_3D_D3D_CULL_MODE 0x00001308 #define NV50_3D_D3D_CULL_MODE_NONE 0x00000001 #define NV50_3D_D3D_CULL_MODE_FRONT 0x00000002 #define NV50_3D_D3D_CULL_MODE_BACK 0x00000003 #define NV50_3D_DEPTH_TEST_FUNC 0x0000130c #define NV50_3D_DEPTH_TEST_FUNC_NEVER 0x00000200 #define NV50_3D_DEPTH_TEST_FUNC_LESS 0x00000201 #define NV50_3D_DEPTH_TEST_FUNC_EQUAL 0x00000202 #define NV50_3D_DEPTH_TEST_FUNC_LEQUAL 0x00000203 #define NV50_3D_DEPTH_TEST_FUNC_GREATER 0x00000204 #define NV50_3D_DEPTH_TEST_FUNC_NOTEQUAL 0x00000205 #define NV50_3D_DEPTH_TEST_FUNC_GEQUAL 0x00000206 #define NV50_3D_DEPTH_TEST_FUNC_ALWAYS 0x00000207 #define NV50_3D_ALPHA_TEST_REF 0x00001310 #define NV50_3D_ALPHA_TEST_FUNC 0x00001314 #define NV50_3D_ALPHA_TEST_FUNC_NEVER 0x00000200 #define NV50_3D_ALPHA_TEST_FUNC_LESS 0x00000201 #define NV50_3D_ALPHA_TEST_FUNC_EQUAL 0x00000202 #define NV50_3D_ALPHA_TEST_FUNC_LEQUAL 0x00000203 #define NV50_3D_ALPHA_TEST_FUNC_GREATER 0x00000204 #define NV50_3D_ALPHA_TEST_FUNC_NOTEQUAL 0x00000205 #define NV50_3D_ALPHA_TEST_FUNC_GEQUAL 0x00000206 #define NV50_3D_ALPHA_TEST_FUNC_ALWAYS 0x00000207 #define NVA0_3D_DRAW_TFB_STRIDE 0x00001318 #define NVA0_3D_DRAW_TFB_STRIDE__MIN 0x00000001 #define NVA0_3D_DRAW_TFB_STRIDE__MAX 0x00000fff #define NV50_3D_BLEND_COLOR(i0) (0x0000131c + 0x4*(i0)) #define NV50_3D_BLEND_COLOR__ESIZE 0x00000004 #define NV50_3D_BLEND_COLOR__LEN 0x00000004 #define NV50_3D_UNK132C 0x0000132c #define NV50_3D_TSC_FLUSH 0x00001330 #define NV50_3D_TSC_FLUSH_SPECIFIC 0x00000001 #define NV50_3D_TSC_FLUSH_ENTRY__MASK 0x03fffff0 #define NV50_3D_TSC_FLUSH_ENTRY__SHIFT 4 #define NV50_3D_TIC_FLUSH 0x00001334 #define NV50_3D_TIC_FLUSH_SPECIFIC 0x00000001 #define NV50_3D_TIC_FLUSH_ENTRY__MASK 0x03fffff0 #define NV50_3D_TIC_FLUSH_ENTRY__SHIFT 4 #define NV50_3D_TEX_CACHE_CTL 0x00001338 #define NV50_3D_TEX_CACHE_CTL_UNK1__MASK 0x00000030 #define NV50_3D_TEX_CACHE_CTL_UNK1__SHIFT 4 #define NV50_3D_BLEND_SEPARATE_ALPHA 0x0000133c #define NV50_3D_BLEND_EQUATION_RGB 0x00001340 #define NV50_3D_BLEND_EQUATION_RGB_FUNC_ADD 0x00008006 #define NV50_3D_BLEND_EQUATION_RGB_MIN 0x00008007 #define NV50_3D_BLEND_EQUATION_RGB_MAX 0x00008008 #define NV50_3D_BLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a #define NV50_3D_BLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b #define NV50_3D_BLEND_FUNC_SRC_RGB 0x00001344 #define NV50_3D_BLEND_FUNC_DST_RGB 0x00001348 #define NV50_3D_BLEND_EQUATION_ALPHA 0x0000134c #define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006 #define NV50_3D_BLEND_EQUATION_ALPHA_MIN 0x00008007 #define NV50_3D_BLEND_EQUATION_ALPHA_MAX 0x00008008 #define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a #define NV50_3D_BLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b #define NV50_3D_BLEND_FUNC_SRC_ALPHA 0x00001350 #define NV50_3D_UNK1354 0x00001354 #define NV50_3D_BLEND_FUNC_DST_ALPHA 0x00001358 #define NV50_3D_BLEND_ENABLE_COMMON 0x0000135c #define NV50_3D_BLEND_ENABLE(i0) (0x00001360 + 0x4*(i0)) #define NV50_3D_BLEND_ENABLE__ESIZE 0x00000004 #define NV50_3D_BLEND_ENABLE__LEN 0x00000008 #define NV50_3D_STENCIL_ENABLE 0x00001380 #define NV50_3D_STENCIL_FRONT_OP_FAIL 0x00001384 #define NV50_3D_STENCIL_FRONT_OP_FAIL_ZERO 0x00000000 #define NV50_3D_STENCIL_FRONT_OP_FAIL_INVERT 0x0000150a #define NV50_3D_STENCIL_FRONT_OP_FAIL_KEEP 0x00001e00 #define NV50_3D_STENCIL_FRONT_OP_FAIL_REPLACE 0x00001e01 #define NV50_3D_STENCIL_FRONT_OP_FAIL_INCR 0x00001e02 #define NV50_3D_STENCIL_FRONT_OP_FAIL_DECR 0x00001e03 #define NV50_3D_STENCIL_FRONT_OP_FAIL_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_FRONT_OP_FAIL_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL 0x00001388 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_ZERO 0x00000000 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INVERT 0x0000150a #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_KEEP 0x00001e00 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_REPLACE 0x00001e01 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INCR 0x00001e02 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_DECR 0x00001e03 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_FRONT_OP_ZFAIL_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_FRONT_OP_ZPASS 0x0000138c #define NV50_3D_STENCIL_FRONT_OP_ZPASS_ZERO 0x00000000 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_INVERT 0x0000150a #define NV50_3D_STENCIL_FRONT_OP_ZPASS_KEEP 0x00001e00 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_REPLACE 0x00001e01 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_INCR 0x00001e02 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_DECR 0x00001e03 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_FRONT_OP_ZPASS_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC 0x00001390 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_NEVER 0x00000200 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_LESS 0x00000201 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_EQUAL 0x00000202 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_LEQUAL 0x00000203 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_GREATER 0x00000204 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_GEQUAL 0x00000206 #define NV50_3D_STENCIL_FRONT_FUNC_FUNC_ALWAYS 0x00000207 #define NV50_3D_STENCIL_FRONT_FUNC_REF 0x00001394 #define NV50_3D_STENCIL_FRONT_MASK 0x00001398 #define NV50_3D_STENCIL_FRONT_FUNC_MASK 0x0000139c #define NV50_3D_UNK13A0 0x000013a0 #define NVA0_3D_DRAW_TFB_BASE 0x000013a4 #define NV50_3D_FRAG_COLOR_CLAMP_EN 0x000013a8 #define NV50_3D_FRAG_COLOR_CLAMP_EN_0 0x00000001 #define NV50_3D_FRAG_COLOR_CLAMP_EN_1 0x00000010 #define NV50_3D_FRAG_COLOR_CLAMP_EN_2 0x00000100 #define NV50_3D_FRAG_COLOR_CLAMP_EN_3 0x00001000 #define NV50_3D_FRAG_COLOR_CLAMP_EN_4 0x00010000 #define NV50_3D_FRAG_COLOR_CLAMP_EN_5 0x00100000 #define NV50_3D_FRAG_COLOR_CLAMP_EN_6 0x01000000 #define NV50_3D_FRAG_COLOR_CLAMP_EN_7 0x10000000 #define NV50_3D_SCREEN_Y_CONTROL 0x000013ac #define NV50_3D_SCREEN_Y_CONTROL_Y_NEGATE 0x00000001 #define NV50_3D_SCREEN_Y_CONTROL_TRIANGLE_RAST_FLIP 0x00000010 #define NV50_3D_LINE_WIDTH 0x000013b0 #define NV50_3D_TEX_LIMITS(i0) (0x000013b4 + 0x4*(i0)) #define NV50_3D_TEX_LIMITS__ESIZE 0x00000004 #define NV50_3D_TEX_LIMITS__LEN 0x00000003 #define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MASK 0x0000000f #define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__SHIFT 0 #define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MIN 0x00000000 #define NV50_3D_TEX_LIMITS_SAMPLERS_LOG2__MAX 0x00000004 #define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MASK 0x000000f0 #define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__SHIFT 4 #define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MIN 0x00000000 #define NV50_3D_TEX_LIMITS_TEXTURES_LOG2__MAX 0x00000007 #define NV50_3D_POINT_COORD_REPLACE_MAP(i0) (0x000013c0 + 0x4*(i0)) #define NV50_3D_POINT_COORD_REPLACE_MAP__ESIZE 0x00000004 #define NV50_3D_POINT_COORD_REPLACE_MAP__LEN 0x00000010 #define NV50_3D_UNK1400_LANES 0x00001400 #define NV50_3D_UNK1404 0x00001404 #define NV50_3D_UNK1408 0x00001408 #define NV50_3D_VP_START_ID 0x0000140c #define NV50_3D_GP_START_ID 0x00001410 #define NV50_3D_FP_START_ID 0x00001414 #define NVA3_3D_UNK1418 0x00001418 #define NV50_3D_UNK141C 0x0000141c #define NV50_3D_GP_VERTEX_OUTPUT_COUNT 0x00001420 #define NV50_3D_GP_VERTEX_OUTPUT_COUNT__MIN 0x00000001 #define NV50_3D_GP_VERTEX_OUTPUT_COUNT__MAX 0x00000400 #define NV50_3D_VERTEX_ARRAY_FLUSH 0x0000142c #define NV50_3D_UNK1430 0x00001430 #define NV50_3D_UNK1430_UNK0 0x00000010 #define NV50_3D_UNK1430_UNK1 0x00000100 #define NV50_3D_VB_ELEMENT_BASE 0x00001434 #define NV50_3D_VB_INSTANCE_BASE 0x00001438 #define NV50_3D_CLEAR_FLAGS 0x0000143c #define NV50_3D_CLEAR_FLAGS_STENCIL_MASK 0x00000001 #define NV50_3D_CLEAR_FLAGS_CLEAR_RECT__MASK 0x00000010 #define NV50_3D_CLEAR_FLAGS_CLEAR_RECT__SHIFT 4 #define NV50_3D_CLEAR_FLAGS_CLEAR_RECT_SCISSOR 0x00000000 #define NV50_3D_CLEAR_FLAGS_CLEAR_RECT_VIEWPORT 0x00000000 #define NV50_3D_CODE_CB_FLUSH 0x00001440 #define NV50_3D_BIND_TSC(i0) (0x00001444 + 0x8*(i0)) #define NV50_3D_BIND_TSC__ESIZE 0x00000008 #define NV50_3D_BIND_TSC__LEN 0x00000003 #define NV50_3D_BIND_TSC_VALID 0x00000001 #define NV50_3D_BIND_TSC_SAMPLER__MASK 0x000000f0 #define NV50_3D_BIND_TSC_SAMPLER__SHIFT 4 #define NV50_3D_BIND_TSC_TSC__MASK 0x001ff000 #define NV50_3D_BIND_TSC_TSC__SHIFT 12 #define NV50_3D_BIND_TIC(i0) (0x00001448 + 0x8*(i0)) #define NV50_3D_BIND_TIC__ESIZE 0x00000008 #define NV50_3D_BIND_TIC__LEN 0x00000003 #define NV50_3D_BIND_TIC_VALID 0x00000001 #define NV50_3D_BIND_TIC_TEXTURE__MASK 0x000001fe #define NV50_3D_BIND_TIC_TEXTURE__SHIFT 1 #define NV50_3D_BIND_TIC_TIC__MASK 0x7ffffe00 #define NV50_3D_BIND_TIC_TIC__SHIFT 9 #define NV50_3D_BIND_TSC2(i0) (0x00001468 + 0x8*(i0)) #define NV50_3D_BIND_TSC2__ESIZE 0x00000008 #define NV50_3D_BIND_TSC2__LEN 0x00000003 #define NV50_3D_BIND_TSC2_VALID 0x00000001 #define NV50_3D_BIND_TSC2_SAMPLER__MASK 0x00000010 #define NV50_3D_BIND_TSC2_SAMPLER__SHIFT 4 #define NV50_3D_BIND_TSC2_TSC__MASK 0x001ff000 #define NV50_3D_BIND_TSC2_TSC__SHIFT 12 #define NV50_3D_BIND_TIC2(i0) (0x0000146c + 0x8*(i0)) #define NV50_3D_BIND_TIC2__ESIZE 0x00000008 #define NV50_3D_BIND_TIC2__LEN 0x00000003 #define NV50_3D_BIND_TIC2_VALID 0x00000001 #define NV50_3D_BIND_TIC2_TEXTURE__MASK 0x00000002 #define NV50_3D_BIND_TIC2_TEXTURE__SHIFT 1 #define NV50_3D_BIND_TIC2_TIC__MASK 0x7ffffe00 #define NV50_3D_BIND_TIC2_TIC__SHIFT 9 #define NV50_3D_STRMOUT_MAP(i0) (0x00001480 + 0x4*(i0)) #define NV50_3D_STRMOUT_MAP__ESIZE 0x00000004 #define NV50_3D_STRMOUT_MAP__LEN 0x00000020 #define NV50_3D_CLIPID_HEIGHT 0x00001504 #define NV50_3D_CLIPID_HEIGHT__MAX 0x00002000 #define NV50_3D_CLIPID_FILL_RECT_HORIZ 0x00001508 #define NV50_3D_CLIPID_FILL_RECT_HORIZ_LOW__MASK 0x0000ffff #define NV50_3D_CLIPID_FILL_RECT_HORIZ_LOW__SHIFT 0 #define NV50_3D_CLIPID_FILL_RECT_HORIZ_HIGH__MASK 0xffff0000 #define NV50_3D_CLIPID_FILL_RECT_HORIZ_HIGH__SHIFT 16 #define NV50_3D_CLIPID_FILL_RECT_VERT 0x0000150c #define NV50_3D_CLIPID_FILL_RECT_VERT_LOW__MASK 0x0000ffff #define NV50_3D_CLIPID_FILL_RECT_VERT_LOW__SHIFT 0 #define NV50_3D_CLIPID_FILL_RECT_VERT_HIGH__MASK 0xffff0000 #define NV50_3D_CLIPID_FILL_RECT_VERT_HIGH__SHIFT 16 #define NV50_3D_CLIP_DISTANCE_ENABLE 0x00001510 #define NV50_3D_CLIP_DISTANCE_ENABLE_0 0x00000001 #define NV50_3D_CLIP_DISTANCE_ENABLE_1 0x00000002 #define NV50_3D_CLIP_DISTANCE_ENABLE_2 0x00000004 #define NV50_3D_CLIP_DISTANCE_ENABLE_3 0x00000008 #define NV50_3D_CLIP_DISTANCE_ENABLE_4 0x00000010 #define NV50_3D_CLIP_DISTANCE_ENABLE_5 0x00000020 #define NV50_3D_CLIP_DISTANCE_ENABLE_6 0x00000040 #define NV50_3D_CLIP_DISTANCE_ENABLE_7 0x00000080 #define NV50_3D_SAMPLECNT_ENABLE 0x00001514 #define NV50_3D_POINT_SIZE 0x00001518 #define NV50_3D_ZCULL_STATCTRS_ENABLE 0x0000151c #define NV50_3D_POINT_SPRITE_ENABLE 0x00001520 #define NVA0_3D_UNK152C 0x0000152c #define NVA0_3D_UNK152C_UNK0 0x00000001 #define NVA0_3D_UNK152C_UNK1 0x00000010 #define NVA0_3D_UNK152C_UNK2 0x00000100 #define NVA0_3D_UNK152C_UNK3__MASK 0x000ff000 #define NVA0_3D_UNK152C_UNK3__SHIFT 12 #define NVA0_3D_UNK152C_UNK3__MAX 0x00000028 #define NV50_3D_COUNTER_RESET 0x00001530 #define NV50_3D_COUNTER_RESET_SAMPLECNT 0x00000001 #define NV50_3D_COUNTER_RESET_ZCULL_STATS 0x00000002 #define NVA0_3D_COUNTER_RESET_STRMOUT_VERTICES 0x00000008 #define NV50_3D_COUNTER_RESET_TRANSFORM_FEEDBACK 0x00000010 #define NV50_3D_COUNTER_RESET_GENERATED_PRIMITIVES 0x00000011 #define NV50_3D_COUNTER_RESET_VFETCH_VERTICES 0x00000012 #define NV50_3D_COUNTER_RESET_VFETCH_PRIMITIVES 0x00000013 #define NV50_3D_COUNTER_RESET_VP_LAUNCHES 0x00000015 #define NV50_3D_COUNTER_RESET_GP_LAUNCHES 0x0000001a #define NV50_3D_COUNTER_RESET_GP_PRIMITIVES_OUT 0x0000001b #define NV50_3D_COUNTER_RESET_RAST_PRIMITIVES_PRECLIP 0x0000001c #define NV50_3D_COUNTER_RESET_RAST_PRIMITIVES_POSTCLIP 0x0000001d #define NV50_3D_COUNTER_RESET_FP_PIXELS 0x0000001e #define NV50_3D_MULTISAMPLE_ENABLE 0x00001534 #define NV50_3D_ZETA_ENABLE 0x00001538 #define NV50_3D_MULTISAMPLE_CTRL 0x0000153c #define NV50_3D_MULTISAMPLE_CTRL_ALPHA_TO_COVERAGE 0x00000001 #define NV50_3D_MULTISAMPLE_CTRL_ALPHA_TO_ONE 0x00000010 #define NV50_3D_NOPERSPECTIVE_BITMAP(i0) (0x00001540 + 0x4*(i0)) #define NV50_3D_NOPERSPECTIVE_BITMAP__ESIZE 0x00000004 #define NV50_3D_NOPERSPECTIVE_BITMAP__LEN 0x00000004 #define NV50_3D_COND_ADDRESS_HIGH 0x00001550 #define NV50_3D_COND_ADDRESS_LOW 0x00001554 #define NV50_3D_COND_MODE 0x00001558 #define NV50_3D_COND_MODE_NEVER 0x00000000 #define NV50_3D_COND_MODE_ALWAYS 0x00000001 #define NV50_3D_COND_MODE_RES_NON_ZERO 0x00000002 #define NV50_3D_COND_MODE_EQUAL 0x00000003 #define NV50_3D_COND_MODE_NOT_EQUAL 0x00000004 #define NV50_3D_TSC_ADDRESS_HIGH 0x0000155c #define NV50_3D_TSC_ADDRESS_LOW 0x00001560 #define NV50_3D_TSC_ADDRESS_LOW__ALIGN 0x00000020 #define NV50_3D_TSC_LIMIT 0x00001564 #define NV50_3D_TSC_LIMIT__MAX 0x00001fff #define NV50_3D_UNK1568 0x00001568 #define NV50_3D_POLYGON_OFFSET_FACTOR 0x0000156c #define NV50_3D_LINE_SMOOTH_ENABLE 0x00001570 #define NV50_3D_TIC_ADDRESS_HIGH 0x00001574 #define NV50_3D_TIC_ADDRESS_LOW 0x00001578 #define NV50_3D_TIC_LIMIT 0x0000157c #define NV50_3D_PM_CONTROL(i0) (0x00001580 + 0x4*(i0)) #define NV50_3D_PM_CONTROL__ESIZE 0x00000004 #define NV50_3D_PM_CONTROL__LEN 0x00000004 #define NV50_3D_PM_CONTROL_UNK0 0x00000001 #define NV50_3D_PM_CONTROL_UNK1__MASK 0x00000070 #define NV50_3D_PM_CONTROL_UNK1__SHIFT 4 #define NV50_3D_PM_CONTROL_UNK2__MASK 0x00ffff00 #define NV50_3D_PM_CONTROL_UNK2__SHIFT 8 #define NV50_3D_PM_CONTROL_UNK3__MASK 0xff000000 #define NV50_3D_PM_CONTROL_UNK3__SHIFT 24 #define NV50_3D_ZCULL_REGION 0x00001590 #define NV50_3D_STENCIL_TWO_SIDE_ENABLE 0x00001594 #define NV50_3D_STENCIL_BACK_OP_FAIL 0x00001598 #define NV50_3D_STENCIL_BACK_OP_FAIL_ZERO 0x00000000 #define NV50_3D_STENCIL_BACK_OP_FAIL_INVERT 0x0000150a #define NV50_3D_STENCIL_BACK_OP_FAIL_KEEP 0x00001e00 #define NV50_3D_STENCIL_BACK_OP_FAIL_REPLACE 0x00001e01 #define NV50_3D_STENCIL_BACK_OP_FAIL_INCR 0x00001e02 #define NV50_3D_STENCIL_BACK_OP_FAIL_DECR 0x00001e03 #define NV50_3D_STENCIL_BACK_OP_FAIL_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_BACK_OP_FAIL_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_BACK_OP_ZFAIL 0x0000159c #define NV50_3D_STENCIL_BACK_OP_ZFAIL_ZERO 0x00000000 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_INVERT 0x0000150a #define NV50_3D_STENCIL_BACK_OP_ZFAIL_KEEP 0x00001e00 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_REPLACE 0x00001e01 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_INCR 0x00001e02 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_DECR 0x00001e03 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_BACK_OP_ZFAIL_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_BACK_OP_ZPASS 0x000015a0 #define NV50_3D_STENCIL_BACK_OP_ZPASS_ZERO 0x00000000 #define NV50_3D_STENCIL_BACK_OP_ZPASS_INVERT 0x0000150a #define NV50_3D_STENCIL_BACK_OP_ZPASS_KEEP 0x00001e00 #define NV50_3D_STENCIL_BACK_OP_ZPASS_REPLACE 0x00001e01 #define NV50_3D_STENCIL_BACK_OP_ZPASS_INCR 0x00001e02 #define NV50_3D_STENCIL_BACK_OP_ZPASS_DECR 0x00001e03 #define NV50_3D_STENCIL_BACK_OP_ZPASS_INCR_WRAP 0x00008507 #define NV50_3D_STENCIL_BACK_OP_ZPASS_DECR_WRAP 0x00008508 #define NV50_3D_STENCIL_BACK_FUNC_FUNC 0x000015a4 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_NEVER 0x00000200 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_LESS 0x00000201 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_EQUAL 0x00000202 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_LEQUAL 0x00000203 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_GREATER 0x00000204 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_NOTEQUAL 0x00000205 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_GEQUAL 0x00000206 #define NV50_3D_STENCIL_BACK_FUNC_FUNC_ALWAYS 0x00000207 #define NV50_3D_UNK15A8 0x000015a8 #define NV50_3D_UNK15A8_UNK1__MASK 0x00000007 #define NV50_3D_UNK15A8_UNK1__SHIFT 0 #define NV50_3D_UNK15A8_UNK2__MASK 0x00000070 #define NV50_3D_UNK15A8_UNK2__SHIFT 4 #define NV50_3D_UNK15AC 0x000015ac #define NV50_3D_UNK15B0 0x000015b0 #define NV50_3D_UNK15B0_0 0x00000001 #define NV50_3D_UNK15B0_1 0x00000010 #define NV50_3D_UNK15B0_2 0x00000100 #define NV50_3D_CSAA_ENABLE 0x000015b4 #define NV50_3D_FRAMEBUFFER_SRGB 0x000015b8 #define NV50_3D_POLYGON_OFFSET_UNITS 0x000015bc #define NVA3_3D_UNK15C4 0x000015c4 #define NVA3_3D_UNK15C8 0x000015c8 #define NV50_3D_LAYER 0x000015cc #define NV50_3D_LAYER_IDX__MASK 0x0000ffff #define NV50_3D_LAYER_IDX__SHIFT 0 #define NV50_3D_LAYER_USE_GP 0x00010000 #define NV50_3D_MULTISAMPLE_MODE 0x000015d0 #define NV50_3D_MULTISAMPLE_MODE_MS1 0x00000000 #define NV50_3D_MULTISAMPLE_MODE_MS2 0x00000001 #define NV50_3D_MULTISAMPLE_MODE_MS4 0x00000002 #define NV50_3D_MULTISAMPLE_MODE_MS8 0x00000003 #define NV50_3D_MULTISAMPLE_MODE_MS8_ALT 0x00000004 #define NV50_3D_MULTISAMPLE_MODE_MS2_ALT 0x00000005 #define NV50_3D_MULTISAMPLE_MODE_UNK6 0x00000006 #define NV50_3D_MULTISAMPLE_MODE_MS4_CS4 0x00000008 #define NV50_3D_MULTISAMPLE_MODE_MS4_CS12 0x00000009 #define NV50_3D_MULTISAMPLE_MODE_MS8_CS8 0x0000000a #define NV50_3D_MULTISAMPLE_MODE_MS8_CS24 0x0000000b #define NV50_3D_VERTEX_BEGIN_D3D 0x000015d4 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE__MASK 0x0fffffff #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE__SHIFT 0 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_POINTS 0x00000001 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES 0x00000002 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP 0x00000003 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES 0x00000004 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP 0x00000005 #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINES_ADJACENCY 0x0000000a #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c #define NV50_3D_VERTEX_BEGIN_D3D_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d #define NV50_3D_VERTEX_BEGIN_D3D_INSTANCE_NEXT 0x10000000 #define NV84_3D_VERTEX_BEGIN_D3D_PRIMITIVE_ID_CONT 0x20000000 #define NVA0_3D_VERTEX_BEGIN_D3D_INSTANCE_CONT 0x40000000 #define NV50_3D_VERTEX_END_D3D 0x000015d8 #define NV50_3D_VERTEX_END_D3D_UNK0 0x00000001 #define NVA0_3D_VERTEX_END_D3D_UNK1 0x00000002 #define NV50_3D_VERTEX_BEGIN_GL 0x000015dc #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE__MASK 0x0fffffff #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE__SHIFT 0 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POINTS 0x00000000 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES 0x00000001 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_LOOP 0x00000002 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP 0x00000003 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES 0x00000004 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP 0x00000005 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_FAN 0x00000006 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUADS 0x00000007 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_QUAD_STRIP 0x00000008 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_POLYGON 0x00000009 #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINES_ADJACENCY 0x0000000a #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_LINE_STRIP_ADJACENCY 0x0000000b #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES_ADJACENCY 0x0000000c #define NV50_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLE_STRIP_ADJACENCY 0x0000000d #define NV50_3D_VERTEX_BEGIN_GL_INSTANCE_NEXT 0x10000000 #define NV84_3D_VERTEX_BEGIN_GL_PRIMITIVE_ID_CONT 0x20000000 #define NVA0_3D_VERTEX_BEGIN_GL_INSTANCE_CONT 0x40000000 #define NV50_3D_VERTEX_END_GL 0x000015e0 #define NV50_3D_VERTEX_END_GL_UNK0 0x00000001 #define NVA0_3D_VERTEX_END_GL_UNK1 0x00000002 #define NV50_3D_EDGEFLAG_ENABLE 0x000015e4 #define NV50_3D_VB_ELEMENT_U32 0x000015e8 #define NV50_3D_VB_ELEMENT_U16_SETUP 0x000015ec #define NV50_3D_VB_ELEMENT_U16_SETUP_OFFSET__MASK 0xc0000000 #define NV50_3D_VB_ELEMENT_U16_SETUP_OFFSET__SHIFT 30 #define NV50_3D_VB_ELEMENT_U16_SETUP_COUNT__MASK 0x3fffffff #define NV50_3D_VB_ELEMENT_U16_SETUP_COUNT__SHIFT 0 #define NV50_3D_VB_ELEMENT_U16 0x000015f0 #define NV50_3D_VB_ELEMENT_U16_I0__MASK 0x0000ffff #define NV50_3D_VB_ELEMENT_U16_I0__SHIFT 0 #define NV50_3D_VB_ELEMENT_U16_I1__MASK 0xffff0000 #define NV50_3D_VB_ELEMENT_U16_I1__SHIFT 16 #define NV50_3D_VERTEX_BASE_HIGH 0x000015f4 #define NV50_3D_VERTEX_BASE_LOW 0x000015f8 #define NV50_3D_VERTEX_DATA 0x00001640 #define NV50_3D_PRIM_RESTART_ENABLE 0x00001644 #define NV50_3D_PRIM_RESTART_INDEX 0x00001648 #define NV50_3D_VP_GP_BUILTIN_ATTR_EN 0x0000164c #define NV50_3D_VP_GP_BUILTIN_ATTR_EN_VERTEX_ID 0x00000001 #define NV50_3D_VP_GP_BUILTIN_ATTR_EN_INSTANCE_ID 0x00000010 #define NV50_3D_VP_GP_BUILTIN_ATTR_EN_PRIMITIVE_ID 0x00000100 #define NV50_3D_VP_GP_BUILTIN_ATTR_EN_UNK12 0x00001000 #define NV50_3D_VP_ATTR_EN(i0) (0x00001650 + 0x4*(i0)) #define NV50_3D_VP_ATTR_EN__ESIZE 0x00000004 #define NV50_3D_VP_ATTR_EN__LEN 0x00000002 #define NV50_3D_VP_ATTR_EN_7__MASK 0xf0000000 #define NV50_3D_VP_ATTR_EN_7__SHIFT 28 #define NV50_3D_VP_ATTR_EN_7_X 0x10000000 #define NV50_3D_VP_ATTR_EN_7_Y 0x20000000 #define NV50_3D_VP_ATTR_EN_7_Z 0x40000000 #define NV50_3D_VP_ATTR_EN_7_W 0x80000000 #define NV50_3D_VP_ATTR_EN_6__MASK 0x0f000000 #define NV50_3D_VP_ATTR_EN_6__SHIFT 24 #define NV50_3D_VP_ATTR_EN_6_X 0x01000000 #define NV50_3D_VP_ATTR_EN_6_Y 0x02000000 #define NV50_3D_VP_ATTR_EN_6_Z 0x04000000 #define NV50_3D_VP_ATTR_EN_6_W 0x08000000 #define NV50_3D_VP_ATTR_EN_5__MASK 0x00f00000 #define NV50_3D_VP_ATTR_EN_5__SHIFT 20 #define NV50_3D_VP_ATTR_EN_5_X 0x00100000 #define NV50_3D_VP_ATTR_EN_5_Y 0x00200000 #define NV50_3D_VP_ATTR_EN_5_Z 0x00400000 #define NV50_3D_VP_ATTR_EN_5_W 0x00800000 #define NV50_3D_VP_ATTR_EN_4__MASK 0x000f0000 #define NV50_3D_VP_ATTR_EN_4__SHIFT 16 #define NV50_3D_VP_ATTR_EN_4_X 0x00010000 #define NV50_3D_VP_ATTR_EN_4_Y 0x00020000 #define NV50_3D_VP_ATTR_EN_4_Z 0x00040000 #define NV50_3D_VP_ATTR_EN_4_W 0x00080000 #define NV50_3D_VP_ATTR_EN_3__MASK 0x0000f000 #define NV50_3D_VP_ATTR_EN_3__SHIFT 12 #define NV50_3D_VP_ATTR_EN_3_X 0x00001000 #define NV50_3D_VP_ATTR_EN_3_Y 0x00002000 #define NV50_3D_VP_ATTR_EN_3_Z 0x00004000 #define NV50_3D_VP_ATTR_EN_3_W 0x00008000 #define NV50_3D_VP_ATTR_EN_2__MASK 0x00000f00 #define NV50_3D_VP_ATTR_EN_2__SHIFT 8 #define NV50_3D_VP_ATTR_EN_2_X 0x00000100 #define NV50_3D_VP_ATTR_EN_2_Y 0x00000200 #define NV50_3D_VP_ATTR_EN_2_Z 0x00000400 #define NV50_3D_VP_ATTR_EN_2_W 0x00000800 #define NV50_3D_VP_ATTR_EN_1__MASK 0x000000f0 #define NV50_3D_VP_ATTR_EN_1__SHIFT 4 #define NV50_3D_VP_ATTR_EN_1_X 0x00000010 #define NV50_3D_VP_ATTR_EN_1_Y 0x00000020 #define NV50_3D_VP_ATTR_EN_1_Z 0x00000040 #define NV50_3D_VP_ATTR_EN_1_W 0x00000080 #define NV50_3D_VP_ATTR_EN_0__MASK 0x0000000f #define NV50_3D_VP_ATTR_EN_0__SHIFT 0 #define NV50_3D_VP_ATTR_EN_0_X 0x00000001 #define NV50_3D_VP_ATTR_EN_0_Y 0x00000002 #define NV50_3D_VP_ATTR_EN_0_Z 0x00000004 #define NV50_3D_VP_ATTR_EN_0_W 0x00000008 #define NV50_3D_POINT_SMOOTH_ENABLE 0x00001658 #define NV50_3D_POINT_RASTER_RULES 0x0000165c #define NV50_3D_POINT_RASTER_RULES_OGL 0x00000000 #define NV50_3D_POINT_RASTER_RULES_D3D 0x00000001 #define NV50_3D_POINT_SPRITE_CTRL 0x00001660 #define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN__MASK 0x00000010 #define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN__SHIFT 4 #define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN_LOWER_LEFT 0x00000000 #define NV50_3D_POINT_SPRITE_CTRL_COORD_ORIGIN_UPPER_LEFT 0x00000010 #define NVA0_3D_TEX_MISC 0x00001664 #define NVA0_3D_TEX_MISC_UNK1 0x00000002 #define NVA0_3D_TEX_MISC_SEAMLESS_CUBE_MAP 0x00000004 #define NV50_3D_LINE_SMOOTH_BLUR 0x00001668 #define NV50_3D_LINE_SMOOTH_BLUR_LOW 0x00000000 #define NV50_3D_LINE_SMOOTH_BLUR_MEDIUM 0x00000001 #define NV50_3D_LINE_SMOOTH_BLUR_HIGH 0x00000002 #define NV50_3D_LINE_STIPPLE_ENABLE 0x0000166c #define NV50_3D_COVERAGE_LUT(i0) (0x00001670 + 0x4*(i0)) #define NV50_3D_COVERAGE_LUT__ESIZE 0x00000004 #define NV50_3D_COVERAGE_LUT__LEN 0x00000004 #define NV50_3D_COVERAGE_LUT_0__MASK 0x000000ff #define NV50_3D_COVERAGE_LUT_0__SHIFT 0 #define NV50_3D_COVERAGE_LUT_1__MASK 0x0000ff00 #define NV50_3D_COVERAGE_LUT_1__SHIFT 8 #define NV50_3D_COVERAGE_LUT_2__MASK 0x00ff0000 #define NV50_3D_COVERAGE_LUT_2__SHIFT 16 #define NV50_3D_COVERAGE_LUT_3__MASK 0xff000000 #define NV50_3D_COVERAGE_LUT_3__SHIFT 24 #define NV50_3D_LINE_STIPPLE 0x00001680 #define NV50_3D_LINE_STIPPLE_FACTOR_M1__MASK 0x000000ff #define NV50_3D_LINE_STIPPLE_FACTOR_M1__SHIFT 0 #define NV50_3D_LINE_STIPPLE_PATTERN__MASK 0x00ffff00 #define NV50_3D_LINE_STIPPLE_PATTERN__SHIFT 8 #define NV50_3D_PROVOKING_VERTEX_LAST 0x00001684 #define NV50_3D_VERTEX_TWO_SIDE_ENABLE 0x00001688 #define NV50_3D_POLYGON_STIPPLE_ENABLE 0x0000168c #define NV50_3D_UNK1690 0x00001690 #define NV50_3D_UNK1690_ALWAYS_DERIV 0x00000001 #define NV50_3D_UNK1690_UNK16 0x00010000 #define NV50_3D_SET_PROGRAM_CB 0x00001694 #define NV50_3D_SET_PROGRAM_CB_PROGRAM__MASK 0x000000f0 #define NV50_3D_SET_PROGRAM_CB_PROGRAM__SHIFT 4 #define NV50_3D_SET_PROGRAM_CB_PROGRAM_VERTEX 0x00000000 #define NV50_3D_SET_PROGRAM_CB_PROGRAM_GEOMETRY 0x00000020 #define NV50_3D_SET_PROGRAM_CB_PROGRAM_FRAGMENT 0x00000030 #define NV50_3D_SET_PROGRAM_CB_INDEX__MASK 0x00000f00 #define NV50_3D_SET_PROGRAM_CB_INDEX__SHIFT 8 #define NV50_3D_SET_PROGRAM_CB_BUFFER__MASK 0x0007f000 #define NV50_3D_SET_PROGRAM_CB_BUFFER__SHIFT 12 #define NV50_3D_SET_PROGRAM_CB_VALID 0x00000001 #define NV50_3D_UNK1698 0x00001698 #define NV50_3D_UNK1698_0 0x00000001 #define NV50_3D_UNK1698_1 0x00000010 #define NV50_3D_UNK1698_2 0x00000100 #define NVA3_3D_SAMPLE_SHADING 0x0000169c #define NVA3_3D_SAMPLE_SHADING_MIN_SAMPLES__MASK 0x0000000f #define NVA3_3D_SAMPLE_SHADING_MIN_SAMPLES__SHIFT 0 #define NVA3_3D_SAMPLE_SHADING_ENABLE 0x00000010 #define NVA3_3D_UNK16A0 0x000016a0 #define NV50_3D_VP_RESULT_MAP_SIZE 0x000016ac #define NV50_3D_VP_REG_ALLOC_TEMP 0x000016b0 #define NVA0_3D_UNK16B4 0x000016b4 #define NVA0_3D_UNK16B4_UNK0 0x00000001 #define NVA3_3D_UNK16B4_UNK1 0x00000002 #define NV50_3D_VP_REG_ALLOC_RESULT 0x000016b8 #define NV50_3D_VP_RESULT_MAP(i0) (0x000016bc + 0x4*(i0)) #define NV50_3D_VP_RESULT_MAP__ESIZE 0x00000004 #define NV50_3D_VP_RESULT_MAP__LEN 0x00000011 #define NV50_3D_VP_RESULT_MAP_0__MASK 0x000000ff #define NV50_3D_VP_RESULT_MAP_0__SHIFT 0 #define NV50_3D_VP_RESULT_MAP_1__MASK 0x0000ff00 #define NV50_3D_VP_RESULT_MAP_1__SHIFT 8 #define NV50_3D_VP_RESULT_MAP_2__MASK 0x00ff0000 #define NV50_3D_VP_RESULT_MAP_2__SHIFT 16 #define NV50_3D_VP_RESULT_MAP_3__MASK 0xff000000 #define NV50_3D_VP_RESULT_MAP_3__SHIFT 24 #define NV50_3D_POLYGON_STIPPLE_PATTERN(i0) (0x00001700 + 0x4*(i0)) #define NV50_3D_POLYGON_STIPPLE_PATTERN__ESIZE 0x00000004 #define NV50_3D_POLYGON_STIPPLE_PATTERN__LEN 0x00000020 #define NVA0_3D_STRMOUT_OFFSET(i0) (0x00001780 + 0x4*(i0)) #define NVA0_3D_STRMOUT_OFFSET__ESIZE 0x00000004 #define NVA0_3D_STRMOUT_OFFSET__LEN 0x00000004 #define NV50_3D_GP_ENABLE 0x00001798 #define NV50_3D_GP_REG_ALLOC_TEMP 0x000017a0 #define NV50_3D_GP_REG_ALLOC_RESULT 0x000017a8 #define NV50_3D_GP_RESULT_MAP_SIZE 0x000017ac #define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE 0x000017b0 #define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_POINTS 0x00000001 #define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_LINE_STRIP 0x00000002 #define NV50_3D_GP_OUTPUT_PRIMITIVE_TYPE_TRIANGLE_STRIP 0x00000003 #define NV50_3D_RASTERIZE_ENABLE 0x000017b4 #define NV50_3D_STRMOUT_ENABLE 0x000017b8 #define NV50_3D_GP_RESULT_MAP(i0) (0x000017fc + 0x4*(i0)) #define NV50_3D_GP_RESULT_MAP__ESIZE 0x00000004 #define NV50_3D_GP_RESULT_MAP__LEN 0x00000021 #define NV50_3D_GP_RESULT_MAP_0__MASK 0x000000ff #define NV50_3D_GP_RESULT_MAP_0__SHIFT 0 #define NV50_3D_GP_RESULT_MAP_1__MASK 0x0000ff00 #define NV50_3D_GP_RESULT_MAP_1__SHIFT 8 #define NV50_3D_GP_RESULT_MAP_2__MASK 0x00ff0000 #define NV50_3D_GP_RESULT_MAP_2__SHIFT 16 #define NV50_3D_GP_RESULT_MAP_3__MASK 0xff000000 #define NV50_3D_GP_RESULT_MAP_3__SHIFT 24 #define NV50_3D_POLYGON_OFFSET_CLAMP 0x0000187c #define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT(i0) (0x00001880 + 0x4*(i0)) #define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT__ESIZE 0x00000004 #define NVA3_3D_VERTEX_ARRAY_PER_INSTANCE_ALT__LEN 0x00000020 #define NV50_3D_GP_VIEWPORT_ID_ENABLE 0x00001900 #define NV50_3D_SEMANTIC_COLOR 0x00001904 #define NV50_3D_SEMANTIC_COLOR_FFC0_ID__MASK 0x000000ff #define NV50_3D_SEMANTIC_COLOR_FFC0_ID__SHIFT 0 #define NV50_3D_SEMANTIC_COLOR_BFC0_ID__MASK 0x0000ff00 #define NV50_3D_SEMANTIC_COLOR_BFC0_ID__SHIFT 8 #define NV50_3D_SEMANTIC_COLOR_COLR_NR__MASK 0x00ff0000 #define NV50_3D_SEMANTIC_COLOR_COLR_NR__SHIFT 16 #define NV50_3D_SEMANTIC_COLOR_CLMP_EN 0x01000000 #define NV50_3D_SEMANTIC_CLIP 0x00001908 #define NV50_3D_SEMANTIC_CLIP_CLIP_START__MASK 0x000000ff #define NV50_3D_SEMANTIC_CLIP_CLIP_START__SHIFT 0 #define NV50_3D_SEMANTIC_CLIP_CLIP_NUM__MASK 0x00000f00 #define NV50_3D_SEMANTIC_CLIP_CLIP_NUM__SHIFT 8 #define NV50_3D_SEMANTIC_LAYER 0x0000190c #define NV50_3D_SEMANTIC_LAYER_LAYER_ID__MASK 0x000000ff #define NV50_3D_SEMANTIC_LAYER_LAYER_ID__SHIFT 0 #define NV50_3D_SEMANTIC_PTSZ 0x00001910 #define NV50_3D_SEMANTIC_PTSZ_PTSZ_EN__MASK 0x00000001 #define NV50_3D_SEMANTIC_PTSZ_PTSZ_EN__SHIFT 0 #define NV50_3D_SEMANTIC_PTSZ_PTSZ_ID__MASK 0x00000ff0 #define NV50_3D_SEMANTIC_PTSZ_PTSZ_ID__SHIFT 4 #define NV50_3D_SEMANTIC_PRIM_ID 0x00001914 #define NV50_3D_SEMANTIC_PRIM_ID_PRIM_ID__MASK 0x000000ff #define NV50_3D_SEMANTIC_PRIM_ID_PRIM_ID__SHIFT 0 #define NV50_3D_CULL_FACE_ENABLE 0x00001918 #define NV50_3D_FRONT_FACE 0x0000191c #define NV50_3D_FRONT_FACE_CW 0x00000900 #define NV50_3D_FRONT_FACE_CCW 0x00000901 #define NV50_3D_CULL_FACE 0x00001920 #define NV50_3D_CULL_FACE_FRONT 0x00000404 #define NV50_3D_CULL_FACE_BACK 0x00000405 #define NV50_3D_CULL_FACE_FRONT_AND_BACK 0x00000408 #define NV50_3D_LINE_LAST_PIXEL 0x00001924 #define NVA3_3D_FP_MULTISAMPLE 0x00001928 #define NVA3_3D_FP_MULTISAMPLE_EXPORT_SAMPLE_MASK 0x00000001 #define NVA3_3D_FP_MULTISAMPLE_FORCE_PER_SAMPLE 0x00000002 #define NV50_3D_VIEWPORT_TRANSFORM_EN 0x0000192c #define NV50_3D_VIEW_VOLUME_CLIP_CTRL 0x0000193c #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK0 0x00000001 #define NVA0_3D_VIEW_VOLUME_CLIP_CTRL_UNK1 0x00000002 #define NVA0_3D_VIEW_VOLUME_CLIP_CTRL_UNK2 0x00000004 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_NEAR 0x00000008 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_DEPTH_CLAMP_FAR 0x00000010 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK7 0x00000080 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK10 0x00000400 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK11 0x00000800 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__MASK 0x00003000 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12__SHIFT 12 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK0 0x00000000 #define NV50_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK1 0x00001000 #define NV84_3D_VIEW_VOLUME_CLIP_CTRL_UNK12_UNK2 0x00002000 #define NV50_3D_CLIP_DISTANCE_MODE 0x00001940 #define NV50_3D_CLIP_DISTANCE_MODE_0__MASK 0x00000001 #define NV50_3D_CLIP_DISTANCE_MODE_0__SHIFT 0 #define NV50_3D_CLIP_DISTANCE_MODE_0_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_0_CULL 0x00000001 #define NV50_3D_CLIP_DISTANCE_MODE_1__MASK 0x00000010 #define NV50_3D_CLIP_DISTANCE_MODE_1__SHIFT 4 #define NV50_3D_CLIP_DISTANCE_MODE_1_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_1_CULL 0x00000010 #define NV50_3D_CLIP_DISTANCE_MODE_2__MASK 0x00000100 #define NV50_3D_CLIP_DISTANCE_MODE_2__SHIFT 8 #define NV50_3D_CLIP_DISTANCE_MODE_2_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_2_CULL 0x00000100 #define NV50_3D_CLIP_DISTANCE_MODE_3__MASK 0x00001000 #define NV50_3D_CLIP_DISTANCE_MODE_3__SHIFT 12 #define NV50_3D_CLIP_DISTANCE_MODE_3_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_3_CULL 0x00001000 #define NV50_3D_CLIP_DISTANCE_MODE_4__MASK 0x00010000 #define NV50_3D_CLIP_DISTANCE_MODE_4__SHIFT 16 #define NV50_3D_CLIP_DISTANCE_MODE_4_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_4_CULL 0x00010000 #define NV50_3D_CLIP_DISTANCE_MODE_5__MASK 0x00100000 #define NV50_3D_CLIP_DISTANCE_MODE_5__SHIFT 20 #define NV50_3D_CLIP_DISTANCE_MODE_5_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_5_CULL 0x00100000 #define NV50_3D_CLIP_DISTANCE_MODE_6__MASK 0x01000000 #define NV50_3D_CLIP_DISTANCE_MODE_6__SHIFT 24 #define NV50_3D_CLIP_DISTANCE_MODE_6_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_6_CULL 0x01000000 #define NV50_3D_CLIP_DISTANCE_MODE_7__MASK 0x10000000 #define NV50_3D_CLIP_DISTANCE_MODE_7__SHIFT 28 #define NV50_3D_CLIP_DISTANCE_MODE_7_CLIP 0x00000000 #define NV50_3D_CLIP_DISTANCE_MODE_7_CULL 0x10000000 #define NVA3_3D_UNK1944 0x00001944 #define NV50_3D_CLIP_RECTS_EN 0x0000194c #define NV50_3D_CLIP_RECTS_MODE 0x00001950 #define NV50_3D_CLIP_RECTS_MODE_INSIDE_ANY 0x00000000 #define NV50_3D_CLIP_RECTS_MODE_OUTSIDE_ALL 0x00000001 #define NV50_3D_CLIP_RECTS_MODE_NEVER 0x00000002 #define NV50_3D_ZCULL_VALIDATE 0x00001954 #define NV50_3D_ZCULL_VALIDATE_CLEAR_UNK0 0x00000001 #define NV50_3D_ZCULL_VALIDATE_CLEAR_UNK1 0x00000010 #define NV50_3D_ZCULL_INVALIDATE 0x00001958 #define NVA3_3D_UNK1960 0x00001960 #define NVA3_3D_UNK1960_0 0x00000001 #define NVA3_3D_UNK1960_1 0x00000010 #define NV50_3D_UNK1968 0x00001968 #define NV50_3D_UNK1968_0 0x00000001 #define NV50_3D_UNK1968_1 0x00000010 #define NV50_3D_FP_CTRL_UNK196C 0x0000196c #define NV50_3D_FP_CTRL_UNK196C_0 0x00000001 #define NV50_3D_FP_CTRL_UNK196C_1 0x00000010 #define NV50_3D_UNK1978 0x00001978 #define NV50_3D_CLIPID_ENABLE 0x0000197c #define NV50_3D_CLIPID_WIDTH 0x00001980 #define NV50_3D_CLIPID_WIDTH__MAX 0x00002000 #define NV50_3D_CLIPID_WIDTH__ALIGN 0x00000040 #define NV50_3D_CLIPID_ID 0x00001984 #define NV50_3D_FP_INTERPOLANT_CTRL 0x00001988 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK__MASK 0xff000000 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK__SHIFT 24 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_X 0x01000000 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_Y 0x02000000 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_Z 0x04000000 #define NV50_3D_FP_INTERPOLANT_CTRL_UMASK_W 0x08000000 #define NV50_3D_FP_INTERPOLANT_CTRL_COUNT_NONFLAT__MASK 0x00ff0000 #define NV50_3D_FP_INTERPOLANT_CTRL_COUNT_NONFLAT__SHIFT 16 #define NV50_3D_FP_INTERPOLANT_CTRL_OFFSET__MASK 0x0000ff00 #define NV50_3D_FP_INTERPOLANT_CTRL_OFFSET__SHIFT 8 #define NV50_3D_FP_INTERPOLANT_CTRL_COUNT__MASK 0x000000ff #define NV50_3D_FP_INTERPOLANT_CTRL_COUNT__SHIFT 0 #define NV50_3D_FP_REG_ALLOC_TEMP 0x0000198c #define NV50_3D_REG_MODE 0x000019a0 #define NV50_3D_REG_MODE_PACKED 0x00000001 #define NV50_3D_REG_MODE_STRIPED 0x00000002 #define NV50_3D_FP_CONTROL 0x000019a8 #define NV50_3D_FP_CONTROL_MULTIPLE_RESULTS 0x00000001 #define NV50_3D_FP_CONTROL_EXPORTS_Z 0x00000100 #define NV50_3D_FP_CONTROL_USES_KIL 0x00100000 #define NV50_3D_DEPTH_BOUNDS_EN 0x000019bc #define NV50_3D_UNK19C0 0x000019c0 #define NV50_3D_LOGIC_OP_ENABLE 0x000019c4 #define NV50_3D_LOGIC_OP 0x000019c8 #define NV50_3D_LOGIC_OP_CLEAR 0x00001500 #define NV50_3D_LOGIC_OP_AND 0x00001501 #define NV50_3D_LOGIC_OP_AND_REVERSE 0x00001502 #define NV50_3D_LOGIC_OP_COPY 0x00001503 #define NV50_3D_LOGIC_OP_AND_INVERTED 0x00001504 #define NV50_3D_LOGIC_OP_NOOP 0x00001505 #define NV50_3D_LOGIC_OP_XOR 0x00001506 #define NV50_3D_LOGIC_OP_OR 0x00001507 #define NV50_3D_LOGIC_OP_NOR 0x00001508 #define NV50_3D_LOGIC_OP_EQUIV 0x00001509 #define NV50_3D_LOGIC_OP_INVERT 0x0000150a #define NV50_3D_LOGIC_OP_OR_REVERSE 0x0000150b #define NV50_3D_LOGIC_OP_COPY_INVERTED 0x0000150c #define NV50_3D_LOGIC_OP_OR_INVERTED 0x0000150d #define NV50_3D_LOGIC_OP_NAND 0x0000150e #define NV50_3D_LOGIC_OP_SET 0x0000150f #define NV50_3D_ZETA_COMP_ENABLE 0x000019cc #define NV50_3D_CLEAR_BUFFERS 0x000019d0 #define NV50_3D_CLEAR_BUFFERS_Z 0x00000001 #define NV50_3D_CLEAR_BUFFERS_S 0x00000002 #define NV50_3D_CLEAR_BUFFERS_R 0x00000004 #define NV50_3D_CLEAR_BUFFERS_G 0x00000008 #define NV50_3D_CLEAR_BUFFERS_B 0x00000010 #define NV50_3D_CLEAR_BUFFERS_A 0x00000020 #define NV50_3D_CLEAR_BUFFERS_RT__MASK 0x000003c0 #define NV50_3D_CLEAR_BUFFERS_RT__SHIFT 6 #define NV50_3D_CLEAR_BUFFERS_LAYER__MASK 0x001ffc00 #define NV50_3D_CLEAR_BUFFERS_LAYER__SHIFT 10 #define NV50_3D_CLIPID_FILL 0x000019d4 #define NV50_3D_UNK19D8(i0) (0x000019d8 + 0x4*(i0)) #define NV50_3D_UNK19D8__ESIZE 0x00000004 #define NV50_3D_UNK19D8__LEN 0x00000002 #define NV50_3D_RT_COMP_ENABLE(i0) (0x000019e0 + 0x4*(i0)) #define NV50_3D_RT_COMP_ENABLE__ESIZE 0x00000004 #define NV50_3D_RT_COMP_ENABLE__LEN 0x00000008 #define NV50_3D_COLOR_MASK(i0) (0x00001a00 + 0x4*(i0)) #define NV50_3D_COLOR_MASK__ESIZE 0x00000004 #define NV50_3D_COLOR_MASK__LEN 0x00000008 #define NV50_3D_COLOR_MASK_R 0x0000000f #define NV50_3D_COLOR_MASK_G 0x000000f0 #define NV50_3D_COLOR_MASK_B 0x00000f00 #define NV50_3D_COLOR_MASK_A 0x0000f000 #define NV50_3D_UNK1A20 0x00001a20 #define NV50_3D_DELAY 0x00001a24 #define NV50_3D_UNK1A28 0x00001a28 #define NV50_3D_UNK1A28_0__MASK 0x000000ff #define NV50_3D_UNK1A28_0__SHIFT 0 #define NV50_3D_UNK1A28_1 0x00000100 #define NV50_3D_UNK1A2C 0x00001a2c #define NV50_3D_UNK1A30 0x00001a30 #define NV50_3D_UNK1A34 0x00001a34 #define NV50_3D_UNK1A38 0x00001a38 #define NV50_3D_UNK1A3C 0x00001a3c #define NV50_3D_UNK1A40(i0) (0x00001a40 + 0x4*(i0)) #define NV50_3D_UNK1A40__ESIZE 0x00000004 #define NV50_3D_UNK1A40__LEN 0x00000010 #define NV50_3D_UNK1A40_0__MASK 0x00000007 #define NV50_3D_UNK1A40_0__SHIFT 0 #define NV50_3D_UNK1A40_1__MASK 0x00000070 #define NV50_3D_UNK1A40_1__SHIFT 4 #define NV50_3D_UNK1A40_2__MASK 0x00000700 #define NV50_3D_UNK1A40_2__SHIFT 8 #define NV50_3D_UNK1A40_3__MASK 0x00007000 #define NV50_3D_UNK1A40_3__SHIFT 12 #define NV50_3D_UNK1A40_4__MASK 0x00070000 #define NV50_3D_UNK1A40_4__SHIFT 16 #define NV50_3D_UNK1A40_5__MASK 0x00700000 #define NV50_3D_UNK1A40_5__SHIFT 20 #define NV50_3D_UNK1A40_6__MASK 0x07000000 #define NV50_3D_UNK1A40_6__SHIFT 24 #define NV50_3D_UNK1A40_7__MASK 0x70000000 #define NV50_3D_UNK1A40_7__SHIFT 28 #define NV50_3D_STRMOUT_ADDRESS_HIGH(i0) (0x00001a80 + 0x10*(i0)) #define NV50_3D_STRMOUT_ADDRESS_HIGH__ESIZE 0x00000010 #define NV50_3D_STRMOUT_ADDRESS_HIGH__LEN 0x00000004 #define NV50_3D_STRMOUT_ADDRESS_LOW(i0) (0x00001a84 + 0x10*(i0)) #define NV50_3D_STRMOUT_ADDRESS_LOW__ESIZE 0x00000010 #define NV50_3D_STRMOUT_ADDRESS_LOW__LEN 0x00000004 #define NV50_3D_STRMOUT_NUM_ATTRIBS(i0) (0x00001a88 + 0x10*(i0)) #define NV50_3D_STRMOUT_NUM_ATTRIBS__ESIZE 0x00000010 #define NV50_3D_STRMOUT_NUM_ATTRIBS__LEN 0x00000004 #define NV50_3D_STRMOUT_NUM_ATTRIBS__MAX 0x00000040 #define NVA0_3D_STRMOUT_OFFSET_LIMIT(i0) (0x00001a8c + 0x10*(i0)) #define NVA0_3D_STRMOUT_OFFSET_LIMIT__ESIZE 0x00000010 #define NVA0_3D_STRMOUT_OFFSET_LIMIT__LEN 0x00000004 #define NV50_3D_VERTEX_ARRAY_ATTRIB(i0) (0x00001ac0 + 0x4*(i0)) #define NV50_3D_VERTEX_ARRAY_ATTRIB__ESIZE 0x00000004 #define NV50_3D_VERTEX_ARRAY_ATTRIB__LEN 0x00000010 #define NV50_3D_VERTEX_ARRAY_ATTRIB_BUFFER__MASK 0x0000000f #define NV50_3D_VERTEX_ARRAY_ATTRIB_BUFFER__SHIFT 0 #define NV50_3D_VERTEX_ARRAY_ATTRIB_CONST 0x00000010 #define NV50_3D_VERTEX_ARRAY_ATTRIB_OFFSET__MASK 0x0007ffe0 #define NV50_3D_VERTEX_ARRAY_ATTRIB_OFFSET__SHIFT 5 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT__MASK 0x01f80000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT__SHIFT 19 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32_32 0x00080000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32_32 0x00100000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16_16 0x00180000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32_32 0x00200000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16_16 0x00280000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8_8 0x00500000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16_16 0x00780000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_32 0x00900000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8_8 0x00980000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8_8 0x00c00000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_16 0x00d80000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_8 0x00e80000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_FORMAT_10_10_10_2 0x01800000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__MASK 0x7e000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE__SHIFT 25 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_FLOAT 0x7e000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_UNORM 0x24000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SNORM 0x12000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_USCALED 0x5a000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SSCALED 0x6c000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_UINT 0x48000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_TYPE_SINT 0x36000000 #define NV50_3D_VERTEX_ARRAY_ATTRIB_BGRA 0x80000000 #define NV50_3D_QUERY_ADDRESS_HIGH 0x00001b00 #define NV50_3D_QUERY_ADDRESS_LOW 0x00001b04 #define NV50_3D_QUERY_SEQUENCE 0x00001b08 #define NV50_3D_QUERY_GET 0x00001b0c #define NV50_3D_QUERY_GET_MODE__MASK 0x00000003 #define NV50_3D_QUERY_GET_MODE__SHIFT 0 #define NV50_3D_QUERY_GET_MODE_WRITE_UNK0 0x00000000 #define NV50_3D_QUERY_GET_MODE_SYNC 0x00000001 #define NV50_3D_QUERY_GET_MODE_WRITE_UNK2 0x00000002 #define NV50_3D_QUERY_GET_UNK4 0x00000010 #define NVA0_3D_QUERY_GET_INDEX__MASK 0x000000e0 #define NVA0_3D_QUERY_GET_INDEX__SHIFT 5 #define NV50_3D_QUERY_GET_UNK8 0x00000100 #define NV50_3D_QUERY_GET_UNIT__MASK 0x0000f000 #define NV50_3D_QUERY_GET_UNIT__SHIFT 12 #define NV50_3D_QUERY_GET_UNIT_UNK00 0x00000000 #define NV50_3D_QUERY_GET_UNIT_VFETCH 0x00001000 #define NV50_3D_QUERY_GET_UNIT_VP 0x00002000 #define NV50_3D_QUERY_GET_UNIT_RAST 0x00004000 #define NV50_3D_QUERY_GET_UNIT_STRMOUT 0x00005000 #define NV50_3D_QUERY_GET_UNIT_GP 0x00006000 #define NV50_3D_QUERY_GET_UNIT_ZCULL 0x00007000 #define NV50_3D_QUERY_GET_UNIT_TPROP 0x0000a000 #define NV50_3D_QUERY_GET_UNIT_UNK0C 0x0000c000 #define NV50_3D_QUERY_GET_UNIT_CROP 0x0000f000 #define NV50_3D_QUERY_GET_SYNC_COND__MASK 0x00010000 #define NV50_3D_QUERY_GET_SYNC_COND__SHIFT 16 #define NV50_3D_QUERY_GET_SYNC_COND_NEQUAL 0x00000000 #define NV50_3D_QUERY_GET_SYNC_COND_GREATER 0x00010000 #define NV50_3D_QUERY_GET_INTR 0x00100000 #define NV50_3D_QUERY_GET_TYPE__MASK 0x00800000 #define NV50_3D_QUERY_GET_TYPE__SHIFT 23 #define NV50_3D_QUERY_GET_TYPE_QUERY 0x00000000 #define NV50_3D_QUERY_GET_TYPE_COUNTER 0x00800000 #define NV50_3D_QUERY_GET_QUERY_SELECT__MASK 0x0f000000 #define NV50_3D_QUERY_GET_QUERY_SELECT__SHIFT 24 #define NV50_3D_QUERY_GET_QUERY_SELECT_ZERO 0x00000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_SAMPLECNT 0x01000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_STRMOUT_NO_OVERFLOW 0x02000000 #define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_DROPPED_PRIMITIVES 0x03000000 #define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_VERTICES 0x04000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK0 0x05000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK1 0x06000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK2 0x07000000 #define NV50_3D_QUERY_GET_QUERY_SELECT_ZCULL_STAT_UNK3 0x08000000 #define NVA0_3D_QUERY_GET_QUERY_SELECT_RT_UNK14 0x0c000000 #define NVA0_3D_QUERY_GET_QUERY_SELECT_STRMOUT_OFFSET 0x0d000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT__MASK 0x0f000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT__SHIFT 24 #define NV50_3D_QUERY_GET_COUNTER_SELECT_VFETCH_VERTICES 0x00000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_VFETCH_PRIMITIVES 0x01000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_VP_LAUNCHES 0x02000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_GP_LAUNCHES 0x03000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_GP_PRIMITIVES_OUT 0x04000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_TRANSFORM_FEEDBACK 0x05000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_GENERATED_PRIMITIVES 0x06000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_RAST_PRIMITIVES_PRECLIP 0x07000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_RAST_PRIMITIVES_POSTCLIP 0x08000000 #define NV50_3D_QUERY_GET_COUNTER_SELECT_FP_PIXELS 0x09000000 #define NV84_3D_QUERY_GET_COUNTER_SELECT_UNK0A 0x0a000000 #define NVA0_3D_QUERY_GET_COUNTER_SELECT_UNK0C 0x0c000000 #define NV50_3D_QUERY_GET_SHORT 0x10000000 #define NVA3_3D_VP_RESULT_MAP_ALT(i0) (0x00001b3c + 0x4*(i0)) #define NVA3_3D_VP_RESULT_MAP_ALT__ESIZE 0x00000004 #define NVA3_3D_VP_RESULT_MAP_ALT__LEN 0x00000020 #define NVA3_3D_VP_RESULT_MAP_ALT_0__MASK 0x000000ff #define NVA3_3D_VP_RESULT_MAP_ALT_0__SHIFT 0 #define NVA3_3D_VP_RESULT_MAP_ALT_1__MASK 0x0000ff00 #define NVA3_3D_VP_RESULT_MAP_ALT_1__SHIFT 8 #define NVA3_3D_VP_RESULT_MAP_ALT_2__MASK 0x00ff0000 #define NVA3_3D_VP_RESULT_MAP_ALT_2__SHIFT 16 #define NVA3_3D_VP_RESULT_MAP_ALT_3__MASK 0xff000000 #define NVA3_3D_VP_RESULT_MAP_ALT_3__SHIFT 24 #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT(i0) (0x00001c00 + 0x10*(i0)) #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT__ESIZE 0x00000010 #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT__LEN 0x00000020 #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_STRIDE__MASK 0x00000fff #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_STRIDE__SHIFT 0 #define NVA3_3D_VERTEX_ARRAY_FETCH_ALT_ENABLE 0x20000000 #define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT(i0) (0x00001c04 + 0x10*(i0)) #define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT__ESIZE 0x00000010 #define NVA3_3D_VERTEX_ARRAY_START_HIGH_ALT__LEN 0x00000020 #define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT(i0) (0x00001c08 + 0x10*(i0)) #define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT__ESIZE 0x00000010 #define NVA3_3D_VERTEX_ARRAY_START_LOW_ALT__LEN 0x00000020 #define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT(i0) (0x00001c0c + 0x10*(i0)) #define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT__ESIZE 0x00000010 #define NVA3_3D_VERTEX_ARRAY_DIVISOR_ALT__LEN 0x00000020 #define NVA3_3D_IBLEND(i0) (0x00001e00 + 0x20*(i0)) #define NVA3_3D_IBLEND__ESIZE 0x00000020 #define NVA3_3D_IBLEND__LEN 0x00000008 #define NVA3_3D_IBLEND_SEPARATE_ALPHA(i0) (0x00001e00 + 0x20*(i0)) #define NVA3_3D_IBLEND_EQUATION_RGB(i0) (0x00001e04 + 0x20*(i0)) #define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_ADD 0x00008006 #define NVA3_3D_IBLEND_EQUATION_RGB_MIN 0x00008007 #define NVA3_3D_IBLEND_EQUATION_RGB_MAX 0x00008008 #define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_SUBTRACT 0x0000800a #define NVA3_3D_IBLEND_EQUATION_RGB_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVA3_3D_IBLEND_FUNC_SRC_RGB(i0) (0x00001e08 + 0x20*(i0)) #define NVA3_3D_IBLEND_FUNC_DST_RGB(i0) (0x00001e0c + 0x20*(i0)) #define NVA3_3D_IBLEND_EQUATION_ALPHA(i0) (0x00001e10 + 0x20*(i0)) #define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_ADD 0x00008006 #define NVA3_3D_IBLEND_EQUATION_ALPHA_MIN 0x00008007 #define NVA3_3D_IBLEND_EQUATION_ALPHA_MAX 0x00008008 #define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_SUBTRACT 0x0000800a #define NVA3_3D_IBLEND_EQUATION_ALPHA_FUNC_REVERSE_SUBTRACT 0x0000800b #define NVA3_3D_IBLEND_FUNC_SRC_ALPHA(i0) (0x00001e14 + 0x20*(i0)) #define NVA3_3D_IBLEND_FUNC_DST_ALPHA(i0) (0x00001e18 + 0x20*(i0)) #define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT(i0) (0x00001f00 + 0x8*(i0)) #define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT__ESIZE 0x00000008 #define NVA3_3D_VERTEX_ARRAY_LIMIT_HIGH_ALT__LEN 0x00000020 #define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT(i0) (0x00001f04 + 0x8*(i0)) #define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT__ESIZE 0x00000008 #define NVA3_3D_VERTEX_ARRAY_LIMIT_LOW_ALT__LEN 0x00000020 #endif /* _HOME_SKEGGSB_GIT_ENVYTOOLS_RNNDB_NV50_3D_XML */ xf86-video-nouveau-1.0.18/src/hwdefs/nv50_texture.h0000644000175000017500000002540014713424663015444 #ifndef __NV50_TEXTURE_H__ #define __NV50_TEXTURE_H__ /* It'd be really nice to have these in nouveau_class.h generated by * renouveau like the rest of the object header - but not sure it can * handle non-object stuff nicely - need to look into it. */ /* Texture image control block */ #define NV50TIC_0_0_MAPA_MASK 0x38000000 #define NV50TIC_0_0_MAPA_ZERO 0x00000000 #define NV50TIC_0_0_MAPA_C0 0x10000000 #define NV50TIC_0_0_MAPA_C1 0x18000000 #define NV50TIC_0_0_MAPA_C2 0x20000000 #define NV50TIC_0_0_MAPA_C3 0x28000000 #define NV50TIC_0_0_MAPA_ONE 0x38000000 #define NV50TIC_0_0_MAPB_MASK 0x07000000 #define NV50TIC_0_0_MAPB_ZERO 0x00000000 #define NV50TIC_0_0_MAPB_C0 0x02000000 #define NV50TIC_0_0_MAPB_C1 0x03000000 #define NV50TIC_0_0_MAPB_C2 0x04000000 #define NV50TIC_0_0_MAPB_C3 0x05000000 #define NV50TIC_0_0_MAPB_ONE 0x07000000 #define NV50TIC_0_0_MAPG_MASK 0x00e00000 #define NV50TIC_0_0_MAPG_ZERO 0x00000000 #define NV50TIC_0_0_MAPG_C0 0x00400000 #define NV50TIC_0_0_MAPG_C1 0x00600000 #define NV50TIC_0_0_MAPG_C2 0x00800000 #define NV50TIC_0_0_MAPG_C3 0x00a00000 #define NV50TIC_0_0_MAPG_ONE 0x00e00000 #define NV50TIC_0_0_MAPR_MASK 0x001c0000 #define NV50TIC_0_0_MAPR_ZERO 0x00000000 #define NV50TIC_0_0_MAPR_C0 0x00080000 #define NV50TIC_0_0_MAPR_C1 0x000c0000 #define NV50TIC_0_0_MAPR_C2 0x00100000 #define NV50TIC_0_0_MAPR_C3 0x00140000 #define NV50TIC_0_0_MAPR_ONE 0x001c0000 #define NV50TIC_0_0_TYPEA_MASK 0x00038000 #define NV50TIC_0_0_TYPEA_UNORM 0x00010000 #define NV50TIC_0_0_TYPEA_SNORM 0x00008000 #define NV50TIC_0_0_TYPEA_SINT 0x00018000 #define NV50TIC_0_0_TYPEA_UINT 0x00020000 #define NV50TIC_0_0_TYPEA_FLOAT 0x00038000 #define NV50TIC_0_0_TYPEB_MASK 0x00007000 #define NV50TIC_0_0_TYPEB_UNORM 0x00002000 #define NV50TIC_0_0_TYPEB_SNORM 0x00001000 #define NV50TIC_0_0_TYPEB_SINT 0x00003000 #define NV50TIC_0_0_TYPEB_UINT 0x00004000 #define NV50TIC_0_0_TYPEB_FLOAT 0x00007000 #define NV50TIC_0_0_TYPEG_MASK 0x00000e00 #define NV50TIC_0_0_TYPEG_UNORM 0x00000400 #define NV50TIC_0_0_TYPEG_SNORM 0x00000200 #define NV50TIC_0_0_TYPEG_SINT 0x00000600 #define NV50TIC_0_0_TYPEG_UINT 0x00000800 #define NV50TIC_0_0_TYPEG_FLOAT 0x00000e00 #define NV50TIC_0_0_TYPER_MASK 0x000001c0 #define NV50TIC_0_0_TYPER_UNORM 0x00000080 #define NV50TIC_0_0_TYPER_SNORM 0x00000040 #define NV50TIC_0_0_TYPER_SINT 0x000000c0 #define NV50TIC_0_0_TYPER_UINT 0x00000100 #define NV50TIC_0_0_TYPER_FLOAT 0x000001c0 #define NV50TIC_0_0_FMT_MASK 0x0000003f #define NV50TIC_0_0_FMT_32_32_32_32 0x00000001 #define NV50TIC_0_0_FMT_16_16_16_16 0x00000003 #define NV50TIC_0_0_FMT_32_32 0x00000004 #define NV50TIC_0_0_FMT_8_8_8_8 0x00000008 #define NV50TIC_0_0_FMT_2_10_10_10 0x00000009 #define NV50TIC_0_0_FMT_16_16 0x0000000c #define NV50TIC_0_0_FMT_32 0x0000000f #define NV50TIC_0_0_FMT_4_4_4_4 0x00000012 /* #define NV50TIC_0_0_FMT_1_5_5_5 0x00000013 */ #define NV50TIC_0_0_FMT_1_5_5_5 0x00000014 #define NV50TIC_0_0_FMT_5_6_5 0x00000015 #define NV50TIC_0_0_FMT_8_8 0x00000018 #define NV50TIC_0_0_FMT_16 0x0000001b #define NV50TIC_0_0_FMT_8 0x0000001d #define NV50TIC_0_0_FMT_5_9_9_9 0x00000020 #define NV50TIC_0_0_FMT_10_11_11 0x00000021 #define NV50TIC_0_0_FMT_DXT1 0x00000024 #define NV50TIC_0_0_FMT_DXT3 0x00000025 #define NV50TIC_0_0_FMT_DXT5 0x00000026 #define NV50TIC_0_0_FMT_RGTC1 0x00000027 #define NV50TIC_0_0_FMT_RGTC2 0x00000028 #define NV50TIC_0_0_FMT_24_8 0x00000029 #define NV50TIC_0_0_FMT_8_24 0x0000002a #define NV50TIC_0_0_FMT_32_DEPTH 0x0000002f #define NV50TIC_0_0_FMT_32_8 0x00000030 #define NV50TIC_0_1_OFFSET_LOW_MASK 0xffffffff #define NV50TIC_0_1_OFFSET_LOW_SHIFT 0 #define NV50TIC_0_2_UNKNOWN_MASK 0xffffffff #define NV50TIC_0_3_UNKNOWN_MASK 0xffffffff #define NV50TIC_0_4_WIDTH_MASK 0x0000ffff #define NV50TIC_0_4_WIDTH_SHIFT 0 #define NV50TIC_0_5_DEPTH_MASK 0xffff0000 #define NV50TIC_0_5_DEPTH_SHIFT 16 #define NV50TIC_0_5_HEIGHT_MASK 0x0000ffff #define NV50TIC_0_5_HEIGHT_SHIFT 0 #define NV50TIC_0_6_UNKNOWN_MASK 0xffffffff #define NV50TIC_0_7_OFFSET_HIGH_MASK 0xffffffff #define NV50TIC_0_7_OFFSET_HIGH_SHIFT 0 /* Texture sampler control block */ #define NV50TSC_1_0_WRAPS_MASK 0x00000007 #define NV50TSC_1_0_WRAPS_REPEAT 0x00000000 #define NV50TSC_1_0_WRAPS_MIRROR_REPEAT 0x00000001 #define NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE 0x00000002 #define NV50TSC_1_0_WRAPS_CLAMP_TO_BORDER 0x00000003 #define NV50TSC_1_0_WRAPS_CLAMP 0x00000004 #define NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_EDGE 0x00000005 #define NV50TSC_1_0_WRAPS_MIRROR_CLAMP_TO_BORDER 0x00000006 #define NV50TSC_1_0_WRAPS_MIRROR_CLAMP 0x00000007 #define NV50TSC_1_0_WRAPT_MASK 0x00000038 #define NV50TSC_1_0_WRAPT_REPEAT 0x00000000 #define NV50TSC_1_0_WRAPT_MIRROR_REPEAT 0x00000008 #define NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE 0x00000010 #define NV50TSC_1_0_WRAPT_CLAMP_TO_BORDER 0x00000018 #define NV50TSC_1_0_WRAPT_CLAMP 0x00000020 #define NV50TSC_1_0_WRAPT_MIRROR_CLAMP_TO_EDGE 0x00000028 #define NV50TSC_1_0_WRAPT_MIRROR_CLAMP_TO_BORDER 0x00000030 #define NV50TSC_1_0_WRAPT_MIRROR_CLAMP 0x00000038 #define NV50TSC_1_0_WRAPR_MASK 0x000001c0 #define NV50TSC_1_0_WRAPR_REPEAT 0x00000000 #define NV50TSC_1_0_WRAPR_MIRROR_REPEAT 0x00000040 #define NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE 0x00000080 #define NV50TSC_1_0_WRAPR_CLAMP_TO_BORDER 0x000000c0 #define NV50TSC_1_0_WRAPR_CLAMP 0x00000100 #define NV50TSC_1_0_WRAPR_MIRROR_CLAMP_TO_EDGE 0x00000140 #define NV50TSC_1_0_WRAPR_MIRROR_CLAMP_TO_BORDER 0x00000180 #define NV50TSC_1_0_WRAPR_MIRROR_CLAMP 0x000001c0 #define NV50TSC_1_0_MAX_ANISOTROPY_MASK 0x00700000 #define NV50TSC_1_1_MAGF_MASK 0x00000003 #define NV50TSC_1_1_MAGF_NEAREST 0x00000001 #define NV50TSC_1_1_MAGF_LINEAR 0x00000002 #define NV50TSC_1_1_MINF_MASK 0x00000030 #define NV50TSC_1_1_MINF_NEAREST 0x00000010 #define NV50TSC_1_1_MINF_LINEAR 0x00000020 #define NV50TSC_1_1_MIPF_MASK 0x000000c0 #define NV50TSC_1_1_MIPF_NONE 0x00000040 #define NV50TSC_1_1_MIPF_NEAREST 0x00000080 #define NV50TSC_1_1_MIPF_LINEAR 0x000000c0 #define NV50TSC_1_1_LOD_BIAS_MASK 0x01fff000 #define NV50TSC_1_1_UNKN_ANISO_15 0x10000000 #define NV50TSC_1_1_UNKN_ANISO_35 0x18000000 #define NV50TSC_1_2_MIN_LOD_MASK 0x00000f00 #define NV50TSC_1_2_MAX_LOD_MASK 0x00f00000 #define NV50TSC_1_3_UNKNOWN_MASK 0xffffffff #define NV50TSC_1_4_BORDER_COLOR_RED_MASK 0xffffffff #define NV50TSC_1_5_BORDER_COLOR_GREEN_MASK 0xffffffff #define NV50TSC_1_6_BORDER_COLOR_BLUE_MASK 0xffffffff #define NV50TSC_1_7_BORDER_COLOR_ALPHA_MASK 0xffffffff #endif xf86-video-nouveau-1.0.18/src/nvc0_exa.c0000644000175000017500000007124414713424663013321 /* * Copyright 2007 NVIDIA, Corporation * Copyright 2008 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nv_rop.h" #include "nvc0_accel.h" #include "nouveau_copy.h" #define NOUVEAU_BO(a, b, c) (NOUVEAU_BO_##a | NOUVEAU_BO_##b | NOUVEAU_BO_##c) #define NVC0EXA_LOCALS(p) \ ScrnInfoPtr pScrn = xf86ScreenToScrn((p)->drawable.pScreen); \ NVPtr pNv = NVPTR(pScrn); \ struct nouveau_pushbuf *push = pNv->pushbuf; (void)push; #define BF(f) NV50_BLEND_FACTOR_##f struct nvc0_blend_op { unsigned src_alpha; unsigned dst_alpha; unsigned src_blend; unsigned dst_blend; }; static struct nvc0_blend_op NVC0EXABlendOp[] = { /* Clear */ { 0, 0, BF( ZERO), BF( ZERO) }, /* Src */ { 0, 0, BF( ONE), BF( ZERO) }, /* Dst */ { 0, 0, BF( ZERO), BF( ONE) }, /* Over */ { 1, 0, BF( ONE), BF(ONE_MINUS_SRC_ALPHA) }, /* OverReverse */ { 0, 1, BF(ONE_MINUS_DST_ALPHA), BF( ONE) }, /* In */ { 0, 1, BF( DST_ALPHA), BF( ZERO) }, /* InReverse */ { 1, 0, BF( ZERO), BF( SRC_ALPHA) }, /* Out */ { 0, 1, BF(ONE_MINUS_DST_ALPHA), BF( ZERO) }, /* OutReverse */ { 1, 0, BF( ZERO), BF(ONE_MINUS_SRC_ALPHA) }, /* Atop */ { 1, 1, BF( DST_ALPHA), BF(ONE_MINUS_SRC_ALPHA) }, /* AtopReverse */ { 1, 1, BF(ONE_MINUS_DST_ALPHA), BF( SRC_ALPHA) }, /* Xor */ { 1, 1, BF(ONE_MINUS_DST_ALPHA), BF(ONE_MINUS_SRC_ALPHA) }, /* Add */ { 0, 0, BF( ONE), BF( ONE) }, }; static Bool NVC0EXA2DSurfaceFormat(PixmapPtr ppix, uint32_t *fmt) { NVC0EXA_LOCALS(ppix); switch (ppix->drawable.bitsPerPixel) { case 8 : *fmt = NV50_SURFACE_FORMAT_R8_UNORM; break; case 15: *fmt = NV50_SURFACE_FORMAT_BGR5_X1_UNORM; break; case 16: *fmt = NV50_SURFACE_FORMAT_B5G6R5_UNORM; break; case 24: *fmt = NV50_SURFACE_FORMAT_BGRX8_UNORM; break; case 30: *fmt = NV50_SURFACE_FORMAT_RGB10_A2_UNORM; break; case 32: *fmt = NV50_SURFACE_FORMAT_BGRA8_UNORM; break; default: NOUVEAU_FALLBACK("Unknown surface format for bpp=%d\n", ppix->drawable.bitsPerPixel); return FALSE; } return TRUE; } static void NVC0EXASetClip(PixmapPtr ppix, int x, int y, int w, int h) { NVC0EXA_LOCALS(ppix); BEGIN_NVC0(push, NV50_2D(CLIP_X), 4); PUSH_DATA (push, x); PUSH_DATA (push, y); PUSH_DATA (push, w); PUSH_DATA (push, h); } static void NVC0EXAAcquireSurface2D(PixmapPtr ppix, int is_src, uint32_t fmt) { NVC0EXA_LOCALS(ppix); struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pixmap *nvpix = nouveau_pixmap(ppix); int mthd = is_src ? NV50_2D_SRC_FORMAT : NV50_2D_DST_FORMAT; uint32_t bo_flags; bo_flags = nvpix->shared ? NOUVEAU_BO_GART : NOUVEAU_BO_VRAM; bo_flags |= is_src ? NOUVEAU_BO_RD : NOUVEAU_BO_WR; if (!nv50_style_tiled_pixmap(ppix)) { BEGIN_NVC0(push, SUBC_2D(mthd), 2); PUSH_DATA (push, fmt); PUSH_DATA (push, 1); BEGIN_NVC0(push, SUBC_2D(mthd + 0x14), 1); PUSH_DATA (push, (uint32_t)exaGetPixmapPitch(ppix)); } else { BEGIN_NVC0(push, SUBC_2D(mthd), 5); PUSH_DATA (push, fmt); PUSH_DATA (push, 0); PUSH_DATA (push, bo->config.nvc0.tile_mode); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } BEGIN_NVC0(push, SUBC_2D(mthd + 0x18), 4); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); PUSH_DATA (push, bo->offset >> 32); PUSH_DATA (push, bo->offset); if (is_src == 0) NVC0EXASetClip(ppix, 0, 0, ppix->drawable.width, ppix->drawable.height); PUSH_REFN (push, bo, bo_flags); } static void NVC0EXASetPattern(PixmapPtr pdpix, int col0, int col1, int pat0, int pat1) { NVC0EXA_LOCALS(pdpix); BEGIN_NVC0(push, NV50_2D(PATTERN_COLOR(0)), 4); PUSH_DATA (push, col0); PUSH_DATA (push, col1); PUSH_DATA (push, pat0); PUSH_DATA (push, pat1); } static void NVC0EXASetROP(PixmapPtr pdpix, int alu, Pixel planemask) { NVC0EXA_LOCALS(pdpix); int rop; if (planemask != ~0) rop = NVROP[alu].copy_planemask; else rop = NVROP[alu].copy; BEGIN_NVC0(push, NV50_2D(OPERATION), 1); if (alu == GXcopy && EXA_PM_IS_SOLID(&pdpix->drawable, planemask)) { PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY); return; } else { PUSH_DATA (push, NV50_2D_OPERATION_ROP); } BEGIN_NVC0(push, NV50_2D(PATTERN_COLOR_FORMAT), 2); switch (pdpix->drawable.bitsPerPixel) { case 8: PUSH_DATA (push, 3); break; case 15: PUSH_DATA (push, 1); break; case 16: PUSH_DATA (push, 0); break; case 24: case 32: default: PUSH_DATA (push, 2); break; } PUSH_DATA (push, 1); /* There are 16 ALUs. * 0-15: copy * 16-31: copy_planemask */ if (!EXA_PM_IS_SOLID(&pdpix->drawable, planemask)) { alu += 16; NVC0EXASetPattern(pdpix, 0, planemask, ~0, ~0); } else { if (pNv->currentRop > 15) NVC0EXASetPattern(pdpix, ~0, ~0, ~0, ~0); } if (pNv->currentRop != alu) { BEGIN_NVC0(push, NV50_2D(ROP), 1); PUSH_DATA (push, rop); pNv->currentRop = alu; } } Bool NVC0EXAPrepareSolid(PixmapPtr pdpix, int alu, Pixel planemask, Pixel fg) { NVC0EXA_LOCALS(pdpix); uint32_t fmt; if (!NVC0EXA2DSurfaceFormat(pdpix, &fmt)) NOUVEAU_FALLBACK("rect format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NVC0EXAAcquireSurface2D(pdpix, 0, fmt); NVC0EXASetROP(pdpix, alu, planemask); BEGIN_NVC0(push, NV50_2D(DRAW_SHAPE), 3); PUSH_DATA (push, NV50_2D_DRAW_SHAPE_RECTANGLES); PUSH_DATA (push, fmt); PUSH_DATA (push, fg); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NVC0EXASolid(PixmapPtr pdpix, int x1, int y1, int x2, int y2) { NVC0EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 8)) return; BEGIN_NVC0(push, NV50_2D(DRAW_POINT32_X(0)), 4); PUSH_DATA (push, x1); PUSH_DATA (push, y1); PUSH_DATA (push, x2); PUSH_DATA (push, y2); if ((x2 - x1) * (y2 - y1) >= 512) PUSH_KICK(push); } void NVC0EXADoneSolid(PixmapPtr pdpix) { NVC0EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NVC0EXAPrepareCopy(PixmapPtr pspix, PixmapPtr pdpix, int dx, int dy, int alu, Pixel planemask) { NVC0EXA_LOCALS(pdpix); uint32_t src, dst; if (!NVC0EXA2DSurfaceFormat(pspix, &src)) NOUVEAU_FALLBACK("src format\n"); if (!NVC0EXA2DSurfaceFormat(pdpix, &dst)) NOUVEAU_FALLBACK("dst format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NVC0EXAAcquireSurface2D(pspix, 1, src); NVC0EXAAcquireSurface2D(pdpix, 0, dst); NVC0EXASetROP(pdpix, alu, planemask); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NVC0EXACopy(PixmapPtr pdpix, int srcX , int srcY, int dstX , int dstY, int width, int height) { NVC0EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 32)) return; BEGIN_NVC0(push, SUBC_2D(NV50_GRAPH_SERIALIZE), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NV50_2D(BLIT_CONTROL), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NV50_2D(BLIT_DST_X), 12); PUSH_DATA (push, dstX); PUSH_DATA (push, dstY); PUSH_DATA (push, width); PUSH_DATA (push, height); PUSH_DATA (push, 0); /* DU,V_DX,Y_FRACT,INT */ PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); /* BLIT_SRC_X,Y_FRACT,INT */ PUSH_DATA (push, srcX); PUSH_DATA (push, 0); PUSH_DATA (push, srcY); if (width * height >= 512) PUSH_KICK(push); } void NVC0EXADoneCopy(PixmapPtr pdpix) { NVC0EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NVC0EXAUploadSIFC(const char *src, int src_pitch, PixmapPtr pdpix, int x, int y, int w, int h, int cpp) { NVC0EXA_LOCALS(pdpix); ScreenPtr pScreen = pdpix->drawable.pScreen; int line_dwords = (w * cpp + 3) / 4; uint32_t sifc_fmt; Bool ret = FALSE; if (!NVC0EXA2DSurfaceFormat(pdpix, &sifc_fmt)) NOUVEAU_FALLBACK("hostdata format\n"); if (!PUSH_SPACE(push, 64)) NOUVEAU_FALLBACK("pushbuf\n"); PUSH_RESET(push); NVC0EXAAcquireSurface2D(pdpix, 0, sifc_fmt); NVC0EXASetClip(pdpix, x, y, w, h); BEGIN_NVC0(push, NV50_2D(OPERATION), 1); PUSH_DATA (push, NV50_2D_OPERATION_SRCCOPY); BEGIN_NVC0(push, NV50_2D(SIFC_BITMAP_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, sifc_fmt); BEGIN_NVC0(push, NV50_2D(SIFC_WIDTH), 10); PUSH_DATA (push, (line_dwords * 4) / cpp); PUSH_DATA (push, h); PUSH_DATA (push, 0); /* SIFC_DX,Y_DU,V_FRACT,INT */ PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, 1); PUSH_DATA (push, 0); /* SIFC_DST_X,Y_FRACT,INT */ PUSH_DATA (push, x); PUSH_DATA (push, 0); PUSH_DATA (push, y); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) goto out; while (h--) { const char *ptr = src; int count = line_dwords; while (count) { int size = count > 1792 ? 1792 : count; if (!PUSH_SPACE(push, size + 1)) goto out; BEGIN_NIC0(push, NV50_2D(SIFC_DATA), size); PUSH_DATAp(push, ptr, size); ptr += size * 4; count -= size; } src += src_pitch; } ret = TRUE; out: nouveau_pushbuf_bufctx(push, NULL); if (pdpix == pScreen->GetScreenPixmap(pScreen)) PUSH_KICK(push); return ret; } static Bool NVC0EXACheckRenderTarget(PicturePtr ppict) { if (ppict->pDrawable->width > 8192 || ppict->pDrawable->height > 8192) NOUVEAU_FALLBACK("render target dimensions exceeded %dx%d\n", ppict->pDrawable->width, ppict->pDrawable->height); switch (ppict->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_r5g6b5: case PICT_a8: case PICT_x1r5g5b5: case PICT_a1r5g5b5: case PICT_x8b8g8r8: case PICT_a2b10g10r10: case PICT_x2b10g10r10: case PICT_a2r10g10b10: case PICT_x2r10g10b10: break; default: NOUVEAU_FALLBACK("picture format 0x%08x\n", ppict->format); } return TRUE; } static Bool NVC0EXARenderTarget(PixmapPtr ppix, PicturePtr ppict) { NVC0EXA_LOCALS(ppix); struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); unsigned format; /*XXX: Scanout buffer not tiled, someone needs to figure it out */ if (!nv50_style_tiled_pixmap(ppix)) NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); switch (ppict->format) { case PICT_a8r8g8b8: format = NV50_SURFACE_FORMAT_BGRA8_UNORM; break; case PICT_x8r8g8b8: format = NV50_SURFACE_FORMAT_BGRX8_UNORM; break; case PICT_r5g6b5 : format = NV50_SURFACE_FORMAT_B5G6R5_UNORM; break; case PICT_a8 : format = NV50_SURFACE_FORMAT_A8_UNORM; break; case PICT_x1r5g5b5: format = NV50_SURFACE_FORMAT_BGR5_X1_UNORM; break; case PICT_a1r5g5b5: format = NV50_SURFACE_FORMAT_BGR5_A1_UNORM; break; case PICT_x8b8g8r8: format = NV50_SURFACE_FORMAT_RGBX8_UNORM; break; case PICT_a2b10g10r10: case PICT_x2b10g10r10: format = NV50_SURFACE_FORMAT_RGB10_A2_UNORM; break; case PICT_a2r10g10b10: case PICT_x2r10g10b10: format = NV50_SURFACE_FORMAT_BGR10_A2_UNORM; break; default: NOUVEAU_FALLBACK("invalid picture format\n"); } BEGIN_NVC0(push, NVC0_3D(RT_ADDRESS_HIGH(0)), 8); PUSH_DATA (push, bo->offset >> 32); PUSH_DATA (push, bo->offset); PUSH_DATA (push, ppix->drawable.width); PUSH_DATA (push, ppix->drawable.height); PUSH_DATA (push, format); PUSH_DATA (push, bo->config.nvc0.tile_mode); PUSH_DATA (push, 0x00000001); PUSH_DATA (push, 0x00000000); return TRUE; } static Bool NVC0EXACheckTexture(PicturePtr ppict, PicturePtr pdpict, int op) { if (ppict->pDrawable) { if (ppict->pDrawable->width > 8192 || ppict->pDrawable->height > 8192) NOUVEAU_FALLBACK("texture too large\n"); } else { switch (ppict->pSourcePict->type) { case SourcePictTypeSolidFill: break; default: NOUVEAU_FALLBACK("pict %d\n", ppict->pSourcePict->type); break; } } switch (ppict->format) { case PICT_a8r8g8b8: case PICT_a8b8g8r8: case PICT_x8r8g8b8: case PICT_x8b8g8r8: case PICT_r5g6b5: case PICT_a8: case PICT_x1r5g5b5: case PICT_x1b5g5r5: case PICT_a1r5g5b5: case PICT_a1b5g5r5: case PICT_b5g6r5: case PICT_b8g8r8a8: case PICT_b8g8r8x8: case PICT_a2b10g10r10: case PICT_x2b10g10r10: case PICT_x2r10g10b10: case PICT_a2r10g10b10: case PICT_x4r4g4b4: case PICT_x4b4g4r4: case PICT_a4r4g4b4: case PICT_a4b4g4r4: break; default: NOUVEAU_FALLBACK("picture format 0x%08x\n", ppict->format); } switch (ppict->filter) { case PictFilterNearest: case PictFilterBilinear: break; default: NOUVEAU_FALLBACK("picture filter %d\n", ppict->filter); } /* OpenGL and Render disagree on what should be sampled outside an XRGB * texture (with no repeating). Opengl has a hardcoded alpha value of * 1.0, while render expects 0.0. We assume that clipping is done for * untranformed sources. */ if (NVC0EXABlendOp[op].src_alpha && !ppict->repeat && ppict->transform && (PICT_FORMAT_A(ppict->format) == 0) && (PICT_FORMAT_A(pdpict->format) != 0)) NOUVEAU_FALLBACK("REPEAT_NONE unsupported for XRGB source\n"); return TRUE; } #define _(X1, X2, X3, X4, FMT) \ (NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_TYPEG_UNORM | \ NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_TYPEA_UNORM | \ NV50TIC_0_0_MAP##X1 | NV50TIC_0_0_MAP##X2 | \ NV50TIC_0_0_MAP##X3 | NV50TIC_0_0_MAP##X4 | \ NV50TIC_0_0_FMT_##FMT) static Bool NVC0EXAPictSolid(NVPtr pNv, PicturePtr ppict, unsigned unit) { struct nouveau_pushbuf *push = pNv->pushbuf; PUSH_DATAu(push, pNv->scratch, SOLID(unit), 1); PUSH_DATA (push, ppict->pSourcePict->solidFill.color); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); PUSH_TIC (push, pNv->scratch, SOLID(unit), 1, 1, 4, _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8)); PUSH_DATAu(push, pNv->scratch, TSC_OFFSET + (unit * 32), 8); PUSH_DATA (push, NV50TSC_1_0_WRAPS_REPEAT | NV50TSC_1_0_WRAPT_REPEAT | NV50TSC_1_0_WRAPR_REPEAT | 0x00024000); PUSH_DATA (push, NV50TSC_1_1_MAGF_NEAREST | NV50TSC_1_1_MINF_NEAREST | NV50TSC_1_1_MIPF_NONE); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); return TRUE; } static Bool NVC0EXAPictGradient(NVPtr pNv, PicturePtr ppict, unsigned unit) { return FALSE; } static Bool NVC0EXAPictTexture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, unsigned unit) { struct nouveau_bo *bo = nouveau_pixmap_bo(ppix); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t format; /*XXX: Scanout buffer not tiled, someone needs to figure it out */ if (!nv50_style_tiled_pixmap(ppix)) NOUVEAU_FALLBACK("pixmap is scanout buffer\n"); switch (ppict->format) { case PICT_a8r8g8b8: format = _(B_C0, G_C1, R_C2, A_C3, 8_8_8_8); break; case PICT_a8b8g8r8: format = _(R_C0, G_C1, B_C2, A_C3, 8_8_8_8); break; case PICT_x8r8g8b8: format = _(B_C0, G_C1, R_C2, A_ONE, 8_8_8_8); break; case PICT_x8b8g8r8: format = _(R_C0, G_C1, B_C2, A_ONE, 8_8_8_8); break; case PICT_r5g6b5: format = _(B_C0, G_C1, R_C2, A_ONE, 5_6_5); break; case PICT_a8: format = _(A_C0, B_ZERO, G_ZERO, R_ZERO, 8); break; case PICT_x1r5g5b5: format = _(B_C0, G_C1, R_C2, A_ONE, 1_5_5_5); break; case PICT_x1b5g5r5: format = _(R_C0, G_C1, B_C2, A_ONE, 1_5_5_5); break; case PICT_a1r5g5b5: format = _(B_C0, G_C1, R_C2, A_C3, 1_5_5_5); break; case PICT_a1b5g5r5: format = _(R_C0, G_C1, B_C2, A_C3, 1_5_5_5); break; case PICT_b5g6r5: format = _(R_C0, G_C1, B_C2, A_ONE, 5_6_5); break; case PICT_b8g8r8x8: format = _(A_ONE, R_C1, G_C2, B_C3, 8_8_8_8); break; case PICT_b8g8r8a8: format = _(A_C0, R_C1, G_C2, B_C3, 8_8_8_8); break; case PICT_a2b10g10r10: format = _(R_C0, G_C1, B_C2, A_C3, 2_10_10_10); break; case PICT_x2b10g10r10: format = _(R_C0, G_C1, B_C2, A_ONE, 2_10_10_10); break; case PICT_x2r10g10b10: format = _(B_C0, G_C1, R_C2, A_ONE, 2_10_10_10); break; case PICT_a2r10g10b10: format = _(B_C0, G_C1, R_C2, A_C3, 2_10_10_10); break; case PICT_x4r4g4b4: format = _(B_C0, G_C1, R_C2, A_ONE, 4_4_4_4); break; case PICT_x4b4g4r4: format = _(R_C0, G_C1, B_C2, A_ONE, 4_4_4_4); break; case PICT_a4r4g4b4: format = _(B_C0, G_C1, R_C2, A_C3, 4_4_4_4); break; case PICT_a4b4g4r4: format = _(R_C0, G_C1, B_C2, A_C3, 4_4_4_4); break; default: NOUVEAU_FALLBACK("invalid picture format, this SHOULD NOT HAPPEN. Expect trouble.\n"); } #undef _ PUSH_REFN (push, bo, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); PUSH_DATAu(push, pNv->scratch, TIC_OFFSET + (unit * 32), 8); PUSH_TIC (push, bo, 0, ppix->drawable.width, ppix->drawable.height, 0, format); PUSH_DATAu(push, pNv->scratch, TSC_OFFSET + (unit * 32), 8); if (ppict->repeat) { switch (ppict->repeatType) { case RepeatPad: PUSH_DATA (push, 0x00024000 | NV50TSC_1_0_WRAPS_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPT_CLAMP_TO_EDGE | NV50TSC_1_0_WRAPR_CLAMP_TO_EDGE); break; case RepeatReflect: PUSH_DATA (push, 0x00024000 | NV50TSC_1_0_WRAPS_MIRROR_REPEAT | NV50TSC_1_0_WRAPT_MIRROR_REPEAT | NV50TSC_1_0_WRAPR_MIRROR_REPEAT); break; case RepeatNormal: default: PUSH_DATA (push, 0x00024000 | NV50TSC_1_0_WRAPS_REPEAT | NV50TSC_1_0_WRAPT_REPEAT | NV50TSC_1_0_WRAPR_REPEAT); break; } } else { PUSH_DATA (push, 0x00024000 | NV50TSC_1_0_WRAPS_CLAMP_TO_BORDER | NV50TSC_1_0_WRAPT_CLAMP_TO_BORDER | NV50TSC_1_0_WRAPR_CLAMP_TO_BORDER); } if (ppict->filter == PictFilterBilinear) { PUSH_DATA (push, NV50TSC_1_1_MAGF_LINEAR | NV50TSC_1_1_MINF_LINEAR | NV50TSC_1_1_MIPF_NONE); } else { PUSH_DATA (push, NV50TSC_1_1_MAGF_NEAREST | NV50TSC_1_1_MINF_NEAREST | NV50TSC_1_1_MIPF_NONE); } PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATAu(push, pNv->scratch, PVP_DATA + (unit * 11 * 4), 11); if (ppict->transform) { PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[0][2])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[1][2])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][0])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][1])); PUSH_DATAf(push, xFixedToFloat(ppict->transform->matrix[2][2])); } else { PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); } PUSH_DATAf(push, 1.0 / ppix->drawable.width); PUSH_DATAf(push, 1.0 / ppix->drawable.height); return TRUE; } static Bool NVC0EXAPicture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, int unit) { if (ppict->pDrawable) return NVC0EXAPictTexture(pNv, ppix, ppict, unit); switch (ppict->pSourcePict->type) { case SourcePictTypeSolidFill: return NVC0EXAPictSolid(pNv, ppict, unit); case SourcePictTypeLinear: return NVC0EXAPictGradient(pNv, ppict, unit); default: break; } return FALSE; } static Bool NVC0EXACheckBlend(int op) { if (op > PictOpAdd) NOUVEAU_FALLBACK("unsupported blend op %d\n", op); return TRUE; } static void NVC0EXABlend(PixmapPtr ppix, PicturePtr ppict, int op, int component_alpha) { NVC0EXA_LOCALS(ppix); struct nvc0_blend_op *b = &NVC0EXABlendOp[op]; unsigned sblend = b->src_blend; unsigned dblend = b->dst_blend; if (b->dst_alpha) { if (!PICT_FORMAT_A(ppict->format)) { if (sblend == BF(DST_ALPHA)) sblend = BF(ONE); else if (sblend == BF(ONE_MINUS_DST_ALPHA)) sblend = BF(ZERO); } } if (b->src_alpha && component_alpha) { if (dblend == BF(SRC_ALPHA)) dblend = BF(SRC_COLOR); else if (dblend == BF(ONE_MINUS_SRC_ALPHA)) dblend = BF(ONE_MINUS_SRC_COLOR); } if (sblend == BF(ONE) && dblend == BF(ZERO)) { BEGIN_NVC0(push, NVC0_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 0); } else { BEGIN_NVC0(push, NVC0_3D(BLEND_ENABLE(0)), 1); PUSH_DATA (push, 1); BEGIN_NVC0(push, NVC0_3D(BLEND_EQUATION_RGB), 5); PUSH_DATA (push, NVC0_3D_BLEND_EQUATION_RGB_FUNC_ADD); PUSH_DATA (push, sblend); PUSH_DATA (push, dblend); PUSH_DATA (push, NVC0_3D_BLEND_EQUATION_ALPHA_FUNC_ADD); PUSH_DATA (push, sblend); BEGIN_NVC0(push, NVC0_3D(BLEND_FUNC_DST_ALPHA), 1); PUSH_DATA (push, dblend); } } Bool NVC0EXACheckComposite(int op, PicturePtr pspict, PicturePtr pmpict, PicturePtr pdpict) { if (!NVC0EXACheckBlend(op)) NOUVEAU_FALLBACK("blend not supported\n"); if (!NVC0EXACheckRenderTarget(pdpict)) NOUVEAU_FALLBACK("render target invalid\n"); if (!NVC0EXACheckTexture(pspict, pdpict, op)) NOUVEAU_FALLBACK("src picture invalid\n"); if (pmpict) { if (pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format) && NVC0EXABlendOp[op].src_alpha && NVC0EXABlendOp[op].src_blend != BF(ZERO)) NOUVEAU_FALLBACK("component-alpha not supported\n"); if (!NVC0EXACheckTexture(pmpict, pdpict, op)) NOUVEAU_FALLBACK("mask picture invalid\n"); } return TRUE; } Bool NVC0EXAPrepareComposite(int op, PicturePtr pspict, PicturePtr pmpict, PicturePtr pdpict, PixmapPtr pspix, PixmapPtr pmpix, PixmapPtr pdpix) { struct nouveau_bo *dst = nouveau_pixmap_bo(pdpix); NVC0EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 256)) NOUVEAU_FALLBACK("space\n"); BEGIN_NVC0(push, SUBC_2D(NV50_GRAPH_SERIALIZE), 1); PUSH_DATA (push, 0); if (!NVC0EXARenderTarget(pdpix, pdpict)) NOUVEAU_FALLBACK("render target invalid\n"); NVC0EXABlend(pdpix, pdpict, op, pmpict && pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format)); if (!NVC0EXAPicture(pNv, pspix, pspict, 0)) NOUVEAU_FALLBACK("src picture invalid\n"); if (pmpict) { if (!NVC0EXAPicture(pNv, pmpix, pmpict, 1)) NOUVEAU_FALLBACK("mask picture invalid\n"); BEGIN_NVC0(push, NVC0_3D(SP_START_ID(5)), 1); if (pdpict->format == PICT_a8) { PUSH_DATA (push, PFP_C_A8); } else { if (pmpict->componentAlpha && PICT_FORMAT_RGB(pmpict->format)) { if (NVC0EXABlendOp[op].src_alpha) PUSH_DATA (push, PFP_CCASA); else PUSH_DATA (push, PFP_CCA); } else { PUSH_DATA (push, PFP_C); } } } else { BEGIN_NVC0(push, NVC0_3D(SP_START_ID(5)), 1); if (pdpict->format == PICT_a8) PUSH_DATA (push, PFP_S_A8); else PUSH_DATA (push, PFP_S); } BEGIN_NVC0(push, NVC0_3D(TSC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(TIC_FLUSH), 1); PUSH_DATA (push, 0); BEGIN_NVC0(push, NVC0_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 0); PUSH_RESET(push); PUSH_REFN (push, pNv->scratch, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR); if (pspict->pDrawable) PUSH_REFN (push, nouveau_pixmap_bo(pspix), NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); PUSH_REFN (push, dst, NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); if (pmpict && pmpict->pDrawable) PUSH_REFN (push, nouveau_pixmap_bo(pmpix), NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); NOUVEAU_FALLBACK("validate\n"); } return TRUE; } void NVC0EXAComposite(PixmapPtr pdpix, int sx, int sy, int mx, int my, int dx, int dy, int w, int h) { NVC0EXA_LOCALS(pdpix); if (!PUSH_SPACE(push, 64)) return; if (pNv->dev->chipset >= 0x110) { BEGIN_NVC0(push, NVC0_3D(CB_SIZE), 3); PUSH_DATA (push, 256); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA) >> 32); PUSH_DATA (push, (pNv->scratch->offset + PVP_DATA)); BEGIN_1IC0(push, NVC0_3D(CB_POS), 24 + 1); PUSH_DATA (push, 0x80); PUSH_DATAf(push, dx); PUSH_DATAf(push, dy + (h * 2)); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, sx); PUSH_DATAf(push, sy + (h * 2)); PUSH_DATAf(push, mx); PUSH_DATAf(push, my + (h * 2)); PUSH_DATAf(push, dx); PUSH_DATAf(push, dy); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); PUSH_DATAf(push, mx); PUSH_DATAf(push, my); PUSH_DATAf(push, dx + (w * 2)); PUSH_DATAf(push, dy); PUSH_DATAf(push, 0); PUSH_DATAf(push, 1); PUSH_DATAf(push, sx + (w * 2)); PUSH_DATAf(push, sy); PUSH_DATAf(push, mx + (w * 2)); PUSH_DATAf(push, my); } BEGIN_NVC0(push, NVC0_3D(SCISSOR_HORIZ(0)), 2); PUSH_DATA (push, ((dx + w) << 16) | dx); PUSH_DATA (push, ((dy + h) << 16) | dy); BEGIN_NVC0(push, NVC0_3D(VERTEX_BEGIN_GL), 1); PUSH_DATA (push, NVC0_3D_VERTEX_BEGIN_GL_PRIMITIVE_TRIANGLES); if (pNv->dev->chipset < 0x110) { PUSH_VTX2s(push, sx, sy + (h * 2), mx, my + (h * 2), dx, dy + (h * 2)); PUSH_VTX2s(push, sx, sy, mx, my, dx, dy); PUSH_VTX2s(push, sx + (w * 2), sy, mx + (w * 2), my, dx + (w * 2), dy); } else { BEGIN_NVC0(push, NVC0_3D(VERTEX_BUFFER_FIRST), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 3); } BEGIN_NVC0(push, NVC0_3D(VERTEX_END_GL), 1); PUSH_DATA (push, 0); } void NVC0EXADoneComposite(PixmapPtr pdpix) { NVC0EXA_LOCALS(pdpix); nouveau_pushbuf_bufctx(push, NULL); } Bool NVC0EXARectM2MF(NVPtr pNv, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; struct nouveau_pushbuf *push = pNv->pushbuf; unsigned exec = 0; if (!PUSH_SPACE(push, 64)) return FALSE; if (src->config.nvc0.memtype) { BEGIN_NVC0(push, NVC0_M2MF(TILING_MODE_IN), 5); PUSH_DATA (push, src->config.nvc0.tile_mode); PUSH_DATA (push, src_pitch); PUSH_DATA (push, src_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } else { BEGIN_NVC0(push, NVC0_M2MF(PITCH_IN), 1); PUSH_DATA (push, src_pitch); src_off += src_y * src_pitch + src_x * cpp; exec |= NVC0_M2MF_EXEC_LINEAR_IN; } if (dst->config.nvc0.memtype) { BEGIN_NVC0(push, NVC0_M2MF(TILING_MODE_OUT), 5); PUSH_DATA (push, dst->config.nvc0.tile_mode); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, dst_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); } else { BEGIN_NVC0(push, NVC0_M2MF(PITCH_OUT), 1); PUSH_DATA (push, dst_pitch); dst_off += dst_y * dst_pitch + dst_x * cpp; exec |= NVC0_M2MF_EXEC_LINEAR_OUT; } while (h) { int line_count = h; if (line_count > 2047) line_count = 2047; if (nouveau_pushbuf_space(push, 32, 0, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; BEGIN_NVC0(push, NVC0_M2MF(OFFSET_OUT_HIGH), 2); PUSH_DATA (push, (dst->offset + dst_off) >> 32); PUSH_DATA (push, (dst->offset + dst_off)); BEGIN_NVC0(push, NVC0_M2MF(OFFSET_IN_HIGH), 2); PUSH_DATA (push, (src->offset + src_off) >> 32); PUSH_DATA (push, (src->offset + src_off)); if (src->config.nvc0.memtype) { BEGIN_NVC0(push, NVC0_M2MF(TILING_POSITION_IN_X), 2); PUSH_DATA (push, src_x * cpp); PUSH_DATA (push, src_y); } else { src_off += line_count * src_pitch; } if (dst->config.nvc0.memtype) { BEGIN_NVC0(push, NVC0_M2MF(TILING_POSITION_OUT_X), 2); PUSH_DATA (push, dst_x * cpp); PUSH_DATA (push, dst_y); } else { dst_off += line_count * dst_pitch; } BEGIN_NVC0(push, NVC0_M2MF(LINE_LENGTH_IN), 2); PUSH_DATA (push, w * cpp); PUSH_DATA (push, line_count); BEGIN_NVC0(push, NVC0_M2MF(EXEC), 1); PUSH_DATA (push, NVC0_M2MF_EXEC_QUERY_SHORT | exec); src_y += line_count; dst_y += line_count; h -= line_count; } return TRUE; } Bool NVE0EXARectCopy(NVPtr pNv, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { return nouveau_copya0b5_rect(pNv->pushbuf, pNv->NvCOPY, w, h, cpp, src, src_off, src_dom, src_pitch, src_h, src_x, src_y, dst, dst_off, dst_dom, dst_pitch, dst_h, dst_x, dst_y); } xf86-video-nouveau-1.0.18/src/nv_shadow.c0000644000175000017500000000400114713424663013571 /* * Copyright 1999 Mark Vojkovich * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "nv_type.h" #include "shadowfb.h" #include "servermd.h" #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) > (b)) ? (a) : (b)) void NVRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) { NVPtr pNv = NVPTR(pScrn); int x1, y1, x2, y2, width, height, cpp, FBPitch; unsigned char *src, *dst; cpp = pScrn->bitsPerPixel >> 3; FBPitch = pScrn->displayWidth * cpp; nouveau_bo_map(pNv->scanout, NOUVEAU_BO_WR, pNv->client); while(num--) { x1 = MAX(pbox->x1, 0); y1 = MAX(pbox->y1, 0); x2 = MIN(pbox->x2, pScrn->virtualX); y2 = MIN(pbox->y2, pScrn->virtualY); width = (x2 - x1) * cpp; height = y2 - y1; if (width > 0 && height > 0) { src = pNv->ShadowPtr + (y1 * pNv->ShadowPitch) + (x1 * cpp); dst = pNv->scanout->map + (y1 * FBPitch) + (x1 * cpp); while(height--) { memcpy(dst, src, width); dst += FBPitch; src += pNv->ShadowPitch; } } pbox++; } } xf86-video-nouveau-1.0.18/src/nv40_exa.c0000644000175000017500000010203614713424663013234 /* * Copyright 2007 Ben Skeggs * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #include "nv_include.h" #include "hwdefs/nv_object.xml.h" #include "hwdefs/nv30-40_3d.xml.h" #include "nv04_accel.h" typedef struct nv_pict_surface_format { int pict_fmt; uint32_t card_fmt; } nv_pict_surface_format_t; typedef struct nv_pict_texture_format { int pict_fmt; uint32_t card_fmt; uint32_t card_swz; } nv_pict_texture_format_t; typedef struct nv_pict_op { Bool src_alpha; Bool dst_alpha; uint32_t src_card_op; uint32_t dst_card_op; } nv_pict_op_t; static nv_pict_surface_format_t NV40SurfaceFormat[] = { { PICT_a8r8g8b8 , NV30_3D_RT_FORMAT_COLOR_A8R8G8B8 }, { PICT_x8r8g8b8 , NV30_3D_RT_FORMAT_COLOR_X8R8G8B8 }, { PICT_r5g6b5 , NV30_3D_RT_FORMAT_COLOR_R5G6B5 }, { PICT_a8 , NV30_3D_RT_FORMAT_COLOR_B8 }, { -1, ~0 } }; static nv_pict_surface_format_t * NV40_GetPictSurfaceFormat(int format) { int i = 0; while (NV40SurfaceFormat[i].pict_fmt != -1) { if (NV40SurfaceFormat[i].pict_fmt == format) return &NV40SurfaceFormat[i]; i++; } return NULL; } #define _(r,tf,ts0x,ts0y,ts0z,ts0w,ts1x,ts1y,ts1z,ts1w) \ { \ PICT_##r, NV40_3D_TEX_FORMAT_FORMAT_##tf, \ NV30_3D_TEX_SWIZZLE_S0_X_##ts0x | NV30_3D_TEX_SWIZZLE_S0_Y_##ts0y | \ NV30_3D_TEX_SWIZZLE_S0_Z_##ts0z | NV30_3D_TEX_SWIZZLE_S0_W_##ts0w | \ NV30_3D_TEX_SWIZZLE_S1_X_##ts1x | NV30_3D_TEX_SWIZZLE_S1_Y_##ts1y | \ NV30_3D_TEX_SWIZZLE_S1_Z_##ts1z | NV30_3D_TEX_SWIZZLE_S1_W_##ts1w, \ } static nv_pict_texture_format_t NV40TextureFormat[] = { _(a8r8g8b8, A8R8G8B8, S1, S1, S1, S1, X, Y, Z, W), _(x8r8g8b8, A8R8G8B8, S1, S1, S1, ONE, X, Y, Z, W), _(x8b8g8r8, A8R8G8B8, S1, S1, S1, ONE, Z, Y, X, W), _(a1r5g5b5, A1R5G5B5, S1, S1, S1, S1, X, Y, Z, W), _(x1r5g5b5, A1R5G5B5, S1, S1, S1, ONE, X, Y, Z, W), _( r5g6b5, R5G6B5, S1, S1, S1, S1, X, Y, Z, W), _( a8, L8, ZERO, ZERO, ZERO, S1, X, X, X, X), { -1, ~0, ~0 } }; #undef _ static nv_pict_texture_format_t * NV40_GetPictTextureFormat(int format) { int i = 0; while (NV40TextureFormat[i].pict_fmt != -1) { if (NV40TextureFormat[i].pict_fmt == format) return &NV40TextureFormat[i]; i++; } return NULL; } #define SF(bf) (NV30_3D_BLEND_FUNC_SRC_RGB_##bf | \ NV30_3D_BLEND_FUNC_SRC_ALPHA_##bf) #define DF(bf) (NV30_3D_BLEND_FUNC_DST_RGB_##bf | \ NV30_3D_BLEND_FUNC_DST_ALPHA_##bf) static nv_pict_op_t NV40PictOp[] = { /* Clear */ { 0, 0, SF( ZERO), DF( ZERO) }, /* Src */ { 0, 0, SF( ONE), DF( ZERO) }, /* Dst */ { 0, 0, SF( ZERO), DF( ONE) }, /* Over */ { 1, 0, SF( ONE), DF(ONE_MINUS_SRC_ALPHA) }, /* OverReverse */ { 0, 1, SF(ONE_MINUS_DST_ALPHA), DF( ONE) }, /* In */ { 0, 1, SF( DST_ALPHA), DF( ZERO) }, /* InReverse */ { 1, 0, SF( ZERO), DF( SRC_ALPHA) }, /* Out */ { 0, 1, SF(ONE_MINUS_DST_ALPHA), DF( ZERO) }, /* OutReverse */ { 1, 0, SF( ZERO), DF(ONE_MINUS_SRC_ALPHA) }, /* Atop */ { 1, 1, SF( DST_ALPHA), DF(ONE_MINUS_SRC_ALPHA) }, /* AtopReverse */ { 1, 1, SF(ONE_MINUS_DST_ALPHA), DF( SRC_ALPHA) }, /* Xor */ { 1, 1, SF(ONE_MINUS_DST_ALPHA), DF(ONE_MINUS_SRC_ALPHA) }, /* Add */ { 0, 0, SF( ONE), DF( ONE) } }; static nv_pict_op_t * NV40_GetPictOpRec(int op) { if (op >= PictOpSaturate) return NULL; return &NV40PictOp[op]; } static void NV40_SetupBlend(ScrnInfoPtr pScrn, nv_pict_op_t *blend, PictFormatShort dest_format, Bool component_alpha) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t sblend, dblend; sblend = blend->src_card_op; dblend = blend->dst_card_op; if (blend->dst_alpha) { if (!PICT_FORMAT_A(dest_format)) { if (sblend == SF(DST_ALPHA)) { sblend = SF(ONE); } else if (sblend == SF(ONE_MINUS_DST_ALPHA)) { sblend = SF(ZERO); } } else if (dest_format == PICT_a8) { if (sblend == SF(DST_ALPHA)) { sblend = SF(DST_COLOR); } else if (sblend == SF(ONE_MINUS_DST_ALPHA)) { sblend = SF(ONE_MINUS_DST_COLOR); } } } if (blend->src_alpha && (component_alpha || dest_format == PICT_a8)) { if (dblend == DF(SRC_ALPHA)) { dblend = DF(SRC_COLOR); } else if (dblend == DF(ONE_MINUS_SRC_ALPHA)) { dblend = DF(ONE_MINUS_SRC_COLOR); } } if (sblend == SF(ONE) && dblend == DF(ZERO)) { BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); } else { BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 5); PUSH_DATA (push, 1); PUSH_DATA (push, sblend); PUSH_DATA (push, dblend); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, NV40_3D_BLEND_EQUATION_ALPHA_FUNC_ADD | NV40_3D_BLEND_EQUATION_RGB_FUNC_ADD); } } static Bool NV40EXAPictSolid(NVPtr pNv, PicturePtr pPict, int unit) { struct nouveau_pushbuf *push = pNv->pushbuf; PUSH_DATAu(push, pNv->scratch, SOLID(unit), 2); PUSH_DATA (push, pPict->pSourcePict->solidFill.color); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(TEX_OFFSET(unit)), 8); PUSH_MTHDl(push, NV30_3D(TEX_OFFSET(unit)), pNv->scratch, SOLID(unit), NOUVEAU_BO_VRAM | NOUVEAU_BO_RD); PUSH_DATA (push, NV40_3D_TEX_FORMAT_FORMAT_A8R8G8B8 | 0x8000 | NV40_3D_TEX_FORMAT_LINEAR | NV30_3D_TEX_FORMAT_DIMS_2D | NV30_3D_TEX_FORMAT_NO_BORDER | (1 << NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT) | NV30_3D_TEX_FORMAT_DMA0); PUSH_DATA (push, NV30_3D_TEX_WRAP_S_REPEAT | NV30_3D_TEX_WRAP_T_REPEAT | NV30_3D_TEX_WRAP_R_REPEAT); PUSH_DATA (push, NV40_3D_TEX_ENABLE_ENABLE); PUSH_DATA (push, 0x0000aae4); PUSH_DATA (push, NV30_3D_TEX_FILTER_MIN_NEAREST | NV30_3D_TEX_FILTER_MAG_NEAREST | 0x3fd6); PUSH_DATA (push, 0x00010001); PUSH_DATA (push, 0x00000000); BEGIN_NV04(push, NV40_3D(TEX_SIZE1(unit)), 1); PUSH_DATA (push, 0x00100040); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 17); PUSH_DATA (push, unit * 4); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); return TRUE; } static Bool NV40EXAPictGradient(NVPtr pNv, PicturePtr pPict, int unit) { return FALSE; } static Bool NV40EXAPictTexture(NVPtr pNv, PixmapPtr pPix, PicturePtr pPict, int unit) { unsigned reloc = NOUVEAU_BO_VRAM | NOUVEAU_BO_GART | NOUVEAU_BO_WR; struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pPix); nv_pict_texture_format_t *fmt; fmt = NV40_GetPictTextureFormat(pPict->format); if (!fmt) return FALSE; BEGIN_NV04(push, NV30_3D(TEX_OFFSET(unit)), 8); PUSH_MTHDl(push, NV30_3D(TEX_OFFSET(unit)), bo, 0, reloc); PUSH_MTHDs(push, NV30_3D(TEX_FORMAT(unit)), bo, fmt->card_fmt | NV40_3D_TEX_FORMAT_LINEAR | NV30_3D_TEX_FORMAT_DIMS_2D | 0x8000 | NV30_3D_TEX_FORMAT_NO_BORDER | (1 << NV40_3D_TEX_FORMAT_MIPMAP_COUNT__SHIFT), reloc | NOUVEAU_BO_OR, NV30_3D_TEX_FORMAT_DMA0, NV30_3D_TEX_FORMAT_DMA1); if (pPict->repeat) { switch(pPict->repeatType) { case RepeatPad: PUSH_DATA (push, NV30_3D_TEX_WRAP_S_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_T_CLAMP_TO_EDGE | NV30_3D_TEX_WRAP_R_CLAMP_TO_EDGE); break; case RepeatReflect: PUSH_DATA (push, NV30_3D_TEX_WRAP_S_MIRRORED_REPEAT | NV30_3D_TEX_WRAP_T_MIRRORED_REPEAT | NV30_3D_TEX_WRAP_R_MIRRORED_REPEAT); break; case RepeatNormal: default: PUSH_DATA (push, NV30_3D_TEX_WRAP_S_REPEAT | NV30_3D_TEX_WRAP_T_REPEAT | NV30_3D_TEX_WRAP_R_REPEAT); break; } } else { PUSH_DATA (push, NV30_3D_TEX_WRAP_S_CLAMP_TO_BORDER | NV30_3D_TEX_WRAP_T_CLAMP_TO_BORDER | NV30_3D_TEX_WRAP_R_CLAMP_TO_BORDER); } PUSH_DATA (push, NV40_3D_TEX_ENABLE_ENABLE); PUSH_DATA (push, fmt->card_swz); if (pPict->filter == PictFilterBilinear) { PUSH_DATA (push, NV30_3D_TEX_FILTER_MIN_LINEAR | NV30_3D_TEX_FILTER_MAG_LINEAR | 0x3fd6); } else { PUSH_DATA (push, NV30_3D_TEX_FILTER_MIN_NEAREST | NV30_3D_TEX_FILTER_MAG_NEAREST | 0x3fd6); } PUSH_DATA (push, (pPix->drawable.width << 16) | pPix->drawable.height); PUSH_DATA (push, 0); /* border ARGB */ BEGIN_NV04(push, NV40_3D(TEX_SIZE1(unit)), 1); PUSH_DATA (push, (1 << NV40_3D_TEX_SIZE1_DEPTH__SHIFT) | (uint32_t)exaGetPixmapPitch(pPix)); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_CONST_ID), 17); PUSH_DATA (push, unit * 4); if (pPict->transform) { PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][1])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[0][2])); PUSH_DATAf(push, 0); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][1])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[1][2])); PUSH_DATAf(push, 0); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][0])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][1])); PUSH_DATAf(push, xFixedToFloat(pPict->transform->matrix[2][2])); PUSH_DATAf(push, 0); } else { PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); } PUSH_DATAf(push, 1.0 / pPix->drawable.width); PUSH_DATAf(push, 1.0 / pPix->drawable.height); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); return TRUE; } static Bool NV40EXAPicture(NVPtr pNv, PixmapPtr ppix, PicturePtr ppict, int unit) { if (ppict->pDrawable) return NV40EXAPictTexture(pNv, ppix, ppict, unit); switch (ppict->pSourcePict->type) { case SourcePictTypeSolidFill: return NV40EXAPictSolid(pNv, ppict, unit); case SourcePictTypeLinear: return NV40EXAPictGradient(pNv, ppict, unit); default: break; } return FALSE; } static Bool NV40_SetupSurface(ScrnInfoPtr pScrn, PixmapPtr pPix, PictFormatShort format) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nouveau_bo *bo = nouveau_pixmap_bo(pPix); nv_pict_surface_format_t *fmt; fmt = NV40_GetPictSurfaceFormat(format); if (!fmt) { ErrorF("AIII no format\n"); return FALSE; } BEGIN_NV04(push, NV30_3D(RT_FORMAT), 3); PUSH_DATA (push, NV30_3D_RT_FORMAT_TYPE_LINEAR | NV30_3D_RT_FORMAT_ZETA_Z24S8 | fmt->card_fmt); PUSH_DATA (push, exaGetPixmapPitch(pPix)); PUSH_MTHDl(push, NV30_3D(COLOR0_OFFSET), bo, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_RDWR); return TRUE; } static Bool NV40EXACheckCompositeTexture(PicturePtr pPict, PicturePtr pdPict, int op) { nv_pict_texture_format_t *fmt; int w = 1, h = 1; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; } else { switch (pPict->pSourcePict->type) { case SourcePictTypeSolidFill: break; default: NOUVEAU_FALLBACK("gradient\n"); } } if ((w > 4096) || (h > 4096)) NOUVEAU_FALLBACK("picture too large, %dx%d\n", w, h); fmt = NV40_GetPictTextureFormat(pPict->format); if (!fmt) NOUVEAU_FALLBACK("picture format 0x%08x not supported\n", pPict->format); if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) NOUVEAU_FALLBACK("filter 0x%x not supported\n", pPict->filter); /* Opengl and Render disagree on what should be sampled outside an XRGB * texture (with no repeating). Opengl has a hardcoded alpha value of * 1.0, while render expects 0.0. We assume that clipping is done for * untranformed sources. */ if (NV40PictOp[op].src_alpha && !pPict->repeat && pPict->transform && (PICT_FORMAT_A(pPict->format) == 0) && (PICT_FORMAT_A(pdPict->format) != 0)) NOUVEAU_FALLBACK("REPEAT_NONE unsupported for XRGB source\n"); return TRUE; } Bool NV40EXACheckComposite(int op, PicturePtr psPict, PicturePtr pmPict, PicturePtr pdPict) { nv_pict_surface_format_t *fmt; nv_pict_op_t *opr; opr = NV40_GetPictOpRec(op); if (!opr) NOUVEAU_FALLBACK("unsupported blend op 0x%x\n", op); fmt = NV40_GetPictSurfaceFormat(pdPict->format); if (!fmt) NOUVEAU_FALLBACK("dst picture format 0x%08x not supported\n", pdPict->format); if (!NV40EXACheckCompositeTexture(psPict, pdPict, op)) NOUVEAU_FALLBACK("src picture\n"); if (pmPict) { if (pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format) && opr->src_alpha && opr->src_card_op != SF(ZERO)) NOUVEAU_FALLBACK("mask CA + SA\n"); if (!NV40EXACheckCompositeTexture(pmPict, pdPict, op)) NOUVEAU_FALLBACK("mask picture\n"); } return TRUE; } Bool NV40EXAPrepareComposite(int op, PicturePtr psPict, PicturePtr pmPict, PicturePtr pdPict, PixmapPtr psPix, PixmapPtr pmPix, PixmapPtr pdPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); nv_pict_op_t *blend = NV40_GetPictOpRec(op); struct nouveau_pushbuf *push = pNv->pushbuf; uint32_t fragprog; if (!PUSH_SPACE(push, 128)) NOUVEAU_FALLBACK("space\n"); PUSH_RESET(push); NV40_SetupBlend(pScrn, blend, pdPict->format, (pmPict && pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format))); if (!NV40_SetupSurface(pScrn, pdPix, pdPict->format) || !NV40EXAPicture(pNv, psPix, psPict, 0)) return FALSE; if (pmPict) { if (!NV40EXAPicture(pNv, pmPix, pmPict, 1)) return FALSE; if (pdPict->format == PICT_a8) { fragprog = PFP_C_A8; } else if (pmPict->componentAlpha && PICT_FORMAT_RGB(pmPict->format)) { if (blend->src_alpha) fragprog = PFP_CCASA; else fragprog = PFP_CCA; } else { fragprog = PFP_C; } } else { if (pdPict->format == PICT_a8) fragprog = PFP_S_A8; else fragprog = PFP_S; } BEGIN_NV04(push, NV30_3D(FP_ACTIVE_PROGRAM), 1); PUSH_MTHD (push, NV30_3D(FP_ACTIVE_PROGRAM), pNv->scratch, fragprog, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_LOW | NOUVEAU_BO_OR, NV30_3D_FP_ACTIVE_PROGRAM_DMA0, NV30_3D_FP_ACTIVE_PROGRAM_DMA1); BEGIN_NV04(push, NV30_3D(FP_CONTROL), 1); PUSH_DATA (push, 0x02000000); /* Appears to be some kind of cache flush, needed here at least * sometimes.. funky text rendering otherwise :) */ BEGIN_NV04(push, NV40_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 2); BEGIN_NV04(push, NV40_3D(TEX_CACHE_CTL), 1); PUSH_DATA (push, 1); nouveau_pushbuf_bufctx(push, pNv->bufctx); if (nouveau_pushbuf_validate(push)) { nouveau_pushbuf_bufctx(push, NULL); return FALSE; } return TRUE; } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2); PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } void NV40EXAComposite(PixmapPtr pdPix, int sx, int sy, int mx, int my, int dx, int dy, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; if (!PUSH_SPACE(push, 64)) return; /* We're drawing a triangle, we need to scissor it to a quad. */ /* The scissors are here for a good reason, we don't get the full * image, but just a part. */ /* Handling the cliprects is done for us already. */ BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, (w << 16) | dx); PUSH_DATA (push, (h << 16) | dy); BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_TRIANGLES); PUSH_VTX2s(push, sx, sy + (h * 2), mx, my + (h * 2), dx, dy + (h * 2)); PUSH_VTX2s(push, sx, sy, mx, my, dx, dy); PUSH_VTX2s(push, sx + (w * 2), sy, mx + (w * 2), my, dx + (w * 2), dy); BEGIN_NV04(push, NV30_3D(VERTEX_BEGIN_END), 1); PUSH_DATA (push, NV30_3D_VERTEX_BEGIN_END_STOP); } void NV40EXADoneComposite(PixmapPtr pdPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pdPix->drawable.pScreen); nouveau_pushbuf_bufctx(NVPTR(pScrn)->pushbuf, NULL); } #define NV30_3D_CHIPSET_4X_MASK 0x00000baf #define NV44TCL_CHIPSET_4X_MASK 0x00005450 Bool NVAccelInitNV40TCL(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; struct nv04_fifo *fifo = pNv->channel->data; uint32_t class = 0, chipset; int i; NVXVComputeBicubicFilter(pNv->scratch, XV_TABLE, XV_TABLE_SIZE); chipset = pNv->dev->chipset; if ((chipset & 0xf0) == NV_ARCH_40) { chipset &= 0xf; if (NV30_3D_CHIPSET_4X_MASK & (1<scrnIndex, X_ERROR, "NV40EXA: Unknown chipset NV4%1x\n", chipset); return FALSE; } } else if ( (chipset & 0xf0) == 0x60) { class = NV44_3D_CLASS; } else return TRUE; if (nouveau_object_new(pNv->channel, Nv3D, class, NULL, 0, &pNv->Nv3D)) return FALSE; if (!PUSH_SPACE(push, 256)) return FALSE; BEGIN_NV04(push, NV01_SUBC(3D, OBJECT), 1); PUSH_DATA (push, pNv->Nv3D->handle); BEGIN_NV04(push, NV30_3D(DMA_NOTIFY), 1); PUSH_DATA (push, pNv->notify0->handle); BEGIN_NV04(push, NV30_3D(DMA_TEXTURE0), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->gart); BEGIN_NV04(push, NV30_3D(DMA_COLOR0), 2); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); /* voodoo */ BEGIN_NV04(push, SUBC_3D(0x1ea4), 3); PUSH_DATA (push, 0x00000010); PUSH_DATA (push, 0x01000100); PUSH_DATA (push, 0xff800006); BEGIN_NV04(push, SUBC_3D(0x1fc4), 1); PUSH_DATA (push, 0x06144321); BEGIN_NV04(push, SUBC_3D(0x1fc8), 2); PUSH_DATA (push, 0xedcba987); PUSH_DATA (push, 0x00000021); BEGIN_NV04(push, SUBC_3D(0x1fd0), 1); PUSH_DATA (push, 0x00171615); BEGIN_NV04(push, SUBC_3D(0x1fd4), 1); PUSH_DATA (push, 0x001b1a19); BEGIN_NV04(push, SUBC_3D(0x1ef8), 1); PUSH_DATA (push, 0x0020ffff); BEGIN_NV04(push, SUBC_3D(0x1d64), 1); PUSH_DATA (push, 0x00d30000); BEGIN_NV04(push, NV30_3D(ENGINE), 1); PUSH_DATA (push, NV30_3D_ENGINE_FP); /* This removes the the stair shaped tearing that i get. */ /* Verified on one G70 card that it doesn't cause regressions for people without the problem. */ /* The blob sets this up by default for NV43. */ BEGIN_NV04(push, NV30_3D(FP_REG_CONTROL), 1); PUSH_DATA (push, 0x0000000F); BEGIN_NV04(push, NV30_3D(VIEWPORT_TRANSLATE_X), 8); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 1.0); PUSH_DATAf(push, 0.0); /* default 3D state */ /*XXX: replace with the same state that the DRI emits on startup */ BEGIN_NV04(push, NV30_3D(STENCIL_ENABLE(0)), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(STENCIL_ENABLE(1)), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(ALPHA_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(DEPTH_WRITE_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(COLOR_MASK), 1); PUSH_DATA (push, 0x01010101); /* TR,TR,TR,TR */ BEGIN_NV04(push, NV30_3D(CULL_FACE_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(BLEND_FUNC_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(COLOR_LOGIC_OP_ENABLE), 2); PUSH_DATA (push, 0); PUSH_DATA (push, NV30_3D_COLOR_LOGIC_OP_OP_COPY); BEGIN_NV04(push, NV30_3D(DITHER_ENABLE), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(SHADE_MODEL), 1); PUSH_DATA (push, NV30_3D_SHADE_MODEL_SMOOTH); BEGIN_NV04(push, NV30_3D(POLYGON_OFFSET_FACTOR),2); PUSH_DATAf(push, 0.0); PUSH_DATAf(push, 0.0); BEGIN_NV04(push, NV30_3D(POLYGON_MODE_FRONT), 2); PUSH_DATA (push, NV30_3D_POLYGON_MODE_FRONT_FILL); PUSH_DATA (push, NV30_3D_POLYGON_MODE_BACK_FILL); BEGIN_NV04(push, NV30_3D(POLYGON_STIPPLE_PATTERN(0)), 0x20); for (i=0;i<0x20;i++) PUSH_DATA (push, 0xFFFFFFFF); for (i=0;i<16;i++) { BEGIN_NV04(push, NV30_3D(TEX_ENABLE(i)), 1); PUSH_DATA (push, 0); } BEGIN_NV04(push, NV30_3D(DEPTH_CONTROL), 1); PUSH_DATA (push, 0x110); BEGIN_NV04(push, NV30_3D(RT_ENABLE), 1); PUSH_DATA (push, NV30_3D_RT_ENABLE_COLOR0); BEGIN_NV04(push, NV30_3D(RT_HORIZ), 2); PUSH_DATA (push, (4096 << 16)); PUSH_DATA (push, (4096 << 16)); BEGIN_NV04(push, NV30_3D(SCISSOR_HORIZ), 2); PUSH_DATA (push, (4096 << 16)); PUSH_DATA (push, (4096 << 16)); BEGIN_NV04(push, NV30_3D(VIEWPORT_HORIZ), 2); PUSH_DATA (push, (4096 << 16)); PUSH_DATA (push, (4096 << 16)); BEGIN_NV04(push, NV30_3D(VIEWPORT_CLIP_HORIZ(0)), 2); PUSH_DATA (push, (4095 << 16)); PUSH_DATA (push, (4095 << 16)); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_FROM_ID), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x401f9c6c); /* mov o[hpos], a[0] */ PUSH_DATA (push, 0x0040000d); PUSH_DATA (push, 0x8106c083); PUSH_DATA (push, 0x6041ef80); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00001c6c); /* mov r0.xyw, a[8].xyww */ PUSH_DATA (push, 0x0040080f); PUSH_DATA (push, 0x8106c083); PUSH_DATA (push, 0x6041affc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.x, r0.xyw, c[0].xyz */ PUSH_DATA (push, 0x0140000f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60410ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.y, r0.xyw, c[1].xyz */ PUSH_DATA (push, 0x0140100f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60408ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.w, r0.xyw, c[2].xyz */ PUSH_DATA (push, 0x0140200f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60402ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x401f9c6c); /* mul o[tex0].xyw, r1, c[3] */ PUSH_DATA (push, 0x0080300d); PUSH_DATA (push, 0x8286c0c3); PUSH_DATA (push, 0x6041af9c); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00001c6c); /* mov r0.xyw, a[9].xyww */ PUSH_DATA (push, 0x0040090f); PUSH_DATA (push, 0x8106c083); PUSH_DATA (push, 0x6041affc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.x, r0.xyw, c[4].xyz */ PUSH_DATA (push, 0x0140400f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60410ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.y, r0.xyw, c[5].xyz */ PUSH_DATA (push, 0x0140500f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60408ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00009c6c); /* dp3 r1.w, r0.xyw, c[6].xyz */ PUSH_DATA (push, 0x0140600f); PUSH_DATA (push, 0x808680c3); PUSH_DATA (push, 0x60402ffc); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x401f9c6c); /* exit mul o[tex1].xyw, r1, c[4] */ PUSH_DATA (push, 0x0080700d); PUSH_DATA (push, 0x8286c0c3); PUSH_DATA (push, 0x6041afa1); BEGIN_NV04(push, NV30_3D(VP_UPLOAD_INST(0)), 4); PUSH_DATA (push, 0x00000000); /* exit */ PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000000); PUSH_DATA (push, 0x00000001); BEGIN_NV04(push, NV30_3D(VP_START_FROM_ID), 1); PUSH_DATA (push, 0); BEGIN_NV04(push, NV40_3D(VP_ATTRIB_EN), 2); PUSH_DATA (push, 0x00000309); PUSH_DATA (push, 0x0000c001); PUSH_DATAu(push, pNv->scratch, PFP_PASS, 1 * 4); PUSH_DATAs(push, 0x01403e81); /* mov r0, a[col0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAu(push, pNv->scratch, PFP_S, 2 * 4); PUSH_DATAs(push, 0x18009e00); /* txp r0, a[tex0], t[0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x01401e81); /* mov r0, r0 */ PUSH_DATAs(push, 0x1c9dc800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_S_A8, 2 * 4); PUSH_DATAs(push, 0x18009000); /* txp r0.w, a[tex0], t[0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x01401e81); /* mov r0, r0.w */ PUSH_DATAs(push, 0x1c9dfe00); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_C, 3 * 4); PUSH_DATAs(push, 0x1802b102); /* txpc0 r1.w, a[tex1], t[1] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x18009e00); /* txp r0 (ne0.w), a[tex0], t[0] */ PUSH_DATAs(push, 0x1ff5c801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x02001e81); /* mul r0, r0, r1.w */ PUSH_DATAs(push, 0x1c9dc800); PUSH_DATAs(push, 0x0001fe04); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_C_A8, 3 * 4); PUSH_DATAs(push, 0x1802b102); /* txpc0 r1.w, a[tex1], t[1] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x18009000); /* txp r0.w (ne0.w), a[tex0], t[0] */ PUSH_DATAs(push, 0x1ff5c801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x02001e81); /* mul r0, r0.w, r1.w */ PUSH_DATAs(push, 0x1c9dfe00); PUSH_DATAs(push, 0x0001fe04); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_CCA, 3 * 4); PUSH_DATAs(push, 0x18009f00); /* txpc0 r0, a[tex0], t[0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x1802be02); /* txp r1 (ne0), a[tex1], t[1] */ PUSH_DATAs(push, 0x1c95c801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x02001e81); /* mul r0, r0, r1 */ PUSH_DATAs(push, 0x1c9dc800); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_CCASA, 3 * 4); PUSH_DATAs(push, 0x18009102); /* txpc0 r1.w, a[tex0], t[0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x1802be00); /* txp r0 (ne0.w), a[tex1], t[1] */ PUSH_DATAs(push, 0x1ff5c801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x02001e81); /* mul r0, r1.w, r0 */ PUSH_DATAs(push, 0x1c9dfe04); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAu(push, pNv->scratch, PFP_NV12_BILINEAR, 8 * 4); PUSH_DATAs(push, 0x17028200); /* texr r0.x, a[tex0], t[1] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x04000e02); /* madr r1.xyz, r0.x, imm.x, imm.yzww */ PUSH_DATAs(push, 0x1c9c0000); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001f202); PUSH_DATAs(push, 0x3f9507c8); /* { 1.16, -0.87, 0.53, -1.08 } */ PUSH_DATAs(push, 0xbf5ee393); PUSH_DATAs(push, 0x3f078fef); PUSH_DATAs(push, 0xbf8a6762); PUSH_DATAs(push, 0x1704ac80); /* texr r0.yz, a[tex1], t[2] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x04000e02); /* madr r1.xyz, r0.y, imm, r1 */ PUSH_DATAs(push, 0x1c9cab00); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x00000000); /* { 0.00, -0.39, 2.02, 0.00 } */ PUSH_DATAs(push, 0xbec890d6); PUSH_DATAs(push, 0x40011687); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x04000e81); /* madr r0.xyz, r0.z, imm, r1 */ PUSH_DATAs(push, 0x1c9d5500); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c804); PUSH_DATAs(push, 0x3fcc432d); /* { 1.60, -0.81, 0.00, 0.00 } */ PUSH_DATAs(push, 0xbf501a37); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAu(push, pNv->scratch, PFP_NV12_BICUBIC, 29 * 4); PUSH_DATAs(push, 0x01008600); /* movr r0.xy, a[tex0] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x03000800); /* addr r0.z, r0.y, imm.x */ PUSH_DATAs(push, 0x1c9caa00); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3f000000); /* { 0.50, 0.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x03000202); /* addr r1.x, r0, imm.x */ PUSH_DATAs(push, 0x1c9dc800); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3f000000); /* { 0.50, 0.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x17000f82); /* texrc0 r1.xyz, r0.z, t[0] */ PUSH_DATAs(push, 0x1c9d5400); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x02001404); /* mulr r2.yw, r1.xxyy, imm.xxyy */ PUSH_DATAs(push, 0x1c9ca104); PUSH_DATAs(push, 0x0000a002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0xbf800000); /* { -1.00, 1.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x3f800000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x17000e86); /* texr r3.xyz, r1, t[0] */ PUSH_DATAs(push, 0x1c9dc804); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x02000a04); /* mulr r2.xz, r3.xxyy, imm.xxyy */ PUSH_DATAs(push, 0x1c9ca10c); PUSH_DATAs(push, 0x0000a002); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0xbf800000); /* { -1.00, 1.00, 0.00, 0.00 } */ PUSH_DATAs(push, 0x3f800000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x03001e04); /* addr r2, r0.xyxy, r2 */ PUSH_DATAs(push, 0x1c9c8800); PUSH_DATAs(push, 0x0001c808); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x17020402); /* texr r1.y, r2.zwzz, -t[1] */ PUSH_DATAs(push, 0x1c9d5c08); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x04400282); /* madh r1.x, -r1.z, r1.y, r1.y */ PUSH_DATAs(push, 0x1c9f5504); PUSH_DATAs(push, 0x0000aa04); PUSH_DATAs(push, 0x0000aa04); PUSH_DATAs(push, 0x17020400); /* texr r0.y, r2.xwxw, -t[1] */ PUSH_DATAs(push, 0x1c9d9808); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x04401080); /* madh r0.w, -r1.z, r0.y, r0.y */ PUSH_DATAs(push, 0x1c9f5504); PUSH_DATAs(push, 0x0000aa00); PUSH_DATAs(push, 0x0000aa00); PUSH_DATAs(push, 0x17020200); /* texr r0.x, r2.zyxy, t[1] */ PUSH_DATAs(push, 0x1c9c8c08); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x04400282); /* madh r1.x, r1.z, r0, r1 */ PUSH_DATAs(push, 0x1c9d5504); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c904); PUSH_DATAs(push, 0x17020200); /* texr r0.x (NE0.z), r2, t[1] */ PUSH_DATAs(push, 0x1555c808); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x04400280); /* madh r0.x, r1.z, r0, r0.w */ PUSH_DATAs(push, 0x1c9d5504); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x0001ff00); PUSH_DATAs(push, 0x04401080); /* madh r0.w, -r3.z, r1.x, r1.x */ PUSH_DATAs(push, 0x1c9f550c); PUSH_DATAs(push, 0x00000104); PUSH_DATAs(push, 0x00000104); PUSH_DATAs(push, 0x1704ac80); /* texr r0.yz, a[tex1], t[2] */ PUSH_DATAs(push, 0x1c9dc801); PUSH_DATAs(push, 0x0001c800); PUSH_DATAs(push, 0x3fe1c800); PUSH_DATAs(push, 0x04400280); /* madh r0.x, r3.z, r0, r0.w */ PUSH_DATAs(push, 0x1c9d550c); PUSH_DATAs(push, 0x0001c900); PUSH_DATAs(push, 0x0001ff00); PUSH_DATAs(push, 0x04400e82); /* madh r1.xyz, r0.x, imm.x, imm.yzww */ PUSH_DATAs(push, 0x1c9c0100); PUSH_DATAs(push, 0x00000002); PUSH_DATAs(push, 0x0001f202); PUSH_DATAs(push, 0x3f9507c8); /* { 1.16, -0.87, 0.53, -1.08 } */ PUSH_DATAs(push, 0xbf5ee393); PUSH_DATAs(push, 0x3f078fef); PUSH_DATAs(push, 0xbf8a6762); PUSH_DATAs(push, 0x04400e82); /* madh r1.xyz, r0.y, imm, r1 */ PUSH_DATAs(push, 0x1c9cab00); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c904); PUSH_DATAs(push, 0x00000000); /* { 0.00, -0.39, 2.02, 0.00 } */ PUSH_DATAs(push, 0xbec890d6); PUSH_DATAs(push, 0x40011687); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x04400e81); /* madh r0.xyz, r0.z, imm, r1 */ PUSH_DATAs(push, 0x1c9d5500); PUSH_DATAs(push, 0x0001c802); PUSH_DATAs(push, 0x0001c904); PUSH_DATAs(push, 0x3fcc432d); /* { 1.60, -0.81, 0.00, 0.00 } */ PUSH_DATAs(push, 0xbf501a37); PUSH_DATAs(push, 0x00000000); PUSH_DATAs(push, 0x00000000); return TRUE; } xf86-video-nouveau-1.0.18/src/nouveau_xv.c0000644000175000017500000017232114713424663014013 /* * Copyright 2007 Arthur Huillet * * 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 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef __SSE2__ #include #endif #include "xf86xv.h" #include #include "exa.h" #include "damage.h" #include "dixstruct.h" #include "fourcc.h" #include "nv_include.h" #include "nv_dma.h" #include "vl_hwmc.h" #include "hwdefs/nv_m2mf.xml.h" #define IMAGE_MAX_W 2046 #define IMAGE_MAX_H 2046 #define TEX_IMAGE_MAX_W 4096 #define TEX_IMAGE_MAX_H 4096 #define OFF_DELAY 500 /* milliseconds */ #define FREE_DELAY 5000 #define NUM_BLIT_PORTS 16 #define NUM_TEXTURE_PORTS 32 #define NVStopOverlay(X) (((pNv->Architecture == NV_ARCH_04) ? NV04StopOverlay(X) : NV10StopOverlay(X))) /* Value taken by pPriv -> currentHostBuffer when we failed to allocate the two private buffers in TT memory, so that we can catch this case and attempt no other allocation afterwards (performance reasons) */ #define NO_PRIV_HOST_BUFFER_AVAILABLE 9999 /* NVPutImage action flags */ enum { IS_YV12 = 1, IS_YUY2 = 2, CONVERT_TO_YUY2=4, USE_OVERLAY=8, USE_TEXTURE=16, SWAP_UV=32, IS_RGB=64, //I am not sure how long we will support it }; #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) Atom xvBrightness, xvContrast, xvColorKey, xvSaturation; Atom xvHue, xvAutopaintColorKey, xvSetDefaults, xvDoubleBuffer; Atom xvITURBT709, xvSyncToVBlank, xvOnCRTCNb; /* client libraries expect an encoding */ static XF86VideoEncodingRec DummyEncoding = { 0, "XV_IMAGE", IMAGE_MAX_W, IMAGE_MAX_H, {1, 1} }; static XF86VideoEncodingRec DummyEncodingTex = { 0, "XV_IMAGE", TEX_IMAGE_MAX_W, TEX_IMAGE_MAX_H, {1, 1} }; static XF86VideoEncodingRec DummyEncodingNV50 = { 0, "XV_IMAGE", 8192, 8192, {1, 1} }; #define NUM_FORMATS_ALL 6 XF86VideoFormatRec NVFormats[NUM_FORMATS_ALL] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor}, {15, DirectColor}, {16, DirectColor}, {24, DirectColor} }; #define NUM_FORMATS_NV50 8 XF86VideoFormatRec NV50Formats[NUM_FORMATS_NV50] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor}, {30, TrueColor}, {15, DirectColor}, {16, DirectColor}, {24, DirectColor}, {30, DirectColor} }; #define NUM_NV04_OVERLAY_ATTRIBUTES 4 XF86AttributeRec NV04OverlayAttributes[NUM_NV04_OVERLAY_ATTRIBUTES] = { {XvSettable | XvGettable, -512, 511, "XV_BRIGHTNESS"}, {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, {XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"}, {XvSettable , 0, 0, "XV_SET_DEFAULTS"}, }; #define NUM_NV10_OVERLAY_ATTRIBUTES 10 XF86AttributeRec NV10OverlayAttributes[NUM_NV10_OVERLAY_ATTRIBUTES] = { {XvSettable | XvGettable, 0, 1, "XV_DOUBLE_BUFFER"}, {XvSettable | XvGettable, 0, (1 << 24) - 1, "XV_COLORKEY"}, {XvSettable | XvGettable, 0, 1, "XV_AUTOPAINT_COLORKEY"}, {XvSettable , 0, 0, "XV_SET_DEFAULTS"}, {XvSettable | XvGettable, -512, 511, "XV_BRIGHTNESS"}, {XvSettable | XvGettable, 0, 8191, "XV_CONTRAST"}, {XvSettable | XvGettable, 0, 8191, "XV_SATURATION"}, {XvSettable | XvGettable, 0, 360, "XV_HUE"}, {XvSettable | XvGettable, 0, 1, "XV_ITURBT_709"}, {XvSettable | XvGettable, 0, 1, "XV_ON_CRTC_NB"}, }; #define NUM_BLIT_ATTRIBUTES 2 XF86AttributeRec NVBlitAttributes[NUM_BLIT_ATTRIBUTES] = { {XvSettable , 0, 0, "XV_SET_DEFAULTS"}, {XvSettable | XvGettable, 0, 1, "XV_SYNC_TO_VBLANK"} }; #define NUM_TEXTURED_ATTRIBUTES 2 XF86AttributeRec NVTexturedAttributes[NUM_TEXTURED_ATTRIBUTES] = { {XvSettable , 0, 0, "XV_SET_DEFAULTS"}, {XvSettable | XvGettable, 0, 1, "XV_SYNC_TO_VBLANK"} }; #define NUM_TEXTURED_ATTRIBUTES_NV50 7 XF86AttributeRec NVTexturedAttributesNV50[NUM_TEXTURED_ATTRIBUTES_NV50] = { { XvSettable , 0, 0, "XV_SET_DEFAULTS" }, { XvSettable | XvGettable, 0, 1, "XV_SYNC_TO_VBLANK" }, { XvSettable | XvGettable, -1000, 1000, "XV_BRIGHTNESS" }, { XvSettable | XvGettable, -1000, 1000, "XV_CONTRAST" }, { XvSettable | XvGettable, -1000, 1000, "XV_SATURATION" }, { XvSettable | XvGettable, -1000, 1000, "XV_HUE" }, { XvSettable | XvGettable, 0, 1, "XV_ITURBT_709" } }; #define NUM_IMAGES_YUV 4 #define NUM_IMAGES_ALL 5 #define FOURCC_RGB 0x0000003 #define XVIMAGE_RGB \ { \ FOURCC_RGB, \ XvRGB, \ LSBFirst, \ { 0x03, 0x00, 0x00, 0x00, \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 32, \ XvPacked, \ 1, \ 24, 0x00ff0000, 0x0000ff00, 0x000000ff, \ 0, 0, 0, \ 0, 0, 0, \ 0, 0, 0, \ {'B','G','R','X',\ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } static XF86ImageRec NVImages[NUM_IMAGES_ALL] = { XVIMAGE_YUY2, XVIMAGE_YV12, XVIMAGE_UYVY, XVIMAGE_I420, XVIMAGE_RGB }; static void box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) { dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1; dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2; if (dest->x1 >= dest->x2) { dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; return; } dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1; dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2; if (dest->y1 >= dest->y2) dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; } static int box_area(BoxPtr box) { return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1); } static void rr_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box) { if (crtc->mode) { crtc_box->x1 = crtc->x; crtc_box->y1 = crtc->y; switch (crtc->rotation) { case RR_Rotate_0: case RR_Rotate_180: default: crtc_box->x2 = crtc->x + crtc->mode->mode.width; crtc_box->y2 = crtc->y + crtc->mode->mode.height; break; case RR_Rotate_90: case RR_Rotate_270: crtc_box->x2 = crtc->x + crtc->mode->mode.height; crtc_box->y2 = crtc->y + crtc->mode->mode.width; break; } } else crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0; } static Bool rr_crtc_on(RRCrtcPtr crtc, Bool crtc_is_xf86_hint) { if (!crtc) { return FALSE; } if (crtc_is_xf86_hint && crtc->devPrivate) { return xf86_crtc_on(crtc->devPrivate); } else { return !!crtc->mode; } } /* * Return the crtc covering 'box'. If two crtcs cover a portion of * 'box', then prefer the crtc with greater coverage. */ static RRCrtcPtr rr_crtc_covering_box(ScreenPtr pScreen, BoxPtr box, Bool screen_is_xf86_hint) { rrScrPrivPtr pScrPriv; RRCrtcPtr crtc, best_crtc, primary_crtc; int coverage, best_coverage; int c; BoxRec crtc_box, cover_box; RROutputPtr primary_output; best_crtc = NULL; best_coverage = 0; primary_crtc = NULL; primary_output = NULL; if (!dixPrivateKeyRegistered(rrPrivKey)) return NULL; pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) return NULL; primary_output = RRFirstOutput(pScreen); if (primary_output && primary_output->crtc) primary_crtc = primary_output->crtc->devPrivate; for (c = 0; c < pScrPriv->numCrtcs; c++) { crtc = pScrPriv->crtcs[c]; /* If the CRTC is off, treat it as not covering */ if (!rr_crtc_on(crtc, screen_is_xf86_hint)) continue; rr_crtc_box(crtc, &crtc_box); box_intersect(&cover_box, &crtc_box, box); coverage = box_area(&cover_box); if (coverage > best_coverage || (crtc == primary_crtc && coverage == best_coverage)) { best_crtc = crtc; best_coverage = coverage; } } return best_crtc; } #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) static RRCrtcPtr rr_crtc_covering_box_on_secondary(ScreenPtr pScreen, BoxPtr box) { if (!pScreen->isGPU) { ScreenPtr secondary; RRCrtcPtr crtc = NULL; xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; crtc = rr_crtc_covering_box(secondary, box, FALSE); if (crtc) return crtc; } } return NULL; } #endif RRCrtcPtr randr_crtc_covering_drawable(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; RRCrtcPtr crtc = NULL; BoxRec box; box.x1 = pDraw->x; box.y1 = pDraw->y; box.x2 = box.x1 + pDraw->width; box.y2 = box.y1 + pDraw->height; crtc = rr_crtc_covering_box(pScreen, &box, TRUE); #if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0) if (!crtc) { crtc = rr_crtc_covering_box_on_secondary(pScreen, &box); } #endif return crtc; } xf86CrtcPtr nouveau_pick_best_crtc(ScrnInfoPtr pScrn, int x, int y, int w, int h) { ScreenPtr pScreen = pScrn->pScreen; RRCrtcPtr crtc = NULL; BoxRec box; if (!pScrn->vtSema) return NULL; box.x1 = x; box.x2 = x + w; box.y1 = y; box.y2 = y + h; crtc = rr_crtc_covering_box(pScreen, &box, TRUE); if (crtc) { return crtc->devPrivate; } return NULL; } unsigned int nv_window_belongs_to_crtc(ScrnInfoPtr pScrn, int x, int y, int w, int h) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); unsigned int mask = 0; int i; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (!xf86_crtc_on(crtc)) continue; if ((x < (crtc->x + crtc->mode.HDisplay)) && (y < (crtc->y + crtc->mode.VDisplay)) && ((x + w) > crtc->x) && ((y + h) > crtc->y)) mask |= 1 << i; } return mask; } /** * NVSetPortDefaults * set attributes of port "pPriv" to compiled-in (except for colorKey) defaults * this function does not care about the kind of adapter the port is for * * @param pScrn screen to get the default colorKey from * @param pPriv port to reset to defaults */ void NVSetPortDefaults (ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) { NVPtr pNv = NVPTR(pScrn); pPriv->brightness = 0; pPriv->contrast = 4096; pPriv->saturation = 4096; pPriv->hue = 0; pPriv->colorKey = pNv->videoKey; pPriv->autopaintColorKey = TRUE; pPriv->doubleBuffer = pNv->Architecture != NV_ARCH_04; pPriv->iturbt_709 = FALSE; pPriv->currentHostBuffer = 0; } static int nouveau_xv_bo_realloc(ScrnInfoPtr pScrn, unsigned flags, unsigned size, struct nouveau_bo **pbo) { union nouveau_bo_config config = {}; NVPtr pNv = NVPTR(pScrn); if (*pbo) { if ((*pbo)->size >= size) return 0; nouveau_bo_ref(NULL, pbo); } if (flags & NOUVEAU_BO_VRAM) { if (pNv->Architecture == NV_TESLA) config.nv50.memtype = 0x70; else if (pNv->Architecture >= NV_FERMI) config.nvc0.memtype = 0xfe; } flags |= NOUVEAU_BO_MAP; return nouveau_bo_new(pNv->dev, flags, 0, size, &config, pbo); } /** * NVFreePortMemory * frees memory held by a given port * * @param pScrn screen whose port wants to free memory * @param pPriv port to free memory of */ static void NVFreePortMemory(ScrnInfoPtr pScrn, NVPortPrivPtr pPriv) { nouveau_bo_ref(NULL, &pPriv->video_mem); nouveau_bo_ref(NULL, &pPriv->TT_mem_chunk[0]); nouveau_bo_ref(NULL, &pPriv->TT_mem_chunk[1]); } /** * NVFreeOverlayMemory * frees memory held by the overlay port * * @param pScrn screen whose overlay port wants to free memory */ static void NVFreeOverlayMemory(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); NVFreePortMemory(pScrn, pPriv); #if NVOVL_SUPPORT /* "power cycle" the overlay */ nvWriteMC(pNv, NV_PMC_ENABLE, (nvReadMC(pNv, NV_PMC_ENABLE) & 0xEFFFFFFF)); nvWriteMC(pNv, NV_PMC_ENABLE, (nvReadMC(pNv, NV_PMC_ENABLE) | 0x10000000)); #endif } /** * NVFreeBlitMemory * frees memory held by the blit port * * @param pScrn screen whose blit port wants to free memory */ static void NVFreeBlitMemory(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_BLIT_PRIVATE(pNv); NVFreePortMemory(pScrn, pPriv); } /** * NVVideoTimerCallback * callback function which perform cleanup tasks (stop overlay, free memory). * within the driver * purpose and use is unknown */ void NVVideoTimerCallback(ScrnInfoPtr pScrn, Time currentTime) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pOverPriv = NULL; NVPortPrivPtr pBlitPriv = NULL; Bool needCallback = FALSE; if (!pScrn->vtSema) return; if (pNv->overlayAdaptor) { pOverPriv = GET_OVERLAY_PRIVATE(pNv); if (!pOverPriv->videoStatus) pOverPriv = NULL; } if (pNv->blitAdaptor) { pBlitPriv = GET_BLIT_PRIVATE(pNv); if (!pBlitPriv->videoStatus) pBlitPriv = NULL; } if (pOverPriv) { if (pOverPriv->videoTime < currentTime) { if (pOverPriv->videoStatus & OFF_TIMER) { NVStopOverlay(pScrn); pOverPriv->videoStatus = FREE_TIMER; pOverPriv->videoTime = currentTime + FREE_DELAY; needCallback = TRUE; } else if (pOverPriv->videoStatus & FREE_TIMER) { NVFreeOverlayMemory(pScrn); pOverPriv->videoStatus = 0; } } else { needCallback = TRUE; } } if (pBlitPriv) { if (pBlitPriv->videoTime < currentTime) { NVFreeBlitMemory(pScrn); pBlitPriv->videoStatus = 0; } else { needCallback = TRUE; } } pNv->VideoTimerCallback = needCallback ? NVVideoTimerCallback : NULL; } #ifndef ExaOffscreenMarkUsed extern void ExaOffscreenMarkUsed(PixmapPtr); #endif /* * StopVideo */ static void NVStopOverlayVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = (NVPortPrivPtr)data; if (pPriv->grabbedByV4L) return; REGION_EMPTY(pScrn->pScreen, &pPriv->clip); if(Exit) { if (pPriv->videoStatus & CLIENT_VIDEO_ON) NVStopOverlay(pScrn); NVFreeOverlayMemory(pScrn); pPriv->videoStatus = 0; } else { if (pPriv->videoStatus & CLIENT_VIDEO_ON) { pPriv->videoStatus = OFF_TIMER | CLIENT_VIDEO_ON; pPriv->videoTime = currentTime.milliseconds + OFF_DELAY; pNv->VideoTimerCallback = NVVideoTimerCallback; } } } /** * QueryBestSize * used by client applications to ask the driver: * how would you actually scale a video of dimensions * vid_w, vid_h, if i wanted you to scale it to dimensions * drw_w, drw_h? * function stores actual scaling size in pointers p_w, p_h. * * * @param pScrn unused * @param motion unused * @param vid_w width of source video * @param vid_h height of source video * @param drw_w desired scaled width as requested by client * @param drw_h desired scaled height as requested by client * @param p_w actual scaled width as the driver is capable of * @param p_h actual scaled height as the driver is capable of * @param data unused */ static void NVQueryBestSize(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, pointer data) { if(vid_w > (drw_w << 3)) drw_w = vid_w >> 3; if(vid_h > (drw_h << 3)) drw_h = vid_h >> 3; *p_w = drw_w; *p_h = drw_h; } /** * NVCopyData420 * used to convert YV12 to YUY2 for the blitter and NV04 overlay. * The U and V samples generated are linearly interpolated on the vertical * axis for better quality * * @param src1 source buffer of luma * @param src2 source buffer of chroma1 * @param src3 source buffer of chroma2 * @param dst1 destination buffer * @param srcPitch pitch of src1 * @param srcPitch2 pitch of src2, src3 * @param dstPitch pitch of dst1 * @param h number of lines to copy * @param w length of lines to copy */ static inline void NVCopyData420(unsigned char *src1, unsigned char *src2, unsigned char *src3, unsigned char *dst1, int srcPitch, int srcPitch2, int dstPitch, int h, int w) { CARD32 *dst; CARD8 *s1, *s2, *s3; int i, j; #define su(X) (((j & 1) && j < (h-1)) ? ((unsigned)((signed int)s2[X] + \ (signed int)(s2 + srcPitch2)[X]) / 2) : (s2[X])) #define sv(X) (((j & 1) && j < (h-1)) ? ((unsigned)((signed int)s3[X] + \ (signed int)(s3 + srcPitch2)[X]) / 2) : (s3[X])) w >>= 1; for (j = 0; j < h; j++) { dst = (CARD32*)dst1; s1 = src1; s2 = src2; s3 = src3; i = w; while (i > 4) { #if X_BYTE_ORDER == X_BIG_ENDIAN dst[0] = (s1[0] << 24) | (s1[1] << 8) | (sv(0) << 16) | su(0); dst[1] = (s1[2] << 24) | (s1[3] << 8) | (sv(1) << 16) | su(1); dst[2] = (s1[4] << 24) | (s1[5] << 8) | (sv(2) << 16) | su(2); dst[3] = (s1[6] << 24) | (s1[7] << 8) | (sv(3) << 16) | su(3); #else dst[0] = s1[0] | (s1[1] << 16) | (sv(0) << 8) | (su(0) << 24); dst[1] = s1[2] | (s1[3] << 16) | (sv(1) << 8) | (su(1) << 24); dst[2] = s1[4] | (s1[5] << 16) | (sv(2) << 8) | (su(2) << 24); dst[3] = s1[6] | (s1[7] << 16) | (sv(3) << 8) | (su(3) << 24); #endif dst += 4; s2 += 4; s3 += 4; s1 += 8; i -= 4; } while (i--) { #if X_BYTE_ORDER == X_BIG_ENDIAN dst[0] = (s1[0] << 24) | (s1[1] << 8) | (sv(0) << 16) | su(0); #else dst[0] = s1[0] | (s1[1] << 16) | (sv(0) << 8) | (su(0) << 24); #endif dst++; s2++; s3++; s1 += 2; } dst1 += dstPitch; src1 += srcPitch; if (j & 1) { src2 += srcPitch2; src3 += srcPitch2; } } } /** * NVCopyNV12ColorPlanes * Used to convert YV12 color planes to NV12 (interleaved UV) for the overlay * * @param src1 source buffer of chroma1 * @param dst1 destination buffer * @param h number of lines to copy * @param w length of lines to copy * @param id source pixel format (YV12 or I420) */ static inline void NVCopyNV12ColorPlanes(unsigned char *src1, unsigned char *src2, unsigned char *dst, int dstPitch, int srcPitch2, int h, int w) { int i, j, l, e; w >>= 1; h >>= 1; #ifdef __SSE2__ l = w >> 3; e = w & 7; #else l = w >> 1; e = w & 1; #endif for (j = 0; j < h; j++) { unsigned char *us = src1; unsigned char *vs = src2; unsigned int *vuvud = (unsigned int *) dst; unsigned short *vud; for (i = 0; i < l; i++) { #ifdef __SSE2__ _mm_storeu_si128( (void*)vuvud, _mm_unpacklo_epi8( _mm_loadl_epi64((void*)vs), _mm_loadl_epi64((void*)us))); vuvud+=4; us+=8; vs+=8; #else /* __SSE2__ */ # if X_BYTE_ORDER == X_BIG_ENDIAN *vuvud++ = (vs[0]<<24) | (us[0]<<16) | (vs[1]<<8) | us[1]; # else *vuvud++ = vs[0] | (us[0]<<8) | (vs[1]<<16) | (us[1]<<24); # endif us+=2; vs+=2; #endif /* __SSE2__ */ } vud = (unsigned short *)vuvud; for (i = 0; i < e; i++) { #if X_BYTE_ORDER == X_BIG_ENDIAN vud[i] = us[i] | (vs[i]<<8); #else vud[i] = vs[i] | (us[i]<<8); #endif } dst += dstPitch; src1 += srcPitch2; src2 += srcPitch2; } } static int NV_set_dimensions(ScrnInfoPtr pScrn, int action_flags, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, short *src_x, short *src_y, short *src_w, short *src_h, short *drw_x, short *drw_y, short *drw_w, short *drw_h, int *left, int *top, int *right, int *bottom, BoxRec *dstBox, int *npixels, int *nlines, RegionPtr clipBoxes, short width, short height) { NVPtr pNv = NVPTR(pScrn); if (action_flags & USE_OVERLAY) { switch (pNv->Architecture) { case NV_ARCH_04: /* NV0x overlay can't scale down. at all. */ if (*drw_w < *src_w) *drw_w = *src_w; if (*drw_h < *src_h) *drw_h = *src_h; break; case NV_ARCH_30: /* According to DirectFB, NV3x can't scale down by * a ratio > 2 */ if (*drw_w < (*src_w) >> 1) *drw_w = *src_w; if (*drw_h < (*src_h) >> 1) *drw_h = *src_h; break; default: /*NV10, NV20*/ /* NV1x overlay can't scale down by a ratio > 8 */ if (*drw_w < (*src_w) >> 3) *drw_w = *src_w >> 3; if (*drw_h < (*src_h >> 3)) *drw_h = *src_h >> 3; } } /* Clip */ *xa = *src_x; *xb = *src_x + *src_w; *ya = *src_y; *yb = *src_y + *src_h; dstBox->x1 = *drw_x; dstBox->x2 = *drw_x + *drw_w; dstBox->y1 = *drw_y; dstBox->y2 = *drw_y + *drw_h; /* In randr 1.2 mode VIDEO_CLIP_TO_VIEWPORT is broken (hence it is not * set in the overlay adapter flags) since pScrn->frame{X,Y}1 do not get * updated. Hence manual clipping against the CRTC dimensions */ if (action_flags & USE_OVERLAY) { NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); unsigned id = pPriv->overlayCRTC; xf86CrtcPtr crtc = XF86_CRTC_CONFIG_PTR(pScrn)->crtc[id]; RegionRec VPReg; BoxRec VPBox; VPBox.x1 = crtc->x; VPBox.y1 = crtc->y; VPBox.x2 = crtc->x + crtc->mode.HDisplay; VPBox.y2 = crtc->y + crtc->mode.VDisplay; REGION_INIT(pScreen, &VPReg, &VPBox, 1); REGION_INTERSECT(pScreen, clipBoxes, clipBoxes, &VPReg); REGION_UNINIT(pScreen, &VPReg); } if (!xf86XVClipVideoHelper(dstBox, xa, xb, ya, yb, clipBoxes, width, height)) return -1; if (action_flags & USE_OVERLAY) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); dstBox->x1 -= xf86_config->crtc[pPriv->overlayCRTC]->x; dstBox->x2 -= xf86_config->crtc[pPriv->overlayCRTC]->x; dstBox->y1 -= xf86_config->crtc[pPriv->overlayCRTC]->y; dstBox->y2 -= xf86_config->crtc[pPriv->overlayCRTC]->y; } /* Convert fixed point to integer, as xf86XVClipVideoHelper probably * turns its parameter into fixed point values */ *left = (*xa) >> 16; if (*left < 0) *left = 0; *top = (*ya) >> 16; if (*top < 0) *top = 0; *right = (*xb) >> 16; if (*right > width) *right = width; *bottom = (*yb) >> 16; if (*bottom > height) *bottom = height; if (action_flags & IS_YV12) { /* even "left", even "top", even number of pixels per line * and even number of lines */ *left &= ~1; *npixels = ((*right + 1) & ~1) - *left; *top &= ~1; *nlines = ((*bottom + 1) & ~1) - *top; } else if (action_flags & IS_YUY2) { /* even "left" */ *left &= ~1; /* even number of pixels per line */ *npixels = ((*right + 1) & ~1) - *left; *nlines = *bottom - *top; /* 16bpp */ *left <<= 1; } else if (action_flags & IS_RGB) { *npixels = *right - *left; *nlines = *bottom - *top; /* 32bpp */ *left <<= 2; } return 0; } static int NV_calculate_pitches_and_mem_size(NVPtr pNv, int action_flags, int *srcPitch, int *srcPitch2, int *dstPitch, int *s2offset, int *s3offset, int *uv_offset, int *newFBSize, int *newTTSize, int *line_len, int npixels, int nlines, int width, int height) { int tmp; if (pNv->Architecture >= NV_TESLA) { npixels = (npixels + 7) & ~7; nlines = (nlines + 7) & ~7; } if (action_flags & IS_YV12) { *srcPitch = (width + 3) & ~3; /* of luma */ *s2offset = *srcPitch * height; *srcPitch2 = ((width >> 1) + 3) & ~3; /*of chroma*/ *s3offset = (*srcPitch2 * (height >> 1)) + *s2offset; *dstPitch = (npixels + 63) & ~63; /*luma and chroma pitch*/ *line_len = npixels; *uv_offset = nlines * *dstPitch; *newFBSize = *uv_offset + (nlines >> 1) * *dstPitch; *newTTSize = *uv_offset + (nlines >> 1) * *dstPitch; } else if (action_flags & IS_YUY2) { *srcPitch = width << 1; /* one luma, one chroma per pixel */ *dstPitch = ((npixels << 1) + 63) & ~63; *line_len = npixels << 1; *newFBSize = nlines * *dstPitch; *newTTSize = nlines * *line_len; } else if (action_flags & IS_RGB) { /* one R, one G, one B, one X per pixel */ *srcPitch = width << 2; *dstPitch = ((npixels << 2) + 63) & ~63; *line_len = npixels << 2; *newFBSize = nlines * *dstPitch; *newTTSize = nlines * *dstPitch; } if (action_flags & CONVERT_TO_YUY2) { *dstPitch = ((npixels << 1) + 63) & ~63; *line_len = npixels << 1; *newFBSize = nlines * *dstPitch; *newTTSize = nlines * *line_len; *uv_offset = 0; } if (action_flags & SWAP_UV) { /* I420 swaps U and V */ tmp = *s2offset; *s2offset = *s3offset; *s3offset = tmp; } /* Overlay double buffering... */ if (action_flags & USE_OVERLAY) (*newFBSize) <<= 1; return 0; } /** * NV_set_action_flags * This function computes the action flags from the input image, * that is, it decides what NVPutImage and its helpers must do. * This eases readability by avoiding lots of switch-case statements in the * core NVPutImage */ static void NV_set_action_flags(ScrnInfoPtr pScrn, DrawablePtr pDraw, NVPortPrivPtr pPriv, int id, short drw_x, short drw_y, short drw_w, short drw_h, int *action_flags) { NVPtr pNv = NVPTR(pScrn); #define USING_OVERLAY (*action_flags & USE_OVERLAY) #define USING_TEXTURE (*action_flags & USE_TEXTURE) #define USING_BLITTER ((!(*action_flags & USE_OVERLAY)) && \ (!(*action_flags & USE_TEXTURE))) *action_flags = 0; /* Pixel format-related bits */ if (id == FOURCC_YUY2 || id == FOURCC_UYVY) *action_flags |= IS_YUY2; if (id == FOURCC_YV12 || id == FOURCC_I420) *action_flags |= IS_YV12; if (id == FOURCC_RGB) /*How long will we support it?*/ *action_flags |= IS_RGB; if (id == FOURCC_I420) /* I420 is YV12 with swapped UV */ *action_flags |= SWAP_UV; /* Desired adapter */ if (!pPriv->blitter && !pPriv->texture) *action_flags |= USE_OVERLAY; if (!pPriv->blitter && pPriv->texture) *action_flags |= USE_TEXTURE; /* Adapter fallbacks (when the desired one can't be used)*/ #ifdef COMPOSITE { PixmapPtr ppix = NVGetDrawablePixmap(pDraw); /* this is whether ppix is in the viewable fb, not related to the EXA "offscreen" stuff */ if (!nouveau_exa_pixmap_is_onscreen(ppix)) *action_flags &= ~USE_OVERLAY; } #endif #ifdef NVOVL_SUPPORT if (USING_OVERLAY) { char crtc = nv_window_belongs_to_crtc(pScrn, drw_x, drw_y, drw_w, drw_h); if ((crtc & (1 << 0)) && (crtc & (1 << 1))) { /* The overlay cannot be used on two CRTCs at a time, * so we need to fallback on the blitter */ *action_flags &= ~USE_OVERLAY; } else if ((crtc & (1 << 0))) { /* We need to put the overlay on CRTC0 - if it's not * already here */ if (pPriv->overlayCRTC == 1) { NVWriteCRTC(pNv, 0, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, 0, NV_PCRTC_ENGINE_CTRL) | NV_CRTC_FSEL_OVERLAY); NVWriteCRTC(pNv, 1, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, 1, NV_PCRTC_ENGINE_CTRL) & ~NV_CRTC_FSEL_OVERLAY); pPriv->overlayCRTC = 0; } } else if ((crtc & (1 << 1))) { if (pPriv->overlayCRTC == 0) { NVWriteCRTC(pNv, 1, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, 1, NV_PCRTC_ENGINE_CTRL) | NV_CRTC_FSEL_OVERLAY); NVWriteCRTC(pNv, 0, NV_PCRTC_ENGINE_CTRL, NVReadCRTC(pNv, 0, NV_PCRTC_ENGINE_CTRL) & ~NV_CRTC_FSEL_OVERLAY); pPriv->overlayCRTC = 1; } } if (XF86_CRTC_CONFIG_PTR(pScrn)->crtc[pPriv->overlayCRTC] ->rotation != RR_Rotate_0) *action_flags &= ~USE_OVERLAY; } #endif /* At this point the adapter we're going to use is _known_. * You cannot change it now. */ /* Card/adapter format restrictions */ if (USING_BLITTER) { /* The blitter does not handle YV12 natively */ if (id == FOURCC_YV12 || id == FOURCC_I420) *action_flags |= CONVERT_TO_YUY2; } if (USING_OVERLAY && (pNv->Architecture == NV_ARCH_04)) { /* NV04-05 don't support YV12, only YUY2 and ITU-R BT.601 */ if (*action_flags & IS_YV12) *action_flags |= CONVERT_TO_YUY2; } if (USING_OVERLAY && (pNv->Architecture == NV_ARCH_10 || pNv->Architecture == NV_ARCH_20)) { /* No YV12 overlay on NV10, 11, 15, 20, NFORCE */ switch (pNv->dev->chipset) { case 0x10: case 0x11: case 0x15: case 0x1a: /*XXX: unsure about nforce */ case 0x20: *action_flags |= CONVERT_TO_YUY2; break; default: break; } } } /** * NVPutImage * PutImage is "the" important function of the Xv extension. * a client (e.g. video player) calls this function for every * image (of the video) to be displayed. this function then * scales and displays the image. * * @param pScrn screen which hold the port where the image is put * @param src_x source point in the source image to start displaying from * @param src_y see above * @param src_w width of the source image to display * @param src_h see above * @param drw_x screen point to display to * @param drw_y * @param drw_w width of the screen drawable * @param drw_h * @param id pixel format of image * @param buf pointer to buffer containing the source image * @param width total width of the source image we are passed * @param height * @param Sync unused * @param clipBoxes ?? * @param data pointer to port * @param pDraw drawable pointer */ static int NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, Bool Sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) { NVPortPrivPtr pPriv = (NVPortPrivPtr)data; NVPtr pNv = NVPTR(pScrn); PixmapPtr ppix; /* source box */ INT32 xa = 0, xb = 0, ya = 0, yb = 0; /* size to allocate in VRAM and in GART respectively */ int newFBSize = 0, newTTSize = 0; /* card VRAM offsets, source offsets for U and V planes */ int offset = 0, uv_offset = 0, s2offset = 0, s3offset = 0; /* source pitch, source pitch of U and V planes in case of YV12, * VRAM destination pitch */ int srcPitch = 0, srcPitch2 = 0, dstPitch = 0; /* position of the given source data (using src_*), number of pixels * and lines we are interested in */ int top = 0, left = 0, right = 0, bottom = 0, npixels = 0, nlines = 0; Bool skip = FALSE; BoxRec dstBox; CARD32 tmp = 0; int line_len = 0; /* length of a line, like npixels, but in bytes */ struct nouveau_bo *destination_buffer = NULL; int action_flags; /* what shall we do? */ unsigned char *map; int ret, i; if (pPriv->grabbedByV4L) return Success; if (width > pPriv->max_image_dim || height > pPriv->max_image_dim) return BadMatch; NV_set_action_flags(pScrn, pDraw, pPriv, id, drw_x, drw_y, drw_w, drw_h, &action_flags); if (NV_set_dimensions(pScrn, action_flags, &xa, &xb, &ya, &yb, &src_x, &src_y, &src_w, &src_h, &drw_x, &drw_y, &drw_w, &drw_h, &left, &top, &right, &bottom, &dstBox, &npixels, &nlines, clipBoxes, width, height)) return Success; if (NV_calculate_pitches_and_mem_size(pNv, action_flags, &srcPitch, &srcPitch2, &dstPitch, &s2offset, &s3offset, &uv_offset, &newFBSize, &newTTSize, &line_len, npixels, nlines, width, height)) return BadImplementation; /* There are some cases (tvtime with overscan for example) where the * input image is larger (width/height) than the source rectangle for * the overlay (src_w, src_h). In those cases, we try to do something * optimal by uploading only the necessary data. */ if (action_flags & IS_YUY2 || action_flags & IS_RGB) buf += (top * srcPitch) + left; if (action_flags & IS_YV12) { tmp = ((top >> 1) * srcPitch2) + (left >> 1); s2offset += tmp; s3offset += tmp; } ret = nouveau_xv_bo_realloc(pScrn, NOUVEAU_BO_VRAM, newFBSize, &pPriv->video_mem); if (ret) return BadAlloc; #ifdef NVOVL_SUPPORT if (action_flags & USE_OVERLAY) { ret = nouveau_bo_pin(pPriv->video_mem, NOUVEAU_BO_VRAM); if (ret) { nouveau_bo_ref(NULL, &pPriv->video_mem); return BadAlloc; } } #endif /* The overlay supports hardware double buffering. We handle this here*/ offset = 0; #ifdef NVOVL_SUPPORT if (pPriv->doubleBuffer) { int mask = 1 << (pPriv->currentBuffer << 2); /* overwrite the newest buffer if there's not one free */ if (nvReadVIDEO(pNv, NV_PVIDEO_BUFFER) & mask) { if (!pPriv->currentBuffer) offset += newFBSize >> 1; skip = TRUE; } else { if (pPriv->currentBuffer) offset += newFBSize >> 1; } } #endif /* Now we take a decision regarding the way we send the data to the * card. * * Either we use double buffering of "private" TT memory * Either we rely on X's GARTScratch * Either we fallback on CPU copy */ /* Try to allocate host-side double buffers, unless we have already * failed */ /* We take only nlines * line_len bytes - that is, only the pixel * data we are interested in - because the stuff in the GART is * written contiguously */ if (pPriv->currentHostBuffer != NO_PRIV_HOST_BUFFER_AVAILABLE) { ret = nouveau_xv_bo_realloc(pScrn, NOUVEAU_BO_GART, newTTSize, &pPriv->TT_mem_chunk[0]); if (ret == 0) { ret = nouveau_xv_bo_realloc(pScrn, NOUVEAU_BO_GART, newTTSize, &pPriv->TT_mem_chunk[1]); if (ret) { nouveau_bo_ref(NULL, &pPriv->TT_mem_chunk[0]); pPriv->currentHostBuffer = NO_PRIV_HOST_BUFFER_AVAILABLE; } } else { pPriv->currentHostBuffer = NO_PRIV_HOST_BUFFER_AVAILABLE; } } if (pPriv->currentHostBuffer != NO_PRIV_HOST_BUFFER_AVAILABLE) { destination_buffer = pPriv->TT_mem_chunk[pPriv->currentHostBuffer]; } if (!destination_buffer) { if (pNv->Architecture >= NV_TESLA) { NOUVEAU_ERR("No scratch buffer for tiled upload\n"); return BadAlloc; } goto CPU_copy; } if (newTTSize <= destination_buffer->size) { unsigned char *dst; /* Upload to GART */ nouveau_bo_map(destination_buffer, NOUVEAU_BO_WR, pNv->client); dst = destination_buffer->map; if (action_flags & IS_YV12) { if (action_flags & CONVERT_TO_YUY2) { NVCopyData420(buf + (top * srcPitch) + left, buf + s2offset, buf + s3offset, dst, srcPitch, srcPitch2, line_len, nlines, npixels); } else { /* Native YV12 */ unsigned char *tbuf = buf + top * srcPitch + left; unsigned char *tdst = dst; /* luma upload */ for (i = 0; i < nlines; i++) { memcpy(tdst, tbuf, line_len); tdst += line_len; tbuf += srcPitch; } dst += line_len * nlines; NVCopyNV12ColorPlanes(buf + s2offset, buf + s3offset, dst, line_len, srcPitch2, nlines, npixels); } } else { for (i = 0; i < nlines; i++) { memcpy(dst, buf, line_len); dst += line_len; buf += srcPitch; } } if (uv_offset) { NVAccelM2MF(pNv, line_len, nlines / 2, 1, line_len * nlines, uv_offset, destination_buffer, NOUVEAU_BO_GART, line_len, nlines >> 1, 0, 0, pPriv->video_mem, NOUVEAU_BO_VRAM, dstPitch, nlines >> 1, 0, 0); } NVAccelM2MF(pNv, line_len, nlines, 1, 0, 0, destination_buffer, NOUVEAU_BO_GART, line_len, nlines, 0, 0, pPriv->video_mem, NOUVEAU_BO_VRAM, dstPitch, nlines, 0, 0); } else { CPU_copy: nouveau_bo_map(pPriv->video_mem, NOUVEAU_BO_WR, pNv->client); map = pPriv->video_mem->map + offset; if (action_flags & IS_YV12) { if (action_flags & CONVERT_TO_YUY2) { NVCopyData420(buf + (top * srcPitch) + left, buf + s2offset, buf + s3offset, map, srcPitch, srcPitch2, dstPitch, nlines, npixels); } else { unsigned char *tbuf = buf + left + top * srcPitch; for (i = 0; i < nlines; i++) { int dwords = npixels << 1; while (dwords & ~0x03) { *map = *tbuf; *(map + 1) = *(tbuf + 1); *(map + 2) = *(tbuf + 2); *(map + 3) = *(tbuf + 3); map += 4; tbuf += 4; dwords -= 4; } switch (dwords) { case 3: *(map + 2) = *(tbuf + 2); case 2: *(map + 1) = *(tbuf + 1); case 1: *map = *tbuf; } map += dstPitch - (npixels << 1); tbuf += srcPitch - (npixels << 1); } NVCopyNV12ColorPlanes(buf + s2offset, buf + s3offset, map, dstPitch, srcPitch2, nlines, npixels); } } else { /* YUY2 and RGB */ for (i = 0; i < nlines; i++) { int dwords = npixels << 1; while (dwords & ~0x03) { *map = *buf; *(map + 1) = *(buf + 1); *(map + 2) = *(buf + 2); *(map + 3) = *(buf + 3); map += 4; buf += 4; dwords -= 4; } switch (dwords) { case 3: *(map + 2) = *(buf + 2); case 2: *(map + 1) = *(buf + 1); case 1: *map = *buf; } map += dstPitch - (npixels << 1); buf += srcPitch - (npixels << 1); } } } if (skip) return Success; if (pPriv->currentHostBuffer != NO_PRIV_HOST_BUFFER_AVAILABLE) pPriv->currentHostBuffer ^= 1; /* If we're not using the hw overlay, we're rendering into a pixmap * and need to take a couple of additional steps... */ if (!(action_flags & USE_OVERLAY)) { ppix = NVGetDrawablePixmap(pDraw); /* Ensure pixmap is in offscreen memory */ pNv->exa_force_cp = TRUE; exaMoveInPixmap(ppix); pNv->exa_force_cp = FALSE; if (!exaGetPixmapDriverPrivate(ppix)) return BadAlloc; #ifdef COMPOSITE /* Convert screen coords to pixmap coords */ if (ppix->screen_x || ppix->screen_y) { REGION_TRANSLATE(pScrn->pScreen, clipBoxes, -ppix->screen_x, -ppix->screen_y); dstBox.x1 -= ppix->screen_x; dstBox.x2 -= ppix->screen_x; dstBox.y1 -= ppix->screen_y; dstBox.y2 -= ppix->screen_y; } #endif } if (action_flags & USE_OVERLAY) { if (pNv->Architecture == NV_ARCH_04) { NV04PutOverlayImage(pScrn, pPriv->video_mem, offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes); } else { NV10PutOverlayImage(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes); } pPriv->currentBuffer ^= 1; } else if (action_flags & USE_TEXTURE) { ret = BadImplementation; if (pNv->Architecture == NV_ARCH_30) { ret = NV30PutTextureImage(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes, ppix, pPriv); } else if (pNv->Architecture == NV_ARCH_40) { ret = NV40PutTextureImage(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes, ppix, pPriv); } else if (pNv->Architecture == NV_TESLA) { ret = nv50_xv_image_put(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes, ppix, pPriv); } else { ret = nvc0_xv_image_put(pScrn, pPriv->video_mem, offset, uv_offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes, ppix, pPriv); } if (ret != Success) return ret; } else { ret = NVPutBlitImage(pScrn, pPriv->video_mem, offset, id, dstPitch, &dstBox, 0, 0, xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes, ppix); if (ret != Success) return ret; } #ifdef COMPOSITE /* Damage tracking */ if (!(action_flags & USE_OVERLAY)) DamageDamageRegion(&ppix->drawable, clipBoxes); #endif return Success; } /** * QueryImageAttributes * * calculates * - size (memory required to store image), * - pitches, * - offsets * of image * depending on colorspace (id) and dimensions (w,h) of image * values of * - w, * - h * may be adjusted as needed * * @param pScrn unused * @param id colorspace of image * @param w pointer to width of image * @param h pointer to height of image * @param pitches pitches[i] = length of a scanline in plane[i] * @param offsets offsets[i] = offset of plane i from the beginning of the image * @return size of the memory required for the XvImage queried */ static int NVQueryImageAttributes(ScrnInfoPtr pScrn, int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets) { int size, tmp; *w = (*w + 1) & ~1; // width rounded up to an even number if (offsets) offsets[0] = 0; switch (id) { case FOURCC_YV12: case FOURCC_I420: *h = (*h + 1) & ~1; // height rounded up to an even number size = (*w + 3) & ~3; // width rounded up to a multiple of 4 if (pitches) pitches[0] = size; // width rounded up to a multiple of 4 size *= *h; if (offsets) offsets[1] = size; // number of pixels in "rounded up" image tmp = ((*w >> 1) + 3) & ~3; // width/2 rounded up to a multiple of 4 if (pitches) pitches[1] = pitches[2] = tmp; // width/2 rounded up to a multiple of 4 tmp *= (*h >> 1); // 1/4*number of pixels in "rounded up" image size += tmp; // 5/4*number of pixels in "rounded up" image if (offsets) offsets[2] = size; // 5/4*number of pixels in "rounded up" image size += tmp; // = 3/2*number of pixels in "rounded up" image break; case FOURCC_UYVY: case FOURCC_YUY2: size = *w << 1; // 2*width if (pitches) pitches[0] = size; // 2*width size *= *h; // 2*width*height break; case FOURCC_RGB: size = *w << 2; // 4*width (32 bit per pixel) if (pitches) pitches[0] = size; // 4*width size *= *h; // 4*width*height break; case FOURCC_AI44: case FOURCC_IA44: size = *w; // width if (pitches) pitches[0] = size; // width size *= *h; // width*height break; default: xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown colorspace: %x\n", id); *w = *h = size = 0; break; } return size; } /***** Exported offscreen surface stuff ****/ static int NVAllocSurface(ScrnInfoPtr pScrn, int id, unsigned short w, unsigned short h, XF86SurfacePtr surface) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); int size, bpp, ret; bpp = pScrn->bitsPerPixel >> 3; if (pPriv->grabbedByV4L) return BadAlloc; if ((w > IMAGE_MAX_W) || (h > IMAGE_MAX_H)) return BadValue; w = (w + 1) & ~1; pPriv->pitch = ((w << 1) + 63) & ~63; size = h * pPriv->pitch / bpp; ret = nouveau_xv_bo_realloc(pScrn, NOUVEAU_BO_VRAM, size, &pPriv->video_mem); if (ret) return BadAlloc; pPriv->offset = 0; surface->width = w; surface->height = h; surface->pScrn = pScrn; surface->pitches = &pPriv->pitch; surface->offsets = &pPriv->offset; surface->devPrivate.ptr = (pointer)pPriv; surface->id = id; /* grab the video */ NVStopOverlay(pScrn); pPriv->videoStatus = 0; REGION_EMPTY(pScrn->pScreen, &pPriv->clip); pPriv->grabbedByV4L = TRUE; return Success; } static int NVStopSurface(XF86SurfacePtr surface) { NVPortPrivPtr pPriv = (NVPortPrivPtr)(surface->devPrivate.ptr); if (pPriv->grabbedByV4L && pPriv->videoStatus) { NV10StopOverlay(surface->pScrn); pPriv->videoStatus = 0; } return Success; } static int NVFreeSurface(XF86SurfacePtr surface) { NVPortPrivPtr pPriv = (NVPortPrivPtr)(surface->devPrivate.ptr); if (pPriv->grabbedByV4L) { NVStopSurface(surface); NVFreeOverlayMemory(surface->pScrn); pPriv->grabbedByV4L = FALSE; } return Success; } static int NVGetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); return NV10GetOverlayPortAttribute(pScrn, attribute, value, (pointer)pPriv); } static int NVSetSurfaceAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value) { NVPtr pNv = NVPTR(pScrn); NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(pNv); return NV10SetOverlayPortAttribute(pScrn, attribute, value, (pointer)pPriv); } static int NVDisplaySurface(XF86SurfacePtr surface, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes) { ScrnInfoPtr pScrn = surface->pScrn; NVPortPrivPtr pPriv = (NVPortPrivPtr)(surface->devPrivate.ptr); INT32 xa, xb, ya, yb; BoxRec dstBox; if (!pPriv->grabbedByV4L) return Success; if (src_w > (drw_w << 3)) drw_w = src_w >> 3; if (src_h > (drw_h << 3)) drw_h = src_h >> 3; /* Clip */ xa = src_x; xb = src_x + src_w; ya = src_y; yb = src_y + src_h; dstBox.x1 = drw_x; dstBox.x2 = drw_x + drw_w; dstBox.y1 = drw_y; dstBox.y2 = drw_y + drw_h; if(!xf86XVClipVideoHelper(&dstBox, &xa, &xb, &ya, &yb, clipBoxes, surface->width, surface->height)) return Success; dstBox.x1 -= pScrn->frameX0; dstBox.x2 -= pScrn->frameX0; dstBox.y1 -= pScrn->frameY0; dstBox.y2 -= pScrn->frameY0; pPriv->currentBuffer = 0; NV10PutOverlayImage(pScrn, pPriv->video_mem, surface->offsets[0], 0, surface->id, surface->pitches[0], &dstBox, xa, ya, xb, yb, surface->width, surface->height, src_w, src_h, drw_w, drw_h, clipBoxes); return Success; } /** * NVSetupBlitVideo * this function does all the work setting up a blit port * * @return blit port */ static XF86VideoAdaptorPtr NVSetupBlitVideo (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr adapt; NVPortPrivPtr pPriv; int i; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(NVPortPrivRec) + (sizeof(DevUnion) * NUM_BLIT_PORTS)))) { return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; adapt->name = "NV Video Blitter"; adapt->nEncodings = 1; adapt->pEncodings = &DummyEncoding; adapt->nFormats = NUM_FORMATS_ALL; adapt->pFormats = NVFormats; adapt->nPorts = NUM_BLIT_PORTS; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_BLIT_PORTS]); for(i = 0; i < NUM_BLIT_PORTS; i++) adapt->pPortPrivates[i].ptr = (pointer)(pPriv); if (pNv->dev->chipset >= 0x11) { adapt->pAttributes = NVBlitAttributes; adapt->nAttributes = NUM_BLIT_ATTRIBUTES; } else { adapt->pAttributes = NULL; adapt->nAttributes = 0; } adapt->pImages = NVImages; adapt->nImages = NUM_IMAGES_ALL; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = NVStopBlitVideo; adapt->SetPortAttribute = NVSetBlitPortAttribute; adapt->GetPortAttribute = NVGetBlitPortAttribute; adapt->QueryBestSize = NVQueryBestSize; adapt->PutImage = NVPutImage; adapt->QueryImageAttributes = NVQueryImageAttributes; pPriv->videoStatus = 0; pPriv->grabbedByV4L = FALSE; pPriv->blitter = TRUE; pPriv->texture = FALSE; pPriv->bicubic = FALSE; pPriv->doubleBuffer = FALSE; pPriv->SyncToVBlank = (pNv->dev->chipset >= 0x11); pPriv->max_image_dim = 2048; pNv->blitAdaptor = adapt; return adapt; } /** * NVSetupOverlayVideo * this function does all the work setting up an overlay port * * @return overlay port */ static XF86VideoAdaptorPtr NVSetupOverlayVideoAdapter(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr adapt; NVPortPrivPtr pPriv; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(NVPortPrivRec) + sizeof(DevUnion)))) { return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = VIDEO_OVERLAID_IMAGES; adapt->name = "NV Video Overlay"; adapt->nEncodings = 1; adapt->pEncodings = &DummyEncoding; adapt->nFormats = NUM_FORMATS_ALL; adapt->pFormats = NVFormats; adapt->nPorts = 1; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[1]); adapt->pPortPrivates[0].ptr = (pointer)(pPriv); adapt->pAttributes = (pNv->Architecture != NV_ARCH_04) ? NV10OverlayAttributes : NV04OverlayAttributes; adapt->nAttributes = (pNv->Architecture != NV_ARCH_04) ? NUM_NV10_OVERLAY_ATTRIBUTES : NUM_NV04_OVERLAY_ATTRIBUTES; adapt->pImages = NVImages; adapt->nImages = NUM_IMAGES_YUV; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = NVStopOverlayVideo; adapt->SetPortAttribute = (pNv->Architecture != NV_ARCH_04) ? NV10SetOverlayPortAttribute : NV04SetOverlayPortAttribute; adapt->GetPortAttribute = (pNv->Architecture != NV_ARCH_04) ? NV10GetOverlayPortAttribute : NV04GetOverlayPortAttribute; adapt->QueryBestSize = NVQueryBestSize; adapt->PutImage = NVPutImage; adapt->QueryImageAttributes = NVQueryImageAttributes; pPriv->videoStatus = 0; pPriv->currentBuffer = 0; pPriv->grabbedByV4L = FALSE; pPriv->blitter = FALSE; pPriv->texture = FALSE; pPriv->bicubic = FALSE; pPriv->max_image_dim = 2048; NVSetPortDefaults (pScrn, pPriv); /* gotta uninit this someplace */ REGION_NULL(pScreen, &pPriv->clip); pNv->overlayAdaptor = adapt; xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); xvColorKey = MAKE_ATOM("XV_COLORKEY"); xvAutopaintColorKey = MAKE_ATOM("XV_AUTOPAINT_COLORKEY"); xvSetDefaults = MAKE_ATOM("XV_SET_DEFAULTS"); if ( pNv->Architecture != NV_ARCH_04 ) { xvDoubleBuffer = MAKE_ATOM("XV_DOUBLE_BUFFER"); xvContrast = MAKE_ATOM("XV_CONTRAST"); xvSaturation = MAKE_ATOM("XV_SATURATION"); xvHue = MAKE_ATOM("XV_HUE"); xvITURBT709 = MAKE_ATOM("XV_ITURBT_709"); xvOnCRTCNb = MAKE_ATOM("XV_ON_CRTC_NB"); NV10WriteOverlayParameters(pScrn); } return adapt; } XF86OffscreenImageRec NVOffscreenImages[2] = { { &NVImages[0], VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT, NVAllocSurface, NVFreeSurface, NVDisplaySurface, NVStopSurface, NVGetSurfaceAttribute, NVSetSurfaceAttribute, IMAGE_MAX_W, IMAGE_MAX_H, NUM_NV10_OVERLAY_ATTRIBUTES - 1, &NV10OverlayAttributes[1] }, { &NVImages[2], VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT, NVAllocSurface, NVFreeSurface, NVDisplaySurface, NVStopSurface, NVGetSurfaceAttribute, NVSetSurfaceAttribute, IMAGE_MAX_W, IMAGE_MAX_H, NUM_NV10_OVERLAY_ATTRIBUTES - 1, &NV10OverlayAttributes[1] } }; static void NVInitOffscreenImages (ScreenPtr pScreen) { xf86XVRegisterOffscreenImages(pScreen, NVOffscreenImages, 2); } /** * NVChipsetHasOverlay * * newer chips don't support overlay anymore. * overlay feature is emulated via textures. * * @param pNv * @return true, if chipset supports overlay */ static Bool NVChipsetHasOverlay(NVPtr pNv) { switch (pNv->Architecture) { case NV_ARCH_04: /*NV04 has a different overlay than NV10+*/ case NV_ARCH_10: case NV_ARCH_20: case NV_ARCH_30: return TRUE; case NV_ARCH_40: if (pNv->dev->chipset == 0x40) return TRUE; break; default: break; } return FALSE; } /** * NVSetupOverlayVideo * check if chipset supports Overla * if so, setup overlay port * * @return overlay port * @see NVChipsetHasOverlay(NVPtr pNv) * @see NV10SetupOverlayVideo(ScreenPtr pScreen) * @see NVInitOffscreenImages(ScreenPtr pScreen) */ static XF86VideoAdaptorPtr NVSetupOverlayVideo(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr overlayAdaptor = NULL; NVPtr pNv = NVPTR(pScrn); if (1 /*pNv->kms_enable*/ || !NVChipsetHasOverlay(pNv)) return NULL; overlayAdaptor = NVSetupOverlayVideoAdapter(pScreen); /* I am not sure what this call does. */ if (overlayAdaptor && pNv->Architecture != NV_ARCH_04 ) NVInitOffscreenImages(pScreen); #ifdef COMPOSITE if (!noCompositeExtension) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv: Composite is enabled, enabling overlay with " "smart blitter fallback\n"); overlayAdaptor->name = "NV Video Overlay with Composite"; } #endif return overlayAdaptor; } /** * NV30 texture adapter. */ #define NUM_FORMAT_TEXTURED 2 static XF86ImageRec NV30TexturedImages[NUM_FORMAT_TEXTURED] = { XVIMAGE_YV12, XVIMAGE_I420, }; /** * NV30SetupTexturedVideo * this function does all the work setting up textured video port * * @return texture port */ static XF86VideoAdaptorPtr NV30SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr adapt; NVPortPrivPtr pPriv; int i; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(NVPortPrivRec) + (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) { return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; if (bicubic) adapt->name = "NV30 high quality adapter"; else adapt->name = "NV30 texture adapter"; adapt->nEncodings = 1; adapt->pEncodings = &DummyEncodingTex; adapt->nFormats = NUM_FORMATS_ALL; adapt->pFormats = NVFormats; adapt->nPorts = NUM_TEXTURE_PORTS; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) adapt->pPortPrivates[i].ptr = (pointer)(pPriv); adapt->pAttributes = NVTexturedAttributes; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES; adapt->pImages = NV30TexturedImages; adapt->nImages = NUM_FORMAT_TEXTURED; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = NV30StopTexturedVideo; adapt->SetPortAttribute = NV30SetTexturePortAttribute; adapt->GetPortAttribute = NV30GetTexturePortAttribute; adapt->QueryBestSize = NVQueryBestSize; adapt->PutImage = NVPutImage; adapt->QueryImageAttributes = NVQueryImageAttributes; pPriv->videoStatus = 0; pPriv->grabbedByV4L = FALSE; pPriv->blitter = FALSE; pPriv->texture = TRUE; pPriv->bicubic = bicubic; pPriv->doubleBuffer = FALSE; pPriv->SyncToVBlank = TRUE; pPriv->max_image_dim = 4096; if (bicubic) pNv->textureAdaptor[1] = adapt; else pNv->textureAdaptor[0] = adapt; return adapt; } /** * NV40 texture adapter. */ #define NUM_FORMAT_TEXTURED 2 static XF86ImageRec NV40TexturedImages[NUM_FORMAT_TEXTURED] = { XVIMAGE_YV12, XVIMAGE_I420, }; /** * NV40SetupTexturedVideo * this function does all the work setting up textured video port * * @return texture port */ static XF86VideoAdaptorPtr NV40SetupTexturedVideo (ScreenPtr pScreen, Bool bicubic) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr adapt; NVPortPrivPtr pPriv; int i; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(NVPortPrivRec) + (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) { return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; if (bicubic) adapt->name = "NV40 high quality adapter"; else adapt->name = "NV40 texture adapter"; adapt->nEncodings = 1; adapt->pEncodings = &DummyEncodingTex; adapt->nFormats = NUM_FORMATS_ALL; adapt->pFormats = NVFormats; adapt->nPorts = NUM_TEXTURE_PORTS; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) adapt->pPortPrivates[i].ptr = (pointer)(pPriv); adapt->pAttributes = NVTexturedAttributes; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES; adapt->pImages = NV40TexturedImages; adapt->nImages = NUM_FORMAT_TEXTURED; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = NV40StopTexturedVideo; adapt->SetPortAttribute = NV40SetTexturePortAttribute; adapt->GetPortAttribute = NV40GetTexturePortAttribute; adapt->QueryBestSize = NVQueryBestSize; adapt->PutImage = NVPutImage; adapt->QueryImageAttributes = NVQueryImageAttributes; pPriv->videoStatus = 0; pPriv->grabbedByV4L = FALSE; pPriv->blitter = FALSE; pPriv->texture = TRUE; pPriv->bicubic = bicubic; pPriv->doubleBuffer = FALSE; pPriv->SyncToVBlank = TRUE; pPriv->max_image_dim = 4096; if (bicubic) pNv->textureAdaptor[1] = adapt; else pNv->textureAdaptor[0] = adapt; return adapt; } static XF86ImageRec NV50TexturedImages[] = { XVIMAGE_YV12, XVIMAGE_I420, XVIMAGE_YUY2, XVIMAGE_UYVY }; static XF86VideoAdaptorPtr NV50SetupTexturedVideo (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr adapt; NVPortPrivPtr pPriv; int i; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + sizeof(NVPortPrivRec) + (sizeof(DevUnion) * NUM_TEXTURE_PORTS)))) { return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; adapt->name = "Nouveau GeForce 8/9 Textured Video"; adapt->nEncodings = 1; adapt->pEncodings = &DummyEncodingNV50; adapt->nFormats = NUM_FORMATS_NV50; adapt->pFormats = NV50Formats; adapt->nPorts = NUM_TEXTURE_PORTS; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPriv = (NVPortPrivPtr)(&adapt->pPortPrivates[NUM_TEXTURE_PORTS]); for(i = 0; i < NUM_TEXTURE_PORTS; i++) adapt->pPortPrivates[i].ptr = (pointer)(pPriv); adapt->pAttributes = NVTexturedAttributesNV50; adapt->nAttributes = NUM_TEXTURED_ATTRIBUTES_NV50; adapt->pImages = NV50TexturedImages; adapt->nImages = sizeof(NV50TexturedImages) / sizeof(NV50TexturedImages[0]); adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = nv50_xv_video_stop; adapt->SetPortAttribute = nv50_xv_port_attribute_set; adapt->GetPortAttribute = nv50_xv_port_attribute_get; adapt->QueryBestSize = NVQueryBestSize; adapt->PutImage = NVPutImage; adapt->QueryImageAttributes = NVQueryImageAttributes; pNv->textureAdaptor[0] = adapt; nv50_xv_set_port_defaults(pScrn, pPriv); nv50_xv_csc_update(pScrn, pPriv); xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); xvContrast = MAKE_ATOM("XV_CONTRAST"); xvSaturation = MAKE_ATOM("XV_SATURATION"); xvHue = MAKE_ATOM("XV_HUE"); xvITURBT709 = MAKE_ATOM("XV_ITURBT_709"); return adapt; } static void NVSetupTexturedVideo (ScreenPtr pScreen, XF86VideoAdaptorPtr *textureAdaptor) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); if (!pNv->Nv3D) return; if (pNv->Architecture == NV_ARCH_30) { textureAdaptor[0] = NV30SetupTexturedVideo(pScreen, FALSE); textureAdaptor[1] = NV30SetupTexturedVideo(pScreen, TRUE); } else if (pNv->Architecture == NV_ARCH_40) { textureAdaptor[0] = NV40SetupTexturedVideo(pScreen, FALSE); textureAdaptor[1] = NV40SetupTexturedVideo(pScreen, TRUE); } else if (pNv->Architecture >= NV_TESLA) { textureAdaptor[0] = NV50SetupTexturedVideo(pScreen); } } /** * NVInitVideo * tries to initialize the various supported adapters * and add them to the list of ports on screen "pScreen". * * @param pScreen * @see NVSetupOverlayVideo(ScreenPtr pScreen) * @see NVSetupBlitVideo(ScreenPtr pScreen) */ void NVInitVideo(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); NVPtr pNv = NVPTR(pScrn); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr overlayAdaptor = NULL; XF86VideoAdaptorPtr blitAdaptor = NULL; XF86VideoAdaptorPtr textureAdaptor[2] = {NULL, NULL}; int num_adaptors; /* * Driving the blitter requires the DMA FIFO. Using the FIFO * without accel causes DMA errors. While the overlay might * might work without accel, we also disable it for now when * acceleration is disabled: */ if (pScrn->bitsPerPixel != 8 && pNv->AccelMethod == EXA) { xvSyncToVBlank = MAKE_ATOM("XV_SYNC_TO_VBLANK"); if (pNv->Architecture < NV_TESLA) { overlayAdaptor = NVSetupOverlayVideo(pScreen); blitAdaptor = NVSetupBlitVideo(pScreen); } NVSetupTexturedVideo(pScreen, textureAdaptor); } num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); if (blitAdaptor || overlayAdaptor || textureAdaptor[0]) { int size = num_adaptors; if(overlayAdaptor) size++; if(blitAdaptor) size++; if(textureAdaptor[0]) size++; if(textureAdaptor[1]) size++; newAdaptors = malloc(size * sizeof(XF86VideoAdaptorPtr *)); if(newAdaptors) { if(num_adaptors) { memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); } if(overlayAdaptor) { newAdaptors[num_adaptors] = overlayAdaptor; num_adaptors++; } if (textureAdaptor[0]) { /* bilinear */ newAdaptors[num_adaptors] = textureAdaptor[0]; num_adaptors++; } if (textureAdaptor[1]) { /* bicubic */ newAdaptors[num_adaptors] = textureAdaptor[1]; num_adaptors++; } if(blitAdaptor) { newAdaptors[num_adaptors] = blitAdaptor; num_adaptors++; } adaptors = newAdaptors; } } if (num_adaptors) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if (newAdaptors) free(newAdaptors); /* * For now we associate with the plain texture adapter since it is logical, but we can * associate with any/all adapters since VL doesn't depend on Xv for color conversion. */ if (textureAdaptor[0]) { XF86MCAdaptorPtr *adaptorsXvMC = malloc(sizeof(XF86MCAdaptorPtr)); if (adaptorsXvMC) { adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, (char *)textureAdaptor[0]->name); if (adaptorsXvMC[0]) { vlInitXvMC(pScreen, 1, adaptorsXvMC); vlDestroyAdaptorXvMC(adaptorsXvMC[0]); } free(adaptorsXvMC); } } } void NVTakedownVideo(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); if (pNv->blitAdaptor) NVFreePortMemory(pScrn, GET_BLIT_PRIVATE(pNv)); if (pNv->textureAdaptor[0]) { NVFreePortMemory(pScrn, pNv->textureAdaptor[0]->pPortPrivates[0].ptr); } if (pNv->textureAdaptor[1]) { NVFreePortMemory(pScrn, pNv->textureAdaptor[1]->pPortPrivates[0].ptr); } } /* The filtering function used for video scaling. We use a cubic filter as * defined in "Reconstruction Filters in Computer Graphics" Mitchell & * Netravali in SIGGRAPH '88 */ static float filter_func(float x) { const double B=0.75; const double C=(1.0-B)/2.0; double x1=fabs(x); double x2=fabs(x)*x1; double x3=fabs(x)*x2; if (fabs(x)<1.0) return ( (12.0-9.0*B-6.0*C)*x3+(-18.0+12.0*B+6.0*C)*x2+(6.0-2.0*B) )/6.0; else return ( (-B-6.0*C)*x3+(6.0*B+30.0*C)*x2+(-12.0*B-48.0*C)*x1+(8.0*B+24.0*C) )/6.0; } static int8_t f32tosb8(float v) { return (int8_t)(v*127.0); } void NVXVComputeBicubicFilter(struct nouveau_bo *bo, unsigned offset, unsigned size) { int8_t *t = (int8_t *)(bo->map + offset); int i; for(i = 0; i < size; i++) { float x = (i + 0.5) / size; float w0 = filter_func(x+1.0); float w1 = filter_func(x); float w2 = filter_func(x-1.0); float w3 = filter_func(x-2.0); t[4*i+2]=f32tosb8(1.0+x-w1/(w0+w1)); t[4*i+1]=f32tosb8(1.0-x+w3/(w2+w3)); t[4*i+0]=f32tosb8(w0+w1); t[4*i+3]=f32tosb8(0.0); } } xf86-video-nouveau-1.0.18/src/nouveau_copy85b5.c0000644000175000017500000000661414713424663014735 /* * Copyright 2014 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 the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 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 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 NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Ben Skeggs */ #include "nouveau_copy.h" #include "hwdefs/nv_object.xml.h" #include "nv50_accel.h" static Bool nouveau_copy85b5_rect(struct nouveau_pushbuf *push, struct nouveau_object *copy, int w, int h, int cpp, struct nouveau_bo *src, uint32_t src_off, int src_dom, int src_pitch, int src_h, int src_x, int src_y, struct nouveau_bo *dst, uint32_t dst_off, int dst_dom, int dst_pitch, int dst_h, int dst_x, int dst_y) { struct nouveau_pushbuf_refn refs[] = { { src, src_dom | NOUVEAU_BO_RD }, { dst, dst_dom | NOUVEAU_BO_WR }, }; unsigned exec; if (nouveau_pushbuf_space(push, 64, 0, 0) || nouveau_pushbuf_refn (push, refs, 2)) return FALSE; exec = 0x00000000; if (!src->config.nv50.memtype) { src_off += src_y * src_pitch + src_x * cpp; exec |= 0x00000010; } if (!dst->config.nv50.memtype) { dst_off += dst_y * dst_pitch + dst_x * cpp; exec |= 0x00000100; } BEGIN_NV04(push, SUBC_COPY(0x0200), 7); PUSH_DATA (push, src->config.nv50.tile_mode); PUSH_DATA (push, src_pitch); PUSH_DATA (push, src_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, src_x * cpp); PUSH_DATA (push, src_y); BEGIN_NV04(push, SUBC_COPY(0x0220), 7); PUSH_DATA (push, dst->config.nv50.tile_mode); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, dst_h); PUSH_DATA (push, 1); PUSH_DATA (push, 0); PUSH_DATA (push, dst_x * cpp); PUSH_DATA (push, dst_y); BEGIN_NV04(push, SUBC_COPY(0x030c), 8); PUSH_DATA (push, (src->offset + src_off) >> 32); PUSH_DATA (push, (src->offset + src_off)); PUSH_DATA (push, (dst->offset + dst_off) >> 32); PUSH_DATA (push, (dst->offset + dst_off)); PUSH_DATA (push, src_pitch); PUSH_DATA (push, dst_pitch); PUSH_DATA (push, w * cpp); PUSH_DATA (push, h); BEGIN_NV04(push, SUBC_COPY(0x0300), 1); PUSH_DATA (push, exec); return TRUE; } Bool nouveau_copy85b5_init(NVPtr pNv) { struct nouveau_pushbuf *push = pNv->ce_pushbuf; struct nv04_fifo *fifo = pNv->ce_channel->data; if (PUSH_SPACE(push, 8)) { BEGIN_NV04(push, NV01_SUBC(COPY, OBJECT), 1); PUSH_DATA (push, pNv->NvCopy->handle); BEGIN_NV04(push, SUBC_COPY(0x0180), 3); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); PUSH_DATA (push, fifo->vram); pNv->ce_rect = nouveau_copy85b5_rect; return TRUE; } return FALSE; } xf86-video-nouveau-1.0.18/m4/0000755000175000017500000000000014713424676011257 5xf86-video-nouveau-1.0.18/m4/lt~obsolete.m40000644000175000017500000001400714713424666014014 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) xf86-video-nouveau-1.0.18/m4/libtool.m40000644000175000017500000113047614713424666013120 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 59 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} _LT_DECL([], [AR], [1], [The archiver]) # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -z "$STRIP"; then AC_MSG_RESULT([no]) else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_FILECMD # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], [AC_CHECK_TOOL([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS xf86-video-nouveau-1.0.18/m4/ltoptions.m40000644000175000017500000003427514713424666013506 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) xf86-video-nouveau-1.0.18/m4/ltversion.m40000644000175000017500000000131214713424666013462 # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, # Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4245 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.7]) m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.7' macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) xf86-video-nouveau-1.0.18/m4/ltsugar.m40000644000175000017500000001045314713424666013124 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) xf86-video-nouveau-1.0.18/compile0000755000175000017500000001635014713424671012235 #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: xf86-video-nouveau-1.0.18/configure.ac0000644000175000017500000001232314713424663013142 # Copyright 2005 Adam Jackson. # # 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 # ADAM JACKSON 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. # # Process this file with autoconf to produce a configure script # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], [1.0.18], [https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues/], [xf86-video-nouveau]) AC_DEFINE_UNQUOTED([NV_DRIVER_DATE], [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")], [Driver date]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR(.) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-xz]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen Hint: either install from source, https://gitlab.freedesktop.org/xorg/util/macros.git or, depending on you distribution, try package 'xutils-dev' or 'xorg-x11-util-macros'])]) XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Require X.Org server macros (i.e. XORG_DRIVER_CHECK_EXT) to check for required modules m4_ifndef([XORG_DRIVER_CHECK_EXT], [m4_fatal([must install xorg-server macros before running autoconf/autogen Hint: either install from source, https://gitlab.freedesktop.org/xorg/xserver.git or, depending on your distribution, try package 'xserver-xorg-dev' or 'xorg-x11-server-devel'])]) # Initialize libtool LT_INIT([disable-static]) AH_TOP([#include "xorg-server.h"]) # Define a configure option for an alternate module directory AC_ARG_WITH(xorg-module-dir, AS_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) # Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) XORG_DRIVER_CHECK_EXT(DRI2, [dri2proto >= 2.6]) # Checks for libraries PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.60]) PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25]) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18] xproto fontsproto $REQUIRED_MODULES) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10]) PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no]) if test "x$LIBUDEV" = xyes; then AC_DEFINE(HAVE_LIBUDEV, 1, [libudev support]) fi AM_CONDITIONAL(LIBUDEV, [ test "x$LIBUDEV" = "xyes" ] ) # Use -Wall all the time CFLAGS="$CFLAGS -Wall" # Check for -minline-all-stringops availability OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -minline-all-stringops" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ ]])], [ CFLAGS="$OLD_CFLAGS -minline-all-stringops"],[CFLAGS="$OLD_CFLAGS"]) # needed for the next test CFLAGS="$CFLAGS $XORG_CFLAGS" AC_SUBST([CFLAGS]) AC_SUBST([moduledir]) DRIVER_NAME=nouveau AC_SUBST([DRIVER_NAME]) AC_CHECK_DECL(xf86CursorResetCursor, [AC_DEFINE(HAVE_XF86_CURSOR_RESET_CURSOR, 1, [Have xf86CursorResetCursor API])], [], [#include #include ]) AC_CONFIG_FILES([ Makefile src/Makefile man/Makefile ]) AC_OUTPUT dnl dnl Output some configuration info for the user dnl echo "" echo " prefix: $prefix" echo " exec_prefix: $exec_prefix" echo " libdir: $libdir" echo " includedir: $includedir" echo "" echo " CFLAGS: $CFLAGS" echo " CXXFLAGS: $CXXFLAGS" echo " Macros: $DEFINES" echo "" echo " Run '${MAKE-make}' to build xf86-video-nouveau" echo "" xf86-video-nouveau-1.0.18/Makefile.in0000644000175000017500000006716214713424671012733 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # # 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 # ADAM JACKSON 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. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in COPYING \ ChangeLog INSTALL compile config.guess config.sub install-sh \ ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBDRM_NOUVEAU_CFLAGS = @LIBDRM_NOUVEAU_CFLAGS@ LIBDRM_NOUVEAU_LIBS = @LIBDRM_NOUVEAU_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ LIBUDEV_LIBS = @LIBUDEV_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = ChangeLog INSTALL all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-video-nouveau-1.0.18/ltmain.sh0000644000175000017500000121316514713424666012507 #! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.7 package_revision=2.4.7 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # , and GPL version 2 or later # . You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '_result', escaped # suitably for 'eval'. # # The '_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_arg pretty "$arg" func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. -pthread) case $host in *solaris2*) ;; *) case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac ;; esac continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac # As we are forced to pass -nostdlib to g++ during linking, the option # -pthread{,s} is not in effect; add the -lpthread to $deplist # explicitly to link correctly. if test "$tagname" = CXX -a x"$with_gcc" = xyes; then case "$arg" in -pthread*) func_append deplibs " -lpthread" ;; esac fi continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $func_quote_arg_result" func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" func_append compiler_flags " $wl$func_quote_arg_result" func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xassembler) prev=xassembler continue ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -Wa,* Pass flags directly to the assembler # -Werror, -Werror=* Report (specified) warnings as errors -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-Werror|-Werror=*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_arg pretty "$arg" arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty "$var_value" relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done func_quote eval cd "`pwd`" func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty,unquoted "$var_value" relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. func_quote eval cd "`pwd`" relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: xf86-video-nouveau-1.0.18/COPYING0000644000175000017500000000071214713424663011706 This is a stub file. This package has not yet had its complete licensing information compiled. Please see the individual source files for details on your rights to use and modify this software. Please submit updated COPYING files to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg All licensing questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg xf86-video-nouveau-1.0.18/config.guess0000755000175000017500000014306714713424671013205 #! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2024-07-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still # use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #if defined(__ANDROID__) LIBC=android #else #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #elif defined(__LLVM_LIBC__) LIBC=llvm #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __ARM_EABI__ #ifdef __ARM_PCS_VFP ABI=eabihf #else ABI=eabi #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:cos:*:*) GUESS=$UNAME_MACHINE-unknown-cos ;; kvx:mbr:*:*) GUESS=$UNAME_MACHINE-unknown-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; *:Ironclad:*:*) GUESS=$UNAME_MACHINE-unknown-ironclad ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif int main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xf86-video-nouveau-1.0.18/config.sub0000755000175000017500000011544114713424671012643 #! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268,SC2162 # see below for rationale timestamp='2024-05-27' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in cloudabi*-eabi* \ | kfreebsd*-gnu* \ | knetbsd*-gnu* \ | kopensolaris*-gnu* \ | linux-* \ | managarm-* \ | netbsd*-eabi* \ | netbsd*-gnu* \ | nto-qnx* \ | os2-emx* \ | rtmk-nova* \ | storm-chaos* \ | uclinux-gnu* \ | uclinux-uclibc* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) case $field1-$field2 in # Shorthands that happen to contain a single dash convex-c[12] | convex-c3[248]) basic_machine=$field2-convex basic_os= ;; decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Do not treat sunos as a manufacturer sun*os*) basic_machine=$field1 basic_os=$field2 ;; # Manufacturers 3100* \ | 32* \ | 3300* \ | 3600* \ | 7300* \ | acorn \ | altos* \ | apollo \ | apple \ | atari \ | att* \ | axis \ | be \ | bull \ | cbm \ | ccur \ | cisco \ | commodore \ | convergent* \ | convex* \ | cray \ | crds \ | dec* \ | delta* \ | dg \ | digital \ | dolphin \ | encore* \ | gould \ | harris \ | highlevel \ | hitachi* \ | hp \ | ibm* \ | intergraph \ | isi* \ | knuth \ | masscomp \ | microblaze* \ | mips* \ | motorola* \ | ncr* \ | news \ | next \ | ns \ | oki \ | omron* \ | pc533* \ | rebel \ | rom68k \ | rombug \ | semi \ | sequent* \ | siemens \ | sgi* \ | siemens \ | sim \ | sni \ | sony* \ | stratus \ | sun \ | sun[234]* \ | tektronix \ | tti* \ | ultra \ | unicom* \ | wec \ | winbond \ | wrs) basic_machine=$field1-$field2 basic_os= ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | delta-motorola | 3300-motorola | motorola-delta | motorola-3300) cpu=m68k vendor=motorola ;; # This used to be dpx2*, but that gets the RS6000-based # DPX/20 and the x86-based DPX/2-100 wrong. See # https://oldskool.silicium.org/stations/bull_dpx20.htm # https://www.feb-patrimoine.com/english/bull_dpx2.htm # https://www.feb-patrimoine.com/english/unix_and_bull.htm dpx2 | dpx2[23]00 | dpx2[23]xx) cpu=m68k vendor=bull ;; dpx2100 | dpx21xx) cpu=i386 vendor=bull ;; dpx20) cpu=rs6000 vendor=bull ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. obj= case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) saved_IFS=$IFS IFS="-" read kernel os <&2 fi ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac case $obj in aout* | coff* | elf* | pe*) ;; '') # empty is fine ;; *) echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 exit 1 ;; esac # Here we handle the constraint that a (synthetic) cpu and os are # valid only in combination with each other and nowhere else. case $cpu-$os in # The "javascript-unknown-ghcjs" triple is used by GHC; we # accept it here in order to tolerate that, but reject any # variations. javascript-ghcjs) ;; javascript-* | *-ghcjs) echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ | linux-relibc*- | linux-uclibc*- | linux-ohos*- ) ;; uclinux-uclibc*- | uclinux-gnu*- ) ;; managarm-mlibc*- | managarm-kernel*- ) ;; windows*-msvc*-) ;; -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu*- | knetbsd*-gnu*- | netbsd*-gnu*- | kopensolaris*-gnu*-) ;; vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; nto-qnx*-) ;; os2-emx-) ;; rtmk-nova-) ;; *-eabi*- | *-gnueabi*-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an machine code file format ;; -*-) # Blank kernel with real OS is always fine. ;; --*) # Blank kernel and OS with real machine code file format is always fine. ;; *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos* | *-solaris*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xf86-video-nouveau-1.0.18/man/0000755000175000017500000000000014713424677011513 5xf86-video-nouveau-1.0.18/man/nouveau.man0000644000175000017500000001372714713424663013617 .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH NOUVEAU __drivermansuffix__ __vendorversion__ .SH NAME nouveau \- NVIDIA video driver .SH SYNOPSIS .nf .B "Section \*qDevice\*q" .BI " Identifier \*q" devname \*q .B " Driver \*qnouveau\*q" \ \ ... .B EndSection .fi .SH DESCRIPTION .B nouveau is an __xservername__ driver for NVIDIA video cards. The driver supports 2D acceleration and provides support for the following framebuffer depths: (15,) 16 and 24. TrueColor visuals are supported for these depths. .SH SUPPORTED HARDWARE The .B nouveau driver supports PCI, PCI-Express and AGP video cards based on the following NVIDIA chips: .TP 22 .B RIVA TNT NV4 .TP 22 .B RIVA TNT2 NV5 .TP 22 .B GeForce 256, QUADRO NV10 .TP 22 .B GeForce2, QUADRO2 NV11 & NV15 .TP 22 .B GeForce3, QUADRO DCC NV20 .TP 22 .B nForce, nForce2 NV1A, NV1F .TP 22 .B GeForce4, QUADRO4 NV17, NV18, NV25, NV28 .TP 22 .B GeForce FX, QUADRO FX NV30, NV31, NV34, NV35, NV36, NV37, NV38 .TP 22 .B GeForce 6XXX NV40, NV41, NV43, NV44, NV45, C51, MCP61 .TP 22 .B GeForce 7XXX G70, G71, G72, G73, MCP67, MCP68, MCP73 .TP 22 .B GeForce 8XXX, 9XXX, 2XX, 3XX G80, G84, G86, G92, G94, G96, G98, G200, GT215, GT216, GT218, MCP77, MCP79, MCP89 .TP 22 .B GeForce 4XX, 5XX GF100, GF104, GF106, GF108, GF110, GF114, GF116, GF117, GF119 .TP 22 .B GeForce 6XX, 7XX GK104, GK106, GK107, GK110, GK208 .TP 22 .B GeForce GTX 750 GM107, GM108 .TP 22 .B GeForce GTX 9XX GM200, GM204, GM206 .TP 22 .B GeForce GTX 10XX GP102, GP104, GP106, GP107, GP108 .SH CONFIGURATION DETAILS Please refer to __xconfigfile__(__filemansuffix__) for general configuration details. This section only covers configuration details specific to this driver. .PP The driver auto-detects the chipset type and the amount of video memory present for all chips. .PP The following driver .B Options are supported: .TP .BI "Option \*qHWCursor\*q \*q" boolean \*q Enable or disable the HW cursor. Default: on. .TP .BI "Option \*qAccelMethod\*q \*q" string \*q Specify the acceleration method. One of \*qnone\*q, or \*qexa\*q. Default: exa. .TP .BI "Option \*qNoAccel\*q \*q" boolean \*q Disable or enable acceleration. Default: acceleration is enabled. .TP .BI "Option \*qShadowFB\*q \*q" boolean \*q Enable or disable use of the shadow framebuffer layer. Default: off. .TP .BI "Option \*qWrappedFB\*q \*q" boolean \*q Enable or disable wfb, only affects nv50+. Useful for some legacy configurations where high rendering latency is perceived. Default: wfb is disabled. .TP .BI "Option \*qGLXVBlank\*q \*q" boolean \*q Synchronize GLX clients to VBlank. Useful where tearing is a problem, harmful if the GPU isn't fast enough to keep up with the monitor refresh rate. Default: on. .TP .BI "Option \*qZaphodHeads\*q \*q" string \*q Specify the randr output(s) to use with zaphod mode for a particular driver instance. If you use this option you most use this option for all instances of the driver. .br For example: .B Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q will assign xrandr outputs LVDS and VGA-0 to this instance of the driver. .TP .BI "Option \*qPageFlip\*q \*q" boolean \*q Enable DRI2 page flipping. Default: on. .TP .BI "Option \*qSwapLimit\*q \*q" integer \*q Set maximum allowed number of pending OpenGL double-buffer swaps for a drawable before a client is blocked. .br A value of 1 corresponds to double-buffering. A value of 2 corresponds to triple-buffering. Higher values may allow higher framerate, but also increase lag for interactive applications, e.g., games. Nouveau currently reliably supports a maximum value of 2 on XOrg 1.12+. A maximum setting of 2 on older x-servers is allowed, but it will break conformance with the OpenML OML_sync_control specification and will cause failure of software that relies on correct presentation timing behaviour as defined in that specification. .br Default: 1. .TP .BI "Option \*qDRI\*q \*q" integer \*q Define the maximum level of DRI to enable. Valid values are 2 or 3. exa acceleration will honor the maximum level if it is supported. Default: 2. .SH "SEE ALSO" __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) .SH AUTHORS Authors include: David McKay, Jarno Paananen, Chas Inman, Dave Schmenk, Mark Vojkovich .SH COPYRIGHT .LP NOTICE TO USER: The source code is copyrighted under U.S. and international laws. Users and possessors of this source code are hereby granted a nonexclusive, royalty-free copyright license to use this code in individual and commercial software. .LP Any use of this source code must include, in the user documentation and internal comments to the code, notices to the end user as follows: .LP Copyright 1993-2003 NVIDIA, Corporation. All rights reserved. .LP NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 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 PERFORMANCE OF THIS SOURCE CODE. .LP U.S. Government End Users. This source code is a "commercial item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Government only as a commercial end item. Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the source code with only those rights set forth herein. xf86-video-nouveau-1.0.18/man/Makefile.in0000644000175000017500000004132414713424671013476 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # $Id$ # # Copyright 2005 Sun Microsystems, Inc. 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 # the rights to use, copy, modify, merge, publish, distribute, sublicense, # 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 NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS 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. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(drivermandir)" DATA = $(driverman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_NAME = @DRIVER_NAME@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBDRM_NOUVEAU_CFLAGS = @LIBDRM_NOUVEAU_CFLAGS@ LIBDRM_NOUVEAU_LIBS = @LIBDRM_NOUVEAU_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ LIBUDEV_LIBS = @LIBUDEV_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ VERSION = @VERSION@ XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = @DRIVER_NAME@.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man all: all-am .SUFFIXES: .SUFFIXES: .$(DRIVER_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(drivermandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-drivermanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-drivermanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-drivermanDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-drivermanDATA .PRECIOUS: Makefile .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xf86-video-nouveau-1.0.18/man/Makefile.am0000644000175000017500000000301314713424663013457 # $Id$ # # Copyright 2005 Sun Microsystems, Inc. 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 # the rights to use, copy, modify, merge, publish, distribute, sublicense, # 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 NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS OR COPYRIGHT HOLDERS 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. # drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = @DRIVER_NAME@.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ xf86-video-nouveau-1.0.18/configure0000755000175000017500000242203414713424671012570 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for xf86-video-nouveau 1.0.18. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues/ $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xf86-video-nouveau' PACKAGE_TARNAME='xf86-video-nouveau' PACKAGE_VERSION='1.0.18' PACKAGE_STRING='xf86-video-nouveau 1.0.18' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues/' PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DRIVER_NAME moduledir LIBUDEV_FALSE LIBUDEV_TRUE LIBUDEV_LIBS LIBUDEV_CFLAGS PCIACCESS_LIBS PCIACCESS_CFLAGS HAVE_XEXTPROTO_71_FALSE HAVE_XEXTPROTO_71_TRUE XEXT_LIBS XEXT_CFLAGS XORG_LIBS XORG_CFLAGS LIBDRM_NOUVEAU_LIBS LIBDRM_NOUVEAU_CFLAGS LIBDRM_LIBS LIBDRM_CFLAGS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP FILECMD LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP LIBTOOL MAN_SUBSTS XORG_MAN_PAGE ADMIN_MAN_DIR DRIVER_MAN_DIR MISC_MAN_DIR FILE_MAN_DIR LIB_MAN_DIR APP_MAN_DIR ADMIN_MAN_SUFFIX DRIVER_MAN_SUFFIX MISC_MAN_SUFFIX FILE_MAN_SUFFIX LIB_MAN_SUFFIX APP_MAN_SUFFIX SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build INSTALL_CMD PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CHANGELOG_CMD STRICT_CFLAGS CWARNFLAGS BASE_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_selective_werror enable_strict_compilation enable_static enable_shared with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock with_xorg_module_dir ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LT_SYS_LIBRARY_PATH LIBDRM_CFLAGS LIBDRM_LIBS LIBDRM_NOUVEAU_CFLAGS LIBDRM_NOUVEAU_LIBS XORG_CFLAGS XORG_LIBS XEXT_CFLAGS XEXT_LIBS PCIACCESS_CFLAGS PCIACCESS_LIBS LIBUDEV_CFLAGS LIBUDEV_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 xf86-video-nouveau 1.0.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/xf86-video-nouveau] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of xf86-video-nouveau 1.0.18:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-selective-werror Turn off selective compiler errors. (default: enabled) --enable-strict-compilation Enable all warnings from compiler and make them errors (default: disabled) --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-xorg-module-dir=DIR Default xorg module directory [[default=$libdir/xorg/modules]] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LT_SYS_LIBRARY_PATH User-defined run-time library search path. LIBDRM_CFLAGS C compiler flags for LIBDRM, overriding pkg-config LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config LIBDRM_NOUVEAU_CFLAGS C compiler flags for LIBDRM_NOUVEAU, overriding pkg-config LIBDRM_NOUVEAU_LIBS linker flags for LIBDRM_NOUVEAU, overriding pkg-config XORG_CFLAGS C compiler flags for XORG, overriding pkg-config XORG_LIBS linker flags for XORG, overriding pkg-config XEXT_CFLAGS C compiler flags for XEXT, overriding pkg-config XEXT_LIBS linker flags for XEXT, overriding pkg-config PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config PCIACCESS_LIBS linker flags for PCIACCESS, overriding pkg-config LIBUDEV_CFLAGS C compiler flags for LIBUDEV, overriding pkg-config LIBUDEV_LIBS linker flags for LIBUDEV, 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. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xf86-video-nouveau configure 1.0.18 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xf86-video-nouveau $as_me 1.0.18, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" # Auxiliary files required by this configure script. ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}/." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >>confdefs.h <<_ACEOF #define NV_DRIVER_DATE $(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \") _ACEOF ac_config_headers="$ac_config_headers config.h" # Initialize Automake am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='xf86-video-nouveau' VERSION='1.0.18' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else case e in #( e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; esac fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi ac_fn_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___clang__" = xyes then : CLANGCC="yes" else case e in #( e) CLANGCC="no" ;; esac fi ac_fn_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes then : INTELCC="yes" else case e in #( e) INTELCC="no" ;; esac fi ac_fn_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___SUNPRO_C" = xyes then : SUNCC="yes" else case e in #( e) SUNCC="no" ;; esac fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then as_fn_error $? "pkg-config not found" "$LINENO" 5 fi # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Check whether --enable-selective-werror was given. if test ${enable_selective_werror+y} then : enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval else case e in #( e) SELECTIVE_WERROR=yes ;; esac fi # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then BASE_CFLAGS="-v" else BASE_CFLAGS="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wall" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 printf %s "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wall" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-arith" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 printf %s "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-declarations" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 printf %s "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat=2" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 printf %s "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 printf %s "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wstrict-prototypes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 printf %s "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-prototypes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 printf %s "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnested-externs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 printf %s "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wbad-function-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 printf %s "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wold-style-definition" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 printf %s "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -fd" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5 printf %s "checking if $CC supports -fd... " >&6; } cacheid=xorg_cv_cc_flag__fd if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -fd" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wdeclaration-after-statement" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 printf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" found="yes" fi fi # This chunk adds additional warnings that could catch undesired effects. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wunused" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 printf %s "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wunused" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wuninitialized" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 printf %s "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wshadow" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 printf %s "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wshadow" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-noreturn" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 printf %s "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-format-attribute" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 printf %s "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wredundant-decls" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5 printf %s "checking if $CC supports -Wredundant-decls... " >&6; } cacheid=xorg_cv_cc_flag__Wredundant_decls if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wlogical-op" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5 printf %s "checking if $CC supports -Wlogical-op... " >&6; } cacheid=xorg_cv_cc_flag__Wlogical_op if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op" found="yes" fi fi # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidentally get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=implicit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 printf %s "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 printf %s "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=nonnull" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 printf %s "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=init-self" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 printf %s "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=main" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 printf %s "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=main" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=missing-braces" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 printf %s "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=sequence-point" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 printf %s "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=return-type" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 printf %s "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 printf %s "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=trigraphs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 printf %s "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=array-bounds" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 printf %s "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=write-strings" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 printf %s "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=address" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 printf %s "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=address" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 printf %s "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 printf %s "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 printf %s "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast" found="yes" fi fi # Also -errwarn=E_BAD_PTR_INT_COMBINATION else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 printf "%s\n" "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wimplicit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 printf %s "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wimplicit" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnonnull" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 printf %s "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Winit-self" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 printf %s "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Winit-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmain" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 printf %s "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmain" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-braces" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 printf %s "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wsequence-point" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 printf %s "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wreturn-type" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 printf %s "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wtrigraphs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 printf %s "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Warray-bounds" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 printf %s "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wwrite-strings" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 printf %s "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Waddress" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 printf %s "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Waddress" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wint-to-pointer-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 printf %s "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-to-int-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 printf %s "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast" found="yes" fi fi fi CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi # Check whether --enable-strict-compilation was given. if test ${enable_strict_compilation+y} then : enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval else case e in #( e) STRICT_COMPILE=no ;; esac fi STRICT_CFLAGS="" xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -pedantic" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 printf %s "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -pedantic" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 printf %s "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 printf %s "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -errwarn" found="yes" fi fi # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=attributes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 printf %s "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" found="yes" fi fi if test "x$STRICT_COMPILE" = "xyes"; then BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` _ACEOF PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi printf "%s\n" "#define PACKAGE_VERSION_MINOR $PVM" >>confdefs.h PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi printf "%s\n" "#define PACKAGE_VERSION_PATCHLEVEL $PVP" >>confdefs.h CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ touch \$(top_srcdir)/ChangeLog; \ echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ touch \$(top_srcdir)/INSTALL; \ echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" case $host_os in solaris*) # Solaris 2.0 - 11.3 use SysV man page section numbers, so we # check for a man page file found in later versions that use # traditional section numbers instead { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5 printf %s "checking for /usr/share/man/man7/attributes.7... " >&6; } if test ${ac_cv_file__usr_share_man_man7_attributes_7+y} then : printf %s "(cached) " >&6 else case e in #( e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/man/man7/attributes.7"; then ac_cv_file__usr_share_man_man7_attributes_7=yes else ac_cv_file__usr_share_man_man7_attributes_7=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5 printf "%s\n" "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; } if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes then : SYSV_MAN_SECTIONS=false else case e in #( e) SYSV_MAN_SECTIONS=true ;; esac fi ;; *) SYSV_MAN_SECTIONS=false ;; esac if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi XORG_MAN_PAGE="X Version 11" MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # Require X.Org server macros (i.e. XORG_DRIVER_CHECK_EXT) to check for required modules # Initialize libtool case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.7' macro_revision='2.4.7' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in #( *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else case e in #( e) i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_reload_flag='-r' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. set dummy ${ac_tool_prefix}file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="${ac_tool_prefix}file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_FILECMD"; then ac_ct_FILECMD=$FILECMD # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FILECMD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_FILECMD"; then ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FILECMD="file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD if test -n "$ac_ct_FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 printf "%s\n" "$ac_ct_FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_FILECMD" = x; then FILECMD=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FILECMD=$ac_ct_FILECMD fi else FILECMD="$ac_cv_prog_FILECMD" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else case e in #( e) # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ;; esac fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else case e in #( e) with_sysroot=no ;; esac fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*|powerpc64le-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else case e in #( e) lt_cv_cc_needs_belf=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else case e in #( e) lt_cv_ld_exported_symbols_list=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_static=no ;; esac fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test ${enable_shared+y} then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_shared=yes ;; esac fi # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) pic_mode=default ;; esac fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_fast_install=yes ;; esac fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else case e in #( e) if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_with_aix_soname=aix ;; esac fi with_aix_soname=$lt_cv_with_aix_soname ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else case e in #( e) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else case e in #( e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else case e in #( e) lt_cv_irix_exported_symbol=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else case e in #( e) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi # Handle Gentoo/FreeBSD as it was Linux case $host_vendor in gentoo) version_type=linux ;; *) version_type=freebsd-$objformat ;; esac case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; linux) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' need_lib_prefix=no need_version=no ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir ;; esac fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; esac fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char shl_load (void); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else case e in #( e) ac_cv_lib_dld_shl_load=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else case e in #( e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else case e in #( e) ac_cv_lib_svld_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dld_link (void); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else case e in #( e) ac_cv_lib_dld_dld_link=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: # Define a configure option for an alternate module directory # Check whether --with-xorg-module-dir was given. if test ${with_xorg_module_dir+y} then : withval=$with_xorg_module_dir; moduledir="$withval" else case e in #( e) moduledir="$libdir/xorg/modules" ;; esac fi # Store the list of server defined optional extensions in REQUIRED_MODULES SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined RANDR #error RANDR not defined #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : _EXT_CHECK=yes else case e in #( e) _EXT_CHECK=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RANDR is defined" >&5 printf %s "checking if RANDR is defined... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 printf "%s\n" "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES randrproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined RENDER #error RENDER not defined #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : _EXT_CHECK=yes else case e in #( e) _EXT_CHECK=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if RENDER is defined" >&5 printf %s "checking if RENDER is defined... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 printf "%s\n" "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES renderproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined XV #error XV not defined #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : _EXT_CHECK=yes else case e in #( e) _EXT_CHECK=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if XV is defined" >&5 printf %s "checking if XV is defined... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 printf "%s\n" "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES videoproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined DPMSExtension #error DPMSExtension not defined #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : _EXT_CHECK=yes else case e in #( e) _EXT_CHECK=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if DPMSExtension is defined" >&5 printf %s "checking if DPMSExtension is defined... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 printf "%s\n" "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES xextproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" #if !defined DRI2 #error DRI2 not defined #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : _EXT_CHECK=yes else case e in #( e) _EXT_CHECK=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if DRI2 is defined" >&5 printf %s "checking if DRI2 is defined... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 printf "%s\n" "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES dri2proto >= 2.6" fi # Checks for libraries pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libdrm >= 2.4.60" >&5 printf %s "checking for libdrm >= 2.4.60... " >&6; } if test -n "$LIBDRM_CFLAGS"; then pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.60\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.60") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.60" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBDRM_LIBS"; then pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.60\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.60") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.60" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm >= 2.4.60" 2>&1` else LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= 2.4.60" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBDRM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libdrm >= 2.4.60) were not met: $LIBDRM_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 LIBDRM_CFLAGS and LIBDRM_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$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 LIBDRM_CFLAGS and LIBDRM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libdrm_nouveau >= 2.4.25" >&5 printf %s "checking for libdrm_nouveau >= 2.4.25... " >&6; } if test -n "$LIBDRM_NOUVEAU_CFLAGS"; then pkg_cv_LIBDRM_NOUVEAU_CFLAGS="$LIBDRM_NOUVEAU_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_nouveau >= 2.4.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm_nouveau >= 2.4.25") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_NOUVEAU_CFLAGS=`$PKG_CONFIG --cflags "libdrm_nouveau >= 2.4.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBDRM_NOUVEAU_LIBS"; then pkg_cv_LIBDRM_NOUVEAU_LIBS="$LIBDRM_NOUVEAU_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_nouveau >= 2.4.25\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm_nouveau >= 2.4.25") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_NOUVEAU_LIBS=`$PKG_CONFIG --libs "libdrm_nouveau >= 2.4.25" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 LIBDRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_nouveau >= 2.4.25" 2>&1` else LIBDRM_NOUVEAU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_nouveau >= 2.4.25" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBDRM_NOUVEAU_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libdrm_nouveau >= 2.4.25) were not met: $LIBDRM_NOUVEAU_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 LIBDRM_NOUVEAU_CFLAGS and LIBDRM_NOUVEAU_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$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 LIBDRM_NOUVEAU_CFLAGS and LIBDRM_NOUVEAU_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else LIBDRM_NOUVEAU_CFLAGS=$pkg_cv_LIBDRM_NOUVEAU_CFLAGS LIBDRM_NOUVEAU_LIBS=$pkg_cv_LIBDRM_NOUVEAU_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # Obtain compiler/linker options for the driver dependencies pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES" >&5 printf %s "checking for xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES... " >&6; } if test -n "$XORG_CFLAGS"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.18 xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XORG_LIBS"; then pkg_cv_XORG_LIBS="$XORG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.18 xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 XORG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES" 2>&1` else XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (xorg-server >= 1.18 xproto fontsproto $REQUIRED_MODULES) were not met: $XORG_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 XORG_CFLAGS and XORG_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$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 XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XORG_CFLAGS=$pkg_cv_XORG_CFLAGS XORG_LIBS=$pkg_cv_XORG_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xextproto >= 7.0.99.1" >&5 printf %s "checking for xextproto >= 7.0.99.1... " >&6; } if test -n "$XEXT_CFLAGS"; then pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xextproto >= 7.0.99.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XEXT_LIBS"; then pkg_cv_XEXT_LIBS="$XEXT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xextproto >= 7.0.99.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1` else XEXT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xextproto >= 7.0.99.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 HAVE_XEXTPROTO_71="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_XEXTPROTO_71="no" else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_XEXTPROTO_71="yes"; printf "%s\n" "#define HAVE_XEXTPROTO_71 1" >>confdefs.h fi if test "$HAVE_XEXTPROTO_71" = "yes" ; then HAVE_XEXTPROTO_71_TRUE= HAVE_XEXTPROTO_71_FALSE='#' else HAVE_XEXTPROTO_71_TRUE='#' HAVE_XEXTPROTO_71_FALSE= fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pciaccess >= 0.10" >&5 printf %s "checking for pciaccess >= 0.10... " >&6; } if test -n "$PCIACCESS_CFLAGS"; then pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCIACCESS_LIBS"; then pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.10\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.10") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.10" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "pciaccess >= 0.10" 2>&1` else PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pciaccess >= 0.10" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCIACCESS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (pciaccess >= 0.10) were not met: $PCIACCESS_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 PCIACCESS_CFLAGS and PCIACCESS_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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$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 PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libudev" >&5 printf %s "checking for libudev... " >&6; } if test -n "$LIBUDEV_CFLAGS"; then pkg_cv_LIBUDEV_CFLAGS="$LIBUDEV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_CFLAGS=`$PKG_CONFIG --cflags "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBUDEV_LIBS"; then pkg_cv_LIBUDEV_LIBS="$LIBUDEV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUDEV_LIBS=`$PKG_CONFIG --libs "libudev" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } 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 LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libudev" 2>&1` else LIBUDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libudev" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBUDEV_PKG_ERRORS" >&5 LIBUDEV=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } LIBUDEV=no else LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } LIBUDEV=yes fi if test "x$LIBUDEV" = xyes; then printf "%s\n" "#define HAVE_LIBUDEV 1" >>confdefs.h fi if test "x$LIBUDEV" = "xyes" ; then LIBUDEV_TRUE= LIBUDEV_FALSE='#' else LIBUDEV_TRUE='#' LIBUDEV_FALSE= fi # Use -Wall all the time CFLAGS="$CFLAGS -Wall" # Check for -minline-all-stringops availability OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -minline-all-stringops" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : CFLAGS="$OLD_CFLAGS -minline-all-stringops" else case e in #( e) CFLAGS="$OLD_CFLAGS" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # needed for the next test CFLAGS="$CFLAGS $XORG_CFLAGS" DRIVER_NAME=nouveau ac_fn_check_decl "$LINENO" "xf86CursorResetCursor" "ac_cv_have_decl_xf86CursorResetCursor" "#include #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_xf86CursorResetCursor" = xyes then : printf "%s\n" "#define HAVE_XF86_CURSOR_RESET_CURSOR 1" >>confdefs.h fi ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XEXTPROTO_71_TRUE}" && test -z "${HAVE_XEXTPROTO_71_FALSE}"; then as_fn_error $? "conditional \"HAVE_XEXTPROTO_71\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LIBUDEV_TRUE}" && test -z "${LIBUDEV_FALSE}"; then as_fn_error $? "conditional \"LIBUDEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xf86-video-nouveau $as_me 1.0.18, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ xf86-video-nouveau config.status 1.0.18 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo "" echo " prefix: $prefix" echo " exec_prefix: $exec_prefix" echo " libdir: $libdir" echo " includedir: $includedir" echo "" echo " CFLAGS: $CFLAGS" echo " CXXFLAGS: $CXXFLAGS" echo " Macros: $DEFINES" echo "" echo " Run '${MAKE-make}' to build xf86-video-nouveau" echo "" xf86-video-nouveau-1.0.18/INSTALL0000644000175000017500000003660014713424676011715 Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. xf86-video-nouveau-1.0.18/config.h.in0000644000175000017500000000423014713424671012674 /* config.h.in. Generated from configure.ac by autoheader. */ #include "xorg-server.h" /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* libudev support */ #undef HAVE_LIBUDEV /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* xextproto 7.1 available */ #undef HAVE_XEXTPROTO_71 /* Have xf86CursorResetCursor API */ #undef HAVE_XF86_CURSOR_RESET_CURSOR /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Driver date */ #undef NV_DRIVER_DATE /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Major version of this package */ #undef PACKAGE_VERSION_MAJOR /* Minor version of this package */ #undef PACKAGE_VERSION_MINOR /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION xf86-video-nouveau-1.0.18/ChangeLog0000644000175000017500000236236314713424676012450 commit 8bf766606f1502fa481f1103ff704cc9dd13c337 Author: Matt Turner Date: Thu Nov 7 13:15:35 2024 -0500 xf86-video-nouveau 1.0.18 Part-of: commit a261e93f09d2f2c3b429de2b1cecce1ec015b962 Author: Łukasz Spintzyk Date: Tue Jun 22 10:53:37 2021 +0200 nouveau: Implement nouveau_pick_best_crtc using rr_crtc_covering_box Both functions have the same implementation. Signed-off-by: Łukasz Spintzyk Part-of: commit aa3962ee7b25818b35371cc8e78dd6591b941990 Author: Łukasz Spintzyk Date: Tue Jun 22 09:54:54 2021 +0200 nouveau: use modesetting randr_crtc_covering_drawable implementation ... for nouveau_present_crtc. Instead of returning NULL crtc or disable primarty crtc as fallback randr_crtc_covering_drawable can find and return crtc that belongs to secondary outputs. This prevents usage of 1Hz fake_crtc when lid is closed and only secondary output is enabled. Signed-off-by: Łukasz Spintzyk Part-of: commit 80360ea8cfebf5ad718f27f82b14761a140c10a1 Author: Łukasz Spintzyk Date: Tue Jun 22 09:43:26 2021 +0200 nouveau: Use randr_crtc_covering_drawable used in modesetting Use implementation from modesetting driver that is fixing issue: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1028 Instead of returning NULL crtc or disable primarty crtc as fallback randr_crtc_covering_drawable can find and return crtc that belongs to secondary outputs. This prevents usage of 1Hz fake_crtc when lid is closed and only secondary output is enabled. Signed-off-by: Łukasz Spintzyk Part-of: commit 0d1c1a0828c31b50620301a03c5df56f0cbfd29c Author: Łukasz Spintzyk Date: Tue Jun 22 10:20:02 2021 +0200 nouveau: Remove consider_disabled from nouveau_pick_best_crtc ... as it is never used. Also this is not required anymore as xserver patch fixed that in xorg-server in 5c5c1b779 ("present: Add Present extension"). - in case of lack of crtc xserver is using fake_crtc with render 1Hz frequency Signed-off-by: Łukasz Spintzyk Part-of: commit 7d09948c13c606bfc317f7e1e2616563af9dfe70 Author: Łukasz Spintzyk Date: Tue Jun 22 09:21:56 2021 +0200 nouveau: fixup driver for new X server ABI Signed-off-by: Łukasz Spintzyk Part-of: commit f2508a881cc4a6500e9ef27c656df631e0d56be3 Author: Łukasz Spintzyk Date: Tue Jun 22 09:34:30 2021 +0200 nouveau: Rename functions that has origin from modesetting ... to have the same name and implementation. I have renamed drmmode_crtc_on, nouveau_box_intersect, nouveau_box_area to be named the same as in modesetting driver. It will be easier to make that code common in the future when required. Signed-off-by: Łukasz Spintzyk Part-of: commit 98c96445beb6661b681a217316e52ff6fdca8a74 Author: Enrico Weigelt, metux IT consult Date: Tue Oct 1 17:36:01 2024 +0200 use dixDestroyPixmap() instead of direct driver call Direct calls to ScreenRec->DestroyPixmap() blocks cleaning up the wrapping jungle, so use the proper dix function instead. See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1754 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 14eec1945fa16144178ea94bdf68c756fb1028aa Author: Enrico Weigelt, metux IT consult Date: Wed May 8 16:18:19 2024 +0200 use XNFcallocarray() instead of xnfcalloc macro xnfcalloc is just an alias for XNFcallocarray() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 4e4ab90a48e0a2a7325b4f5d08feb611745e9d3b Author: Enrico Weigelt, metux IT consult Date: Wed May 8 12:58:02 2024 +0200 use XNFalloc() instead of xnfalloc xnfalloc is just an alias for XNFalloc() that doesn't seem to serve any practical purpose, so it can go away once all drivers stopped using it. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 0cb36acb07b57263e8e446ebf2d7505686337eff Author: Enrico Weigelt, metux IT consult Date: Wed May 22 22:57:49 2024 +0200 drop compat with ancient ABI_VIDEODRV_VERSION < 20 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 25ae4a6129e03e3661744c8eb4200b30309e0ca2 Author: Enrico Weigelt, metux IT consult Date: Wed May 22 22:56:34 2024 +0200 drop obsolete check for HAS_DIXREGISTERPRIVATEKEY Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit d7db32eecc302668b11b9dd2d84f79d270ae5eea Author: Enrico Weigelt, metux IT consult Date: Tue May 14 14:31:33 2024 +0200 drop compat for ancient server versions Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 7d29f5c439770cc8bc26f8c3ecff5e803d3e5d71 Author: Enrico Weigelt, metux IT consult Date: Tue May 14 14:30:35 2024 +0200 drop check for xorg_list_init() Since we're relying on at least xserver version 1.8 and it's present there, no need for extra checks and workarounds. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 4063c70c1a99be46a29951fd3a958617d0003364 Author: Enrico Weigelt, metux IT consult Date: Tue May 14 14:26:58 2024 +0200 bump minimal xorg version to 1.18 1.18 was released a decade ago, so it seems reasonable stop supporting older ones. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 32188de9c66291778dea4d6c701540e874d9027a Author: Sérgio M. Basto Date: Thu Oct 10 00:53:55 2024 +0100 Fix implicit declaration of wfbScreenInit ``` nv_driver.c:1443:9: warning: implicit declaration of function ‘wfbScreenInit’; did you mean ‘fbScreenInit’? [-Wimplicit-function-declaration] ret = wfbScreenInit(pScreen, FBStart, pScrn->virtualX, ^~~~~~~~~~~~~ fbScreenInit ``` Fixes: 794a277 ("nv50: use libwfb for pixmap access when driver pixmaps enabled") Signed-off-by: Sérgio M. Basto Part-of: commit 827f1e2d2b336ea7d65cf1c8117dd9c34e876e7d Author: Alan Coopersmith Date: Thu Oct 5 17:10:21 2023 -0700 gitlab CI: ensure libtool is installed in build container Signed-off-by: Alan Coopersmith commit 9f733098b3c9f65bf5896f248cdf4c3b69ace4e5 Author: Alan Coopersmith Date: Thu Jul 28 17:30:21 2022 -0700 gitlab CI: stop requiring Signed-off-by in commits Signed-off-by: Alan Coopersmith commit 29cc528a1f270f8aac49c2f0dedcb03590613cb3 Author: Alan Coopersmith Date: Sat Jan 22 13:38:53 2022 -0800 gitlab CI: add a basic build test Signed-off-by: Alan Coopersmith commit fbd3133bef9de5ba8c2e1d12835a7ac17bd67a72 Author: Alan Coopersmith Date: Fri Jan 15 15:14:35 2010 -0800 Update Sun license notices to current X.Org standard form As noted in https://lists.freedesktop.org/archives/xorg-devel/2009-November/003670.html Sun relicensed all its contributions to X.Org to use the standard X.Org form of the MIT license, to reduce the number of MIT license variants in X.Org projects. Signed-off-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit cdd503430bc5456724b3102a376bd26ede48862f Author: Alan Coopersmith Date: Sat Jan 22 13:34:51 2022 -0800 Build xz tarballs instead of bzip2 Signed-off-by: Alan Coopersmith commit 3ee7cbca8f9144a3bb5be7f71ce70558f548d268 Author: Ilia Mirkin Date: Mon Apr 26 19:38:57 2021 -0400 remove sarea.h usage This header hasn't been used in ages, and is apparently no longer shipped in some places. Just stop relying on it entirely. Reported-by: Lyude Paul Signed-off-by: Ilia Mirkin commit e80e73ced69b15662103d0fd6837db4ce6c6eb5b Author: Dave Airlie Date: Mon Jul 13 09:20:15 2020 +1000 nouveau: fixup driver for new X server ABI commit c39897466573aabd6a3b4e63e8e5fb42ac5971f8 Author: Ilia Mirkin Date: Sat Jan 23 12:24:42 2021 -0500 Bump version to 1.0.17 Signed-off-by: Ilia Mirkin commit 7212a2782f3e638acf49de4716656b2ae27c2156 Author: Ilia Mirkin Date: Sat Aug 15 23:18:22 2020 -0400 present: fix handling of drmWaitVBlank failures When drmWaitVBlank fails, make sure to remove the event from the queue. Signed-off-by: Ilia Mirkin commit 5031100549fb053527a1f11d771e930dec065ced Author: Ilia Mirkin Date: Sat Aug 15 23:20:53 2020 -0400 drmmode: make event handler leave a note that there are stuck events We don't really expect to have too many events in the queue. If there are, then the algorithm we use isn't appropriate. Add a warning when the queue gets very long, as it's an indication of something having gone wrong. Signed-off-by: Ilia Mirkin commit f833cd0827a73b716cc3af5905015fcb2c7d958d Author: Ilia Mirkin Date: Sat Jul 18 18:44:58 2020 -0400 present: don't enable if there's no acceleration All the present logic relies on EXA being used to wrap everything. Unclear if present could even be used without the other things EXA enables, but better be safe. Signed-off-by: Ilia Mirkin commit 971624406a8ecd85bad8c2e2d1fd26f5d14bae92 Author: Ilia Mirkin Date: Sat Jul 18 18:40:35 2020 -0400 drmmode: fix screen resize without acceleration This got broken with commit 86024cee back in 2014! drmmode_pixmap/nouveau_pixmap expect there to be EXA wrapping around the pixmap now, which is not there without accel. Signed-off-by: Ilia Mirkin commit 5444cabcf0ab5cea614270f1ad1df1e1fccb3c2b Author: Ilia Mirkin Date: Sat Oct 26 18:36:27 2019 -0400 make error when failing to allocate surface more descriptive Signed-off-by: Ilia Mirkin commit ef89b3c5ca9b2569ca61a9452d13a93edc832810 Author: Ilia Mirkin Date: Sat Oct 12 20:13:25 2019 -0400 dri2,present: move in pixmap before getting addresses First of all, we were not forcing the pixmap to be moved in before attempting to present it. Secondly, in certain configurations, we avoid ever backing pixmaps with vram (in GPUs with 32MB of VRAM or less). This fixes the observed cases where we ended up assuming that a bo was backing a pixmap without doing the explicit move-in. Signed-off-by: Ilia Mirkin commit 856572319fadeeadf58d782ab6f3f2d230822d67 Author: Ilia Mirkin Date: Sat Oct 12 16:00:15 2019 -0400 nv4/exa: tiling is unsupported pre-nv10, reduce alignment requirements Commit 8c8f15c9d3 added increased pitch alignment requirements to handle nv10-nv40 tiling (which must have a small number * PoT pitch). While NV4/NV5 do have tiling, this was never supported in nouveau. This change enables 1920x1200 resolutions since the maximum surface pitch has to be strictly less than 8192. The current logic will align 1920*4 up to 8192 unnecessarily. Signed-off-by: Ilia Mirkin Cc: Marcin Kościelnicki Cc: Francisco Jerez commit a5f04582cecb1a649bb46b8af9f2889247788d00 Author: Carlo Caione Date: Fri Sep 1 12:47:23 2017 +0200 Don't advertise any PRIME offloading capabilities without acceleration Acceleration is required even for display offloading. Trying to enable display offloading without acceleration resulted in a crash. https://bugs.freedesktop.org/show_bug.cgi?id=101220 Signed-off-by: Carlo Caione commit ec2b45d1bf4c31c5420b48c213bf9ee1656adf9d Author: Ilia Mirkin Date: Mon Jan 28 23:25:58 2019 -0500 Bump version to 1.0.16 Signed-off-by: Ilia Mirkin commit 2376d1ebf2d9a96bc2ebf21d53a9f9841ce5c15b Author: Ilia Mirkin Date: Sat Jan 26 23:00:19 2019 -0500 update known chipsets list Signed-off-by: Ilia Mirkin Reviewed-by: Rhys Kidd commit ca13913aaf7e3995c3b49d3d80aad7e6cb33291a Author: Ilia Mirkin Date: Wed Jan 23 00:29:51 2019 -0500 Revert "wfb: Fix missing init function decls behind FB_ACCESS_WRAPPER" This reverts commit d7ba24fb6e4fce43adc3c73369c5d1035ae080a9. When built and run against Xorg 1.20.3, part way through init, I got an error about wfbPictureInit not existing despite not having wfb_enabled set. Signed-off-by: Ilia Mirkin commit fb2d4d27837ebf3ae2fdcf091495f52d2ad8c822 Author: Ilia Mirkin Date: Wed Jan 23 00:28:05 2019 -0500 present: rotated crtc's work fine The "pick best" logic takes rotation into account. However flipping a rotated CRTC can't work, so we disable that. Signed-off-by: Ilia Mirkin commit 92db605f0f5ac14957e38e59782ef3ed4808de05 Author: Rhys Kidd Date: Mon Jan 21 22:59:54 2019 -0500 Adapt to PixmapDirtyUpdateRec::src being a DrawablePtr Signed-off-by: Ilia Mirkin commit 8a90309401963aa43f89f91e204ec9cac5ade704 Author: Rhys Kidd Date: Mon Jan 21 00:52:23 2019 -0500 config: Suggest upstream to find macros in case they are missing Added upstream suggestion to error message in case xorg macros or xserver macros are missing. No actual package manager references in suggestion since these are 'user' and/or 'distribution' preferences. (Cherry picked from xf86-video-intel 90538ecfff9c324d61419f451d41d26ab026f232) Signed-off-by: Rhys Kidd commit fcddd2c8e6e4a738bf28028e6d4ad5be34c8b2ae Author: Rhys Kidd Date: Mon Jan 21 00:52:22 2019 -0500 config: Complete bug report URL for Xorg DDX nouveau driver Signed-off-by: Rhys Kidd commit a566c883b3663b685e467788b8b5de6d99ef9ae2 Author: Rhys Kidd Date: Mon Jan 21 00:52:21 2019 -0500 config: Set automake options consistently in one location Avoid use of two manners of setting automake configuration options, and consolidate them into AM_INIT_AUTOMAKE macro. Signed-off-by: Rhys Kidd commit 56e67e09925b0b5544884b279b9cc5552964fd25 Author: Rhys Kidd Date: Mon Jan 21 00:52:20 2019 -0500 config: remove unused sdkdir=$(pkg-config...) statement The sdkdir variable is not used, so remove the statement. (Copied from xf86-video-ati 36bd69affc996c92c40b7360a7fbaa1a3a46abfd) Signed-off-by: Rhys Kidd commit db51fcf52067e4412c96bb4c84d97ceac6c857a6 Author: Rhys Kidd Date: Mon Jan 21 00:52:19 2019 -0500 config: Remove unrequired AC_SUBST for LIBDRM_NOUVEAU and LIBUDEV These macros are called by the PKG_CHECK_MODULES macro, for all versions of pkg-config >= 0.24.0 (released May 23, 2010). Signed-off-by: Rhys Kidd commit f5250b1d46b6442550140b149341e06f7f27ae8d Author: Rhys Kidd Date: Mon Jan 21 00:52:18 2019 -0500 config: Add comments for main statements Signed-off-by: Rhys Kidd commit ed653f76b17ba4b252fe405e7bd39b36142dae05 Author: Rhys Kidd Date: Mon Jan 21 00:52:17 2019 -0500 config: Use LT_INIT option instead of AC_DISABLE_STATIC Since libtool 2.2 (released March 2008) the preferred initiation of libtool is with the LT_INIT() macro, instead of AC_PROG_LIBTOOL. As we are using LT_INIT anyway we might as well pass the disable-static option directly to it instead of using the AC_DISABLE_STATIC macro. See: - https://www.gnu.org/software/libtool/manual/html_node/LT_005fINIT.html - https://www.x.org/wiki/NewModuleGuidelines/ Signed-off-by: Rhys Kidd commit fe3fc188f17f000afae4c307ad5e54f1596fc6ff Author: Rhys Kidd Date: Mon Jan 21 00:52:16 2019 -0500 config: Utilize util-macros 1.8 for additional man page support Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS The value of MAN_SUBST is the same for all X.Org packages. Signed-off-by: Rhys Kidd commit caaac38112fa9066089099655866e0e9f5e3a647 Author: Rhys Kidd Date: Mon Jan 21 00:52:15 2019 -0500 config: remove unrequired AC_HEADER_STDC Autoconf says: "This macro is obsolescent, as current systems have conforming header files. New programs need not use this macro". Was previously required to ensure the system has C header files conforming to ANSI C89 (ISO C90). Specifically, this macro checks for stdlib.h, stdarg.h, string.h, and float.h. This autoconf option was used to provide conditional fallback support via defined STDC_HEADERS. xf86-video-nouveau does not do so, so this macro is obsolete and unused, so let's drop it. Signed-off-by: Rhys Kidd commit 4cf6d02ecbd5d2201d66324ba33f9fcbed67092f Author: Rhys Kidd Date: Mon Jan 21 00:52:14 2019 -0500 config: Use XORG_DEFAULT_OPTIONS which replaces six XORG_* macros This macro expands into several macros and provide several build functions [0]. Refer to the module generated aclocal.m4 file as this is subject to change. At present, this includes: - XORG_CWARNFLAGS: platform adjusted compiler warning flags - XORG_STRICT_OPTION: additional warning flags - XORG_RELEASE_VERSION: defines variables for major, minor and patch level - XORG_CHANGELOG: contains a makefile rule which creates the ChangeLog file from Git - XORG_INSTALL: contains a makefile rule which provides the INSTALL file in the module root directory - XORG_MANPAGE_SECTIONS: platform adjusted man page section number The above macros invoke the following Autoconf macros: - AC_PROG_INSTALL - AC_PROG_CC_C99 - AC_PROG_SED - AC_CANONICAL_HOST [0] https://www.x.org/wiki/NewModuleGuidelines/ Signed-off-by: Rhys Kidd commit 945f95775a21cbcc721b579f7dc220f1474d1d25 Author: Rhys Kidd Date: Mon Jan 21 00:52:13 2019 -0500 config: libtoolize: put macros in AC_CONFIG_MACRO_DIR, 'm4' As suggested by one tool called by autoreconf. Necessitates change to: - configure.ac: Call AC_CONFIG_MACRO_DIR() - Makefile.am: Set ACLOCAL_AMFLAGS = -I m4 - Create placeholder m4 folders - Update gitignore files >From the autoconf documentation: "Starting from version 2.58, autoconf provide the macro AC_CONFIG_MACRO_DIR to declare where additional macro files are to be put and found. The argument passed to this macro is commonly m4." https://autotools.io/autoconf/macros.html Signed-off-by: Rhys Kidd commit 9b60c3bc74c69d607d44c864f60f5fda0b11cd48 Author: Rhys Kidd Date: Mon Jan 21 00:52:12 2019 -0500 gitignore: Update to mirror modern X.org drivers Avoids git showing autoconf/automake generated files (e.g. tarballs) that are local build artifacts and should not be committed. Cherry picked from xf86-video-intel as at: https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/blob/7c9dbc980b760e0053d83ca2d7cb147613285680/.gitignore Signed-off-by: Rhys Kidd commit 1761769d43ab3ab31b5e5d92e6014fdea21830bd Author: Rhys Kidd Date: Mon Jan 21 00:52:11 2019 -0500 config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls AC_PROG_C_C99. This sets gcc with -std=gnu99. If AC_PROG_CC macro is called afterwards, it resets CC to gcc. Signed-off-by: Rhys Kidd commit e27c0bb6c70b1a68ddf2aeeb0e4346e0a41b8d9c Author: Rhys Kidd Date: Mon Jan 21 00:52:10 2019 -0500 config: Rely upon list.h as at least xorg-server 1.8 required Fixes: edd1608 ("xorg_list: define the xorg_list* symbols") Signed-off-by: Rhys Kidd commit 6700548071763daf30ab74dbcfb6543ea0db101d Author: Rhys Kidd Date: Mon Jan 21 00:52:09 2019 -0500 config: Only check for presence of libdrm package once After a version-conditioned check for libdrm was added, no longer necessary to check a second time, especially without a version number check. Fixes: 779b8d4 ("Link against libdrm") Signed-off-by: Rhys Kidd commit 9b2b008eb76c6f4c31d5f71ca01a06254a03f7c9 Author: Rhys Kidd Date: Mon Jan 21 00:52:08 2019 -0500 config, nv: Use xorg-macros PACKAGE_VERSION_{MAJOR, MINOR, PATCHLEVEL} Use xorg-macros provided PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} rather than rolling our own in xf86-video-nouveau. Macro has been available since xorg-macros 1.1.5 (we rely on >= 1.8) provided that XORG_DEFAULT_OPTIONS is called. Fixes: b82aacd ("configure: require xorg-macros 1.8") Signed-off-by: Rhys Kidd commit b098bdae321182d2f18d791e7f1c665dec21f571 Author: Rhys Kidd Date: Mon Jan 21 00:52:07 2019 -0500 config: Fix typo in comment Signed-off-by: Rhys Kidd commit 764b42babd38b545ccb3b43cd81c989bddf71c77 Author: Rhys Kidd Date: Sun Jan 20 22:21:34 2019 -0500 xv/nv30, nv40: Mark local NV30GetSurfaceFormat and NV40GetSurfaceFormat as static Avoids warnings with gcc 8.2: nv30_xv_tex.c:138:1: warning: no previous prototype for ‘NV30GetSurfaceFormat’ [-Wmissing-prototypes] NV30GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) ^~~~~~~~~~~~~~~~~~~~ nv40_xv_tex.c:138:1: warning: no previous prototype for ‘NV40GetSurfaceFormat’ [-Wmissing-prototypes] NV40GetSurfaceFormat(PixmapPtr ppix, int *fmt_ret) ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rhys Kidd commit 0fa6ba423593cb5c8e43b8f6569f90f9fcc2b36c Author: Rhys Kidd Date: Sun Jan 20 22:21:33 2019 -0500 xv: Mark local NVSetupTexturedVideo function as static Avoids warning with gcc 8.2: nouveau_xv.c:2136:1: warning: no previous prototype for ‘NVSetupTexturedVideo’ [-Wmissing-prototypes] NVSetupTexturedVideo (ScreenPtr pScreen, XF86VideoAdaptorPtr *textureAdaptor) ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rhys Kidd commit 2905ea76571faed91e7d17b5dc6e44758e71ff0b Author: Rhys Kidd Date: Sun Jan 20 22:21:32 2019 -0500 dri2: Mark local create/destroy buffer and copy region functions as static Avoids warnings with gcc 8.2: nouveau_dri2.c:38:1: warning: no previous prototype for ‘nouveau_dri2_create_buffer2’ [-Wmissing-prototypes] nouveau_dri2_create_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, unsigned int attachment, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ nouveau_dri2.c:109:1: warning: no previous prototype for ‘nouveau_dri2_create_buffer’ [-Wmissing-prototypes] nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, ^~~~~~~~~~~~~~~~~~~~~~~~~~ nouveau_dri2.c:117:1: warning: no previous prototype for ‘nouveau_dri2_destroy_buffer2’ [-Wmissing-prototypes] nouveau_dri2_destroy_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, DRI2BufferPtr buf) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ nouveau_dri2.c:131:1: warning: no previous prototype for ‘nouveau_dri2_destroy_buffer’ [-Wmissing-prototypes] nouveau_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf) ^~~~~~~~~~~~~~~~~~~~~~~~~~~ nouveau_dri2.c:137:1: warning: no previous prototype for ‘nouveau_dri2_copy_region2’ [-Wmissing-prototypes] nouveau_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegion, ^~~~~~~~~~~~~~~~~~~~~~~~~ nouveau_dri2.c:215:1: warning: no previous prototype for ‘nouveau_dri2_copy_region’ [-Wmissing-prototypes] nouveau_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Rhys Kidd commit eb93278fadaab508ba8c2db65d2d3af2bd421efa Author: Rhys Kidd Date: Sun Jan 20 22:21:31 2019 -0500 wfb: Remove declaration for undefined function nouveau_wfb_init() Fixes: 794a277 ("nv50: use libwfb for pixmap access when driver pixmaps enabled") Signed-off-by: Rhys Kidd commit 5233f3c84a436e01dabac531c2615e0e9af5f4ac Author: Rhys Kidd Date: Sun Jan 20 21:31:19 2019 -0500 xv: Avoid shadowed declaration of 'int ret' in NVPutImage Warning reported by gcc 8.2: nouveau_xv.c: In function ‘NVPutImage’: nouveau_xv.c:1369:7: warning: declaration of ‘ret’ shadows a previous local [-Wshadow] int ret = BadImplementation; ^~~ nouveau_xv.c:1073:6: note: shadowed declaration is here int ret, i; ^~~ Fixes: a50bba6 ("xv: misc cleanups") Cc: Ben Skeggs Signed-off-by: Rhys Kidd commit 22dd49f60be54c5649a9e80c87c9bfc99e2974b8 Author: Rhys Kidd Date: Sun Jan 20 21:31:18 2019 -0500 xv: Avoid shadowed declaration of 'int i' in NVPutImage int i is accessed outside immediate scope so leave declaration at the highest common scope level: 1073: int ret, i; ... // Highest common scope ... 1193: if (newTTSize <= destination_buffer->size) { ... // Used in this scope ... 1248: } else { ... // Used in this scope ... 1316: } // Not used in this scope Warning reported by gcc 8.2: nouveau_xv.c: In function ‘NVPutImage’: nouveau_xv.c:1195:7: warning: declaration of ‘i’ shadows a previous local [-Wshadow] int i = 0; ^ nouveau_xv.c:1073:11: note: shadowed declaration is here int ret, i; ^ Signed-off-by: Rhys Kidd commit d7ba24fb6e4fce43adc3c73369c5d1035ae080a9 Author: Rhys Kidd Date: Sun Jan 20 19:20:08 2019 -0500 wfb: Fix missing init function decls behind FB_ACCESS_WRAPPER Fixes warning with xserver 1.20 and gcc 8.2: nv_driver.c:1443:9: warning: implicit declaration of function ‘wfbScreenInit’; did you mean ‘fbScreenInit’? [-Wimplicit-function-declaration] ret = wfbScreenInit(pScreen, FBStart, pScrn->virtualX, ^~~~~~~~~~~~~ fbScreenInit (See xserver 706e6d9cd074da606016ed4ecff51e9c2a822087) Signed-off-by: Rhys Kidd commit dbba3246c989a88f8ba5b0c906af58779bef0cdd Author: Rhys Kidd Date: Sun Jan 20 14:50:35 2019 -0500 xv: Silence build warning regarding const qualifier Silences warning with gcc 8.2: nouveau_xv.c: In function ‘NVInitVideo’: nouveau_xv.c:2247:68: warning: passing argument 2 of ‘vlCreateAdaptorXvMC’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] adaptorsXvMC[0] = vlCreateAdaptorXvMC(pScreen, textureAdaptor[0]->name); ~~~~~~~~~~~~~~~~~^~~~~~ In file included from nouveau_xv.c:42: vl_hwmc.h:6:63: note: expected ‘char *’ but argument is of type ‘const char *’ XF86MCAdaptorPtr vlCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name); ~~~~~~^~~~~~~~~~~~~~~ Signed-off-by: Rhys Kidd Reviewed-by: Ilia Mirkin commit cc284803fd75e0e340a5481342e0d0f7a5d7fa15 Author: Rhys Kidd Date: Sat Jan 19 15:45:36 2019 -0500 Check for xf86CursorResetCursor() If it's available, xorg-server calls it on each mode configuration change. It does what xf86_reload_cursors does (and more), so we don't need to call the latter anymore. Avoids gcc 8.2 warning: drmmode_display.c: In function ‘drmmode_set_mode_major’: drmmode_display.c:525:2: warning: ‘xf86_reload_cursors’ is deprecated [-Wdeprecated-declarations] xf86_reload_cursors(crtc->scrn->pScreen); ^~~~~~~~~~~~~~~~~~~ In file included from nv_type.h:10, from nv_include.h:69, from drmmode_display.c:36: /usr/include/xorg/xf86Crtc.h:1068:37: note: declared here static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {} ^~~~~~~~~~~~~~~~~~~ (Ported from radeon commit d670c5c9851b4eff21c845d26c7d7e4eb5ee0fa9) Signed-off-by: Rhys Kidd commit a4283f7fee5b0376f62ba305a2a47ee3dc5a822f Author: Ilia Mirkin Date: Fri Nov 10 23:28:08 2017 -0500 drmmode: update logic for dynamic connectors, paths, and tiles This largely copies the code from modesetting with minor adjustments. Signed-off-by: Ilia Mirkin commit 8dd1118369460e03ab4963987901dc9e13a2d53d Author: Mario Kleiner Date: Tue Jun 12 17:58:06 2018 +0200 Fix colormap handling at screen depth 30. (v2) The various clut handling functions like a setup consistent with the x-screen color depth. Otherwise we observe improper sampling in the gamma tables at depth 30. Tested at depths 16, 24 and 30 and tested at depths 24 and 30 that xgamma and gamma table animations work, and with measurement equipment to make sure identity gamma ramps actually are identity mappings at the output. v2: Also deal with X-Server 1.19 and earlier, which as of v1.19.6 lack a fix to color palette handling and can not deal with depths/bpc > 24/8 bpc. On < 1.20 we skip xf86HandleColormaps() setup at > 8 bpc. This disables color palette handling on such servers at > 8 bpc, but still keeps RandR gamma table handling intact. Tested on 1.19.6 and 1.20.0 to do the right thing. Signed-off-by: Mario Kleiner Signed-off-by: Ilia Mirkin commit c9ce4b8e86525b6e0ecc814b2c5ebb242fb1f107 Author: Ilia Mirkin Date: Sun Dec 9 13:40:55 2018 -0500 drmmode: provide better error when failing to set gamma Signed-off-by: Ilia Mirkin commit ac8f7b949e50d96f281b09f7fe96c92ea4d178ec Author: Ilia Mirkin Date: Fri Feb 9 23:00:27 2018 -0500 dri3: don't check permissions on render node The permission check fails if udev sets the render node to 0666 but leaves the card at 0660, as is done in at least udev-236. Signed-off-by: Ilia Mirkin commit 6e2b4bed7b226dce262c7e14f72a29b003791be8 Author: Ilia Mirkin Date: Sun Feb 4 13:50:29 2018 -0500 nv50/xv: add support for depth 30 xv output Ostensibly it should probably be looking at the pixmap format. However it's always the window pixmap, so we can assume it's what we expect. Signed-off-by: Ilia Mirkin commit ea83b9bd8c88dad67e6494031f1f65eed823b6f1 Author: Ilia Mirkin Date: Sun Dec 31 02:22:27 2017 -0500 dri3: remove bogus condition for creating pixmap Not clear what the depth % 8 was trying to protect against, but it was breaking 30bpp visuals with DRI3. Add it in to ensure that bitsPerPixel % 8 is 0, since there is plenty of bpp/8 math in the driver. Signed-off-by: Ilia Mirkin commit 048baf53872f2f93628f2c8637ec832fb4006057 Author: Ilia Mirkin Date: Sun Dec 10 23:40:51 2017 -0500 man: remove reference to glamor under DRI option GLAMOR backend was removed a while ago, but the help text stayed on. Reported-by: Jason Zaman Signed-off-by: Ilia Mirkin commit 69aecdd305defdd014bc92b82acc6000988511cf Author: Adam Jackson Date: Tue Jun 13 09:23:42 2017 -0400 modesetting: Validate the atom for enum properties The client could have said anything here, and if what they said doesn't actually name an atom NameForAtom() will return NULL, and strcmp() will be unhappy about that. [copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc] Signed-off-by: Adam Jackson commit a7c190e0c230ed2d5e047ed6aba12d71a4866950 Author: Lyude Date: Fri Apr 21 14:41:17 2017 -0400 Bump version to 1.0.15 Signed-off-by: Lyude commit 3047e99a641d2b8720371aae292750206f5e91fc Author: Ben Skeggs Date: Thu Apr 20 15:57:33 2017 +1000 fix null pointer deref when building against >=libdrm 2.4.78 A new pointer got added to drmEventContext. As a result of us both: - Setting drmEventContext.version to "latest" AND - Not zeroing the struct We end up thwarting libdrm's compatibility checks, resulting in libdrm choosing to call through an invalid pointer. Fix this by zeroing the struct. Signed-off-by: Ben Skeggs commit e9418e434311336e905b70553a5ed740838d90ad Author: Mariusz Bialonczyk Date: Wed Mar 29 22:07:50 2017 +0200 Do not register hotplug without RandR When using Xinerama, RandR is automatically disabled, and calling RR routines will trigger an assert() because the RR keys/resources are not set, leading to an Xserver abort. Hotplug makes little sense without RandR, so no need to install a udev monitor if RandR is not available. Ported from xf86-video-intel commit 1a489142c8e6a4828348cc9afbd0f430d3b1e2d8, original work by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98383 Signed-off-by: Mariusz Bialonczyk Acked-by: Ilia Mirkin commit e472b47d15634a864c8c981ed588d882aceaf26b Author: Ilia Mirkin Date: Tue Mar 21 21:25:33 2017 -0400 Add Pascal family support, identical to Maxwell Signed-off-by: Ilia Mirkin Tested-by: Lyude commit b71de83b7fae0abeb311251e6144294d319062cf Author: Lyude Date: Tue Mar 7 18:44:43 2017 -0500 Bump version to 1.0.14 Signed-off-by: Lyude commit 924083938c8f209d8f6ff472caf8692a644f7e78 Author: Lyude Date: Fri Mar 3 18:27:42 2017 -0500 Consider CRTCs disabled when DPMS is off It turns out there's a difference in X between a CRTC being "disabled" and simply having it's DPMS turned off. This is problematic though, because if DPMS is turned off you can't really use the CRTC as a normal CRTC anyway since page flipping and vblanks will be non-functional. As a result, we've been considering DPMS-on CRTCs as enabled and attempt to perform pageflips, vblank waits, etc. on them which inevitably fails. and usually breaks the display the first time any of the CRTCs have their DPMS turned on. This was a problem that didn't really show itself until kernel 4.10 when atomic modesetting was added which caused nouveau to stop trying to fulfill pageflips and vblank waits on disabled CRTCs. I'm not sure how pageflipping disabled CRTCs ever worked in the first place, but since not doing so is the proper behavior anyway I haven't investigated any further. So, copy the ms_crtc_on() function from the modesetting driver and add it here as drmmode_crtc_on(), then use that in all of the places where we should be checking for both DPMS off and disabled CRTCs. This fixes issues with the X ceasing to function (usually) after the first time a CRTC has it's DPMS turned on. Reproduction recipe: - Load up gnome-shell on a machine - Wait for the display to timeout from inactivity and turn itself off - Shake the cursor or press something on the keyboard. Chances are the monitor will come back on, but the display remains black until the next time the X server is restarted. Signed-off-by: Lyude Reviewed-by: Adam Jackson commit 1516d35b06c9cda399bef01d992805d6e63dcbae Author: Ilia Mirkin Date: Sun Oct 16 15:10:10 2016 -0400 recognize and accelerate GM20x Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit b00b73c3aa0da1d4cee5c9f580ca65a7bd344e0f Author: Ilia Mirkin Date: Mon Oct 17 23:23:41 2016 -0400 copy: add maxwell/pascal copy engine classes Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit 5a3ada3b0ff3d89441faf35d331bb8b6cf5e51c0 Author: Ilia Mirkin Date: Sun Oct 16 15:03:35 2016 -0400 nvc0: refactor TIC uploads to allow different specifics per generation This flips GM10x to using the updated format, which is what I tested with. However GM20x and GP10x also use this TIC format. Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit 514441f32c5b948ce87668234ab9f01e8ec28dac Author: Ilia Mirkin Date: Sun Oct 16 12:42:18 2016 -0400 nvc0: rename BEGIN_IMC0 to IMMED_NVC0 For consistency with mesa. It wasn't used anywhere previously. Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit 4459c04a6bc208924fac8082920f6786538bc5cd Author: Ilia Mirkin Date: Sun Oct 16 12:38:38 2016 -0400 nvc0: make use of the new hwdefs for TEX_CB_INDEX Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit ea6fd12ea059c6af832bd2180b26d75e00d4ea71 Author: Ilia Mirkin Date: Sun Oct 16 12:38:02 2016 -0400 hwdefs: update nvc0_3d, add gm107_texture for new TIC format These are copied directly from the mesa repository. Signed-off-by: Ilia Mirkin Acked-by: Samuel Pitoiset commit a24ded627e42d453546c553d609edc073f59cd57 Author: Ilia Mirkin Date: Thu Sep 25 20:15:51 2014 -0400 exa: add GM10x acceleration support rendercheck -f a8r8g8b8 passes as much as on a GK208, and xv appears to work. Very lightly tested. Instead of sticking coordinates into pushbufs, the vertex shader is modified to read them from a constbuf, indexed by vertex id. This approach could be used for all nvc0 generations, but I didn't want to rock the boat. Signed-off-by: Ilia Mirkin Reviewed-by: Samuel Pitoiset commit e6479845ec0db20dc733c621b7967b751840a552 Author: Ilia Mirkin Date: Tue Sep 20 00:31:06 2016 -0400 Bump version to 1.0.13 - Fixes for reverse prime offload - ABI 23 support for Xorg 1.19 Signed-off-by: Ilia Mirkin Date: Tue Jul 19 08:29:40 2016 -0700 Use NotifyFd for drm and udev fds NotifyFd is available after API 22, and must be used after API 23. Signed-off-by: Keith Packard commit a964931e8dc4e06c27749edb4993a656dc261d75 Author: Adam Jackson Date: Tue Jul 19 10:03:56 2016 -0400 Adapt Block/WakeupHandler signature for ABI 23 Signed-off-by: Adam Jackson commit 12f77348e7a9579b167b41228dec9e6f97b74de8 Author: Hans de Goede Date: Fri Jun 3 14:46:10 2016 +0200 Properly cleanup fb for reverse-prime-offload drmmode_set_scanout_pixmap(pix) adds drmmod->fb_id through a call to drmmode_xf86crtc_resize(), but on a subsequent drmmode_set_scanout_pixmap(NULL) it would not remove the fb. This keeps the crtc marked as busy, which causes the dgpu to not being able to runtime suspend, after an output attached to the dgpu has been used once. Which causes burning through an additional 10W of power and the laptop to run quite hot. This commit adds the missing remove fb call, allowing the dgpu to runtime suspend after an external monitor has been plugged into the laptop. Signed-off-by: Hans de Goede Signed-off-by: Ben Skeggs commit 1da8a937be19e41c51a3d516bd98cee988bca44b Author: Ben Skeggs Date: Thu Jun 2 11:23:53 2016 +1000 exa/nv50-: fix some potential incomplete pushes I don't think these should actually be able to happen, given that we already reject the unknown formats in the Check() functions. But, just in case... Signed-off-by: Ben Skeggs commit bb57f9af9d179af0962456dca369953521ea8c2c Author: Ben Skeggs Date: Thu Jun 2 10:17:58 2016 +1000 fix use of out-of-scope data Reported by Coverity. Signed-off-by: Ben Skeggs commit b824d36c28124955eda4aced5e637aa75eea4d6c Author: Ilia Mirkin Date: Wed Jan 13 11:55:06 2016 -0500 HAS_DIRTYTRACKING_ROTATION also supports multiple CRTCs A port of commit ff9a6b6f from xf86-video-ati. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93670 Reported-by: Thomas D. Signed-off-by: Ilia Mirkin commit b18bc036bf9997ea65f5cbd824fd057931e604fe Author: Ben Skeggs Date: Tue Dec 8 15:52:25 2015 +1000 Bump version to 1.0.12 Various random fixes have been pending for a long while now... Signed-off-by: Ben Skeggs commit 6e6d8ac1c7b4ee047a7b40b95dea1e65a7c3211a Author: Mario Kleiner Date: Sun Jun 28 02:33:49 2015 +0200 Take shift in crtc positions for ZaphodHeads configs into account. In multi-x-screen ZaphodHeads configurations, there isn't a one-to-one mapping of kernel provided drmmode crtc index to the index of the corresponding xf86Crtc inside the xf86CrtcConfig crtc array anymore, ie. for kernel provided drmmode->mode_res->crtcs[i], the i'th crtc won't correspond to the xf86Crtc in the i'th slot of the x-screens xf86CrtcConfig anymore, once ZaphodHeads has only selected a subset of all crtcs of a graphics card for a given x-screen, instead of all crtcs. This breaks the mapping of bit positions in the bit masks returned in kencoder->possible_crtcs and kencoder->possible_clones. A 1 bit in position i of those masks allows use of the kernels i'th crtc for the given kencoder. The X-Servers dix code checks those bit masks for valid xf86Output -> xf86Crtc assignments, assuming that the i'th slot xf86CrtcConfigPtr config->crtc[i] corresponds to bit i in the xf86Output->possibe_crtcs bitmask, and bails if the bitmask doesn't allow the specified assignment of crtc to output. If ZaphodHeads breaks the assumption of bit i <-> crtc slot i this ends in failure. Take this shift of crtc index positions wrt. encoder bitmask bit positions into account by bit-shifting positions accordingly when assigning encoder->possible_crtcs to output->possible_crtcs, so the proper indices match up again for validation by the dix. This problem wasn't apparent last year when testing the ZaphodHeads support on some Kepler cards, as apparently the encoder->possible_crtcs bitmasks returned for those cards by the kernel just had all 4 lsb bits set for all tested encoders/output, so each of the cards 4 crtcs could go with each output and things worked by chance. The current code breaks, e.g., on 2010 MacBookPro with nv50, where one crtc is hardwired to the internal lvds panel, and one crtc is hardwired to the external DP connector, resulting in a failure where dual-display on single-x-screen works fine, but assigning each output to a separate x-screen via ZaphodHeads fails due to the mismatched encoder->possible_crtcs bitmasks. This patch fixes the problem. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 1ff13a922535924681b91452235b017e43a4c6f6 Author: Ilia Mirkin Date: Sun Sep 13 15:29:15 2015 -0400 fix build after glamor removal Signed-off-by: Ilia Mirkin commit 3bb943b33bbe8e593afc00d13fe867dd7a708c3c Author: Ilia Mirkin Date: Thu Aug 21 20:36:41 2014 -0400 xv: use correct max width/height settings Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70931 Signed-off-by: Ilia Mirkin commit 3e2e0faa2ee1cce9c1bb5c7ad80d0592460f3edc Author: Ilia Mirkin Date: Sat Jul 11 17:16:27 2015 -0400 remove maxwell GM10x support for now There is no EXA acceleration, and now no GLAMOR either. User is better off with modesetting until EXA makes an appearance. Signed-off-by: Ilia Mirkin commit 1f8b2b348526d94e9bde4a285f331a4934c11078 Author: Ilia Mirkin Date: Sat Jul 11 17:08:52 2015 -0400 glamor: remove If you want glamor, just use modesetting instead. It's hooked up incorrectly in nouveau, and there doesn't seem to be any point in fixing it when the modesetting driver does it all properly. Signed-off-by: Ilia Mirkin commit 6296145654b78518f3299bb5887f224f0d3810fd Author: Mario Kleiner Date: Wed Jul 29 14:39:02 2015 +0200 Add Option "DRI" to allow selection of maximum DRI level. (v2) Allow user to select the maximum level of DRI implementation to use, DRI2 or DRI3. exa accel supports both DRI2 and, if the kernel supports rendernodes, also DRI3. However, DRI3 still seems to have some bugs on current implementations, and additionally it doesn't work well at all for X-Servers older than 1.16.3 due to X-Server bugs. Therefore we default to DRI2 on exa, but allow the user to enable DRI3 with this new option. nouveau's glamor accel backend currently doesn't work under DRI2 at all, so we continue to use DRI3 whenever it is supported and ignore this new option for now. Also add a bit more output about status of Present and DRI3 to aid debugging. Note: This was originally meant to be a boolean parameter, to just select between DRI3 on and off, but changed here to a DRI level to make it consistent with the same option in the released Intel-ddx. v2: Use fixed up Bool return type of nouveau_present_init(). Signed-off-by: Mario Kleiner Cc: Ilia Mirkin Cc: Emil Velikov Cc: Martin Peres Cc: Ben Skeggs Reviewed-by: Ilia Mirkin commit 0deb1fcc6d1099db698ff8c512a4884708a458ec Author: Mario Kleiner Date: Wed Jul 29 14:39:01 2015 +0200 present: Fixup return type of nouveau_present_init() Make it a Bool consistently, as declared in header. Reported-by: Ilia Mirkin Signed-off-by: Mario Kleiner Reviewed-by: Ilia Mirkin commit 5212dbd7e5eba35fdd6578b30f5b0c8c8543081b Author: Ilia Mirkin Date: Tue Jul 14 19:23:01 2015 -0400 Avoid build fail without COMPOSITE Reviewed-by: Dave Airlie commit fdc528306e4018b314f2efcb2be4e37672bddd75 Author: Vadim Rutkovsky Date: Thu Jul 9 23:23:37 2015 +0200 Adapt to new dirty tracking api Mirrors commit b6d871bf2 (radeon: adopt for new X server dirty tracking APIs.) in xf86-video-ati. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91284 commit dfd827cefb940f46b18dc77c129f0a603c7c95fa Author: Samuel Pitoiset Date: Wed May 20 17:08:58 2015 +0200 fix a wrong use of a logical operator in drmmode_output_dpms() This is probably a typo error which has been introduced in 2009... This fixes the following warning detected by Clang : drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (props && (props->flags && DRM_MODE_PROP_ENUM)) { Signed-off-by: Samuel Pitoiset Reviewed-by: Dave Airlie commit 27234dbe00caf6dfd4efb24fc7bbc026fa0134fc Author: Ilia Mirkin Date: Wed May 27 20:26:42 2015 -0400 nv50/exa: add comments showing the code that makes up the programs As decoded by envydis. Perhaps these should move into separate files similar to nvc0, but this seems like a simple intermediate solution. Signed-off-by: Ilia Mirkin commit 08ef36dc6766080f173ae2b7e660b3182cab9f2d Author: Ilia Mirkin Date: Wed May 20 18:36:17 2015 -0400 older hardware prefers copy to clear, so use that Doing a solid copy of 0, or a clear, has the same effect. This is a partial revert of commit 5439a9905eab8c. Pre-nv50 hardware succeeds with copies more often. Signed-off-by: Ilia Mirkin commit 278ad73475bd137eac8a49ec7a22406bfc2867e7 Author: Ilia Mirkin Date: Tue May 19 16:26:16 2015 -0400 nv04-nv40: don't attempt to do 32-bit shifts A 32-bit shift is a no-op, which will also make the new planemask get or'd with ~0, thus negating the usefulness of the subsequent planemask != ~0 check. Only do this if it's a less-than-32-bit per pixel format, in which case it will have the desired effect of setting the high bits. Signed-off-by: Ilia Mirkin Reviewed-by: Martin Peres commit 7583471e1fe181dc7c26b7d0a0d16f70eb10dd21 Author: Ilia Mirkin Date: Tue May 19 16:11:17 2015 -0400 Check before trying a solid fill Pre-nv50 has all sorts of funny requirements for non-copy alu operations, and will bail out of solid fills left and right. Account for that case and fall back to the memset. Reported-by: Andrew Randrianasulu Signed-off-by: Ilia Mirkin Reviewed-by: Martin Peres commit 212fc5354ed60ba282d5eabf468c0e2dd0d0afe6 Author: Ilia Mirkin Date: Mon Mar 23 20:05:23 2015 -0400 nv50: explicitly disable ZETA buffer Signed-off-by: Ilia Mirkin commit 734b8404c0a1fa9ce8ee62a0d4cc5baae7c8fcdf Author: Ilia Mirkin Date: Sat Mar 21 11:46:35 2015 -0400 use defined method names where available Signed-off-by: Ilia Mirkin commit 5439a9905eab8c8d0f86e9963df6c893633bdbfd Author: Maarten Lankhorst Date: Mon Mar 23 19:41:38 2015 +0100 Actually do a clear instead of doing a bogus copy. Oops! commit f0fdc156039eaa79fb1ad82fcc6437f2432306c6 Author: Maarten Lankhorst Date: Sat Mar 21 22:30:10 2015 +0100 Try using EXA ops harder in drmmode_fbcon_copy fallback The memcpy in the fallback path fails with SIGBUS on GK20A because this memory is not coherent, try to use a solid fill instead. commit 7319b54291d59e1cd3cbe4f39ea8cc6dc8bf45bc Author: Maarten Lankhorst Date: Fri Mar 20 23:24:50 2015 +0100 Simplify nouveau_allocate_surface's pitch calculation. Judging from previous commits all linear buffers should have a 256 byte alignment. commit 91e51a7571e6e8cb9338fc168f817f56438b1901 Author: Maarten Lankhorst Date: Fri Mar 20 23:17:13 2015 +0100 Use drmGetRenderDeviceNameFromFd to obtain the dri3 node. commit d29d8baad4d845ec9d3d1d1bc8d1c1e1f6f6f086 Author: Maarten Lankhorst Date: Sat Mar 14 18:00:00 2015 +0100 Use the correct class and shader ops for GK20A. Signed-off-by: Maarten Lankhorst commit 6829d4c672fc05f4d3d993ac1bfde21d4b6c1200 Author: Maarten Lankhorst Date: Sat Mar 14 11:58:12 2015 +0100 Make the ddx load with platform devices Signed-off-by: Maarten Lankhorst commit 3fb97d78202213c1221a1d3ad8a5cebda78fdf44 Author: Maarten Lankhorst Date: Thu Oct 23 09:29:14 2014 +0200 fix null pointer deref commit 90ba0bb6a371a5beebdf6d363bcd73659b7c9f1f Author: Maarten Lankhorst Date: Thu Oct 23 08:25:01 2014 +0200 check memory allocation in nouveau_glamor_set_shared_pixmap_backing As reported by Roy Spliet. commit 4dfa13c77a1f6cee1affea05b5f3a0b26827d366 Author: Maarten Lankhorst Date: Thu Oct 23 08:21:55 2014 +0200 rework initialization to prevent some crashes commit 485902e61b18aff864226db62ba10399aab40128 Author: Maarten Lankhorst Date: Wed Oct 22 15:52:22 2014 +0200 fix !DRI3 case commit 79d438ec4d23280a242d36c2d81f2f43f6e90ada Author: Maarten Lankhorst Date: Wed Oct 22 15:42:55 2014 +0200 fix crash in nouveau_glamor_set_shared_pixmap_backing commit 217f6577afe44b10f7f8e066eaf55419fb0f5ee1 Author: Maarten Lankhorst Date: Wed Oct 22 13:16:33 2014 +0200 move down call to nouveau_present_init until after fb init. commit 241e7289f25a342a457952b9b0e539c2f0b81d99 Author: Maarten Lankhorst Date: Wed Oct 22 11:04:16 2014 +0200 enable dri3 support without glamor commit 762b22f5a2b9deed1c6b18d7098f8fddf2f4b759 Author: Ilia Mirkin Date: Tue Sep 23 21:44:12 2014 -0400 kepler: remove unnecessary texbars, add live-only tex for nvf0 Signed-off-by: Ilia Mirkin commit ce9d6e165cd810f06d158e3cfbb4b9f14b060ded Author: Ilia Mirkin Date: Tue Sep 23 21:37:46 2014 -0400 allow path to envyas binary to be specified Signed-off-by: Ilia Mirkin commit 02c1aee91ae22b58e777716ffd38397f9df0a087 Author: Ilia Mirkin Date: Thu Sep 4 15:27:53 2014 -0400 copy: don't bother trying to create copy on pre-nva3 Only the NVA3/5/8/F tesla chips have a copy engine. Don't bother trying to create one on earlier tesla chips (and thus printing an error on failure). Signed-off-by: Ilia Mirkin commit 3cd4c8494c296c7583dfa7f0823a272c9e932e03 Author: Mario Kleiner Date: Thu Aug 28 03:57:48 2014 +0200 Bump version to 1.0.11 for release. Highlights: - Support for server managed fd's. - Glamor support. - Maxwell support. - DRI3 and initial Present support. - vsync'ed kms pageflip performance fixes when running on Linux 3.13+ - Multi-display vsync, vblank, swap scheduling, timestamping fixes. - Multi x-screen support fixes. - ZaphodHead support on for multiple outputs per x-screen. - EXA nv-10 fixes. - Enable sync of swaps to vblank by default (Option GLXVblank "on"). - Disable pseudo-triplebuffering by default (Option SwapLimit "1"). Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 6d49f3f7aaaec872b6f9841f744a0bf09cc98492 Author: Mario Kleiner Date: Thu Aug 28 03:49:55 2014 +0200 dri2: Set default SwapLimit to 1 for double-buffering. This used to be 2 for pseudo-triplebuffering on XOrg 1.12+. However, it caused problems like unthrottled swapping at up to twice the video refresh rate for redirected windows under desktop composition, which can't be easily fixed under dri2. Default to double-buffering. Users can override this, but dri3 provides better solutions for this. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 10729a442be3cf018c5806c95ec4218977917ef3 Author: Mario Kleiner Date: Mon Aug 18 09:53:27 2014 +0200 xv/dri2/dri3: Switch to optimized crtc selection for drawables. Make crtc selection consistent with ati and intel ddx. Pick the crtc to use for vblank events, swap scheduling and kms-pageflip completion events as the one with maximum pixel area intersection between its viewport and the drawable. If multiple crtc's viewports display the same amount of area of a drawable, select the crtc whose output is the designated "primary output" for the x-screen. The latter allows, e.g., in a clone display setup, to select the important output on which tearing should be minimized. The former makes sure to minimize or avoid tearing on the display which shows the largest part of the drawable. This method is transplanted from the ati ddx. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit be96a5a62df5e1f286690311a6bc4df4f2a99e57 Author: Mario Kleiner Date: Sun Aug 17 02:30:36 2014 +0200 Add file "compile" to .gitignore Some auto-generated file by new make systems to deal with some old compilers. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 16c885ce9c7bebcfa1252a5d500956dd5f551043 Author: Mario Kleiner Date: Tue Aug 12 11:08:24 2014 +0200 Fix event handling on multi-x-screen configs. Only register the wakeup handler and event socket once per card fd and server generation, as the fd and device file is shared between all x-screens for a given card during a given server generation. Without this fix, vblank and kms-pageflip completion event processing don't work properly, as the server doesn't kick the wakeup handler for gpu events, and therefore the desktop will freeze, unless the user manually kicks the wakeup handler by moving the mouse or hitting the keyboard. Add proper reference counting and checks to make it so. This fix is derived from a similar and proven fix in the ati ddx for the same problem. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 7eab6806927ea8938b9bd143d1702e87fde2f2cc Author: Mario Kleiner Date: Wed Aug 13 06:48:10 2014 +0200 Make new ZaphodHeads work across server regenerations. Reset the mask of already assigned crtc's at start of each new server generation. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 6ad053788e804f3a8bd36ee3653ec95e7df62623 Author: Mario Kleiner Date: Wed Aug 6 07:37:32 2014 +0200 dri2 and xv: Fix NVxxSyncToVBlank() for multi-x-screen's. Use helper function drmmode_head() to choose proper hw-crtc to sync to. Fixes xv blits, and dri2 Copy-Swaps. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 17de663a71bcad6f69414eb6bc6bf9b76a6bf5f4 Author: Ben Skeggs Date: Mon Aug 11 09:48:42 2014 +1000 fix glamor header check Signed-off-by: Ben Skeggs commit 64ca88570b71289a019a2d130b1a30dc474ef52d Author: Ben Skeggs Date: Mon Aug 11 08:59:30 2014 +1000 present: use drmmode_head() where it's appropriate Signed-off-by: Ben Skeggs commit 6e71bdf5a9da15c60694fa8543243e37a32c5faf Author: Mario Kleiner Date: Mon Jun 23 11:25:41 2014 +0200 Allow/Fix use of multiple ZaphodHead outputs per x-screen. Defining multiple ZaphodHead outputs per x-screen in a multiple x-screen's per gpu configuration caused all outputs except one per x-screen to go dark, because there was a fixed mapping x-screen number -> crtc number, limiting the number of crtc's per x-screen to one. On a ZaphodHead's setup, be more clever and assign as many crtc's to a given x-screen as there are ZaphodHeads defined for that screen, assuming there are enough unused crtc's available. Tested on a triple display setup with different combos of one, two or three ZaphodHeads per one, two or three x-screens. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit fcf91a275e96f14e49a93dc3f8dd6798cf7d98f3 Author: Mario Kleiner Date: Mon Jun 23 11:13:57 2014 +0200 dri2: Fix drmWaitVblank on multi-x-screen configs. Old mapping of xf86Crtc -> display head index was too simple and only worked on a single x-screen config. Introduce a new helper function drmmode_hw_head_index() which returns proper mapping also for multi x-screens per gpu and ZaphodHeads setups and other non-standard multi- display configurations. Tested on triple-head setup with various ZaphodHead and server layout combos. This helper will be also needed for dri3/present code. Signed-off-by: Mario Kleiner commit 29572e44c24613be9dec0c98ff2731e46ce6203b Author: Ilia Mirkin Date: Sun Aug 10 02:25:15 2014 -0400 exa/nv10: src ops should use the SF macro Doesn't actually end up mattering. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 35e17905e1c54558059f6b72b8594a3377f1a57c Author: Ilia Mirkin Date: Sun Aug 10 02:25:14 2014 -0400 exa/nv10: fix blend function setup to check the correct mask Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit dfac18c67a17782a0263daf8cb4ee487374abd2c Author: Ilia Mirkin Date: Sun Aug 10 02:25:13 2014 -0400 exa/nv10: use color 0 when the pict format has no RGB component Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit ff7010e06b6da0fe27143b47b8a4ffd2f12894b7 Author: Ilia Mirkin Date: Sun Aug 10 02:25:12 2014 -0400 exa/nv10: use same clip settings as mesa driver The higher 0x800 was getting overwritten by the 0x7ff anyways, so it wasn't doing any good. The mesa driver just uses 0x800 for the low portion and doesn't set the 8 bit in the higher portion, so do the same thing here. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit edd1608c397ebcf487b84948031f7807178e5e4d Author: Emil Velikov Date: Tue Jul 1 22:31:47 2014 +0100 xorg_list: define the xorg_list* symbols ...when building against pre 1.12 x. The build will fail as earlier versions of X were missing the xorg_ prefix of the symbols - struct and util functions. Reported-by: Pali Rohár Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit f6c1c755d8230494c8115e2c7899a85663f5c176 Author: Ben Skeggs Date: Tue Jul 1 12:56:49 2014 +1000 fix a harmless typo fdo#80738 Reported-by: Paulo Sérgio Travaglia Signed-off-by: Ben Skeggs commit 096fb1ebc10b14ba1b747832efe378369bcf44e6 Author: Mario Kleiner Date: Mon May 26 05:39:50 2014 +0200 dri2: Add support for handling more than 2 crtc's Need to use the DRM_VBLANK_HIGH_CRTC bits to allow selecting crtc's with id > 1 on latest gpu's with up to four display engines. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 4771ff5c668047a2dc56e4c6131175eed837e757 Author: Marcin Slusarz Date: Sun Jun 22 01:32:42 2014 +0200 present: build only when glamor is enabled nouveau_present_flip_exec references glamor_fd_from_pixmap, which do not exist when glamor is disabled Signed-off-by: Marcin Slusarz Signed-off-by: Ben Skeggs commit 41c1c4ee867753422d6486f13bf20b45905a5dd5 Author: Marcin Slusarz Date: Sun Jun 22 01:31:46 2014 +0200 glamor: fix build without glamor.h xorg-server can be built without glamor, which leads to: CC nouveau_xv.lo In file included from nouveau_xv.c:41:0: nouveau_glamor.h:12:20: fatal error: glamor.h: No such file or directory compilation terminated. Signed-off-by: Marcin Slusarz Signed-off-by: Ben Skeggs commit f0fa8313714c2a5b16e784b257b5ff79da3a443b Author: Mario Kleiner Date: Thu Jun 19 17:11:34 2014 +0200 dri2: Enable sync of bufferswaps to Vblank by default. Make this consistent with other drivers default behaviour. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 02d7e647ce3a4a5d48c4ee94c94bebcac2d4827d Author: Mario Kleiner Date: Sat Jun 21 01:26:16 2014 +0200 dri2: Fix kms pageflip completion timestamping. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 4d92001ebe6bec8c5eaab8156421e62a7e4dedc8 Author: Mario Kleiner Date: Fri Mar 14 18:27:53 2014 +0100 Add kernel async_flip cap detection. Part II of double-sync fix. Query if kernel supports the async_flip cap, thereby needs the new sync behavior. Linux 3.13+ nouveau-kms have this cap and need this fix. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 54dfbb2fed393b65d846e6ed9672acb47e0f19de Author: Mario Kleiner Date: Fri Mar 14 18:23:04 2014 +0100 dri2: Fix double-sync of pageflips on Linux 3.13+ - Part I Linux 3.13 and later sync kms pageflips to vblank in the kms driver, so we must not emit a sync to vblank pushbuf in the ddx on such kernels, or maximum framerate will be cut into half! A sync-to-vblank-pushbuf is emitted for copyswaps as in the past, also for older kernels which don't support async_pageflip's and don't sync by themselves. This adds the implementation, but not the detection logic for async_pageflip support in the kernel. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 303402e00d55b5296311738184cd61f4aadab74d Author: Mario Kleiner Date: Sat Jun 21 00:09:39 2014 +0200 Fix nouveau_copy_init() Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 65a70c4edd1f0df808a3a4dea6e8c9846cc7c920 Author: Ben Skeggs Date: Fri Jun 20 16:57:18 2014 +1000 another build fix... commit 882ebb4000803f6025e1bb3213a31b19f6d1a2c6 Author: Ben Skeggs Date: Mon Nov 18 14:42:02 2013 +1000 present: initial support Until glamor grows its own implementation. Signed-off-by: Ben Skeggs commit 0d94f32fce2759c4b0f4d22b99f3ced09c2aa5a0 Author: Ben Skeggs Date: Fri Jun 20 09:47:39 2014 +1000 kms: implement a more generic event mechanism Present wants to use this too. Signed-off-by: Ben Skeggs commit 97feb3b2104287eb385ffba8329f304e2808d808 Author: Ben Skeggs Date: Fri Jun 20 09:29:08 2014 +1000 dri2: move page flip handling out of drmmode Nothing to see here... This is to (hopefully) avoid busting DRI2 while implementing Present support. Signed-off-by: Ben Skeggs commit 60b876eab3708f1c277027addb5514974452644c Author: Ben Skeggs Date: Fri Jun 20 09:20:37 2014 +1000 dri2: move away from directly touching drmmode on page flips Signed-off-by: Ben Skeggs commit 36dda1341008dd87a6b5459f0616776097d11d9f Author: Ben Skeggs Date: Fri Jun 20 09:04:30 2014 +1000 dri2: shuffle some functions around Nothing to see here... Signed-off-by: Ben Skeggs commit 8bdec8ebd68ba5eaa696d8a666e18774bff3b2ad Author: Ben Skeggs Date: Fri Jun 20 12:37:33 2014 +1000 glamor: fix randr resize Signed-off-by: Ben Skeggs commit 3c45b590a31157abca140096b141aa83fecb671f Author: Ben Skeggs Date: Fri Jun 20 08:28:30 2014 +1000 sync: fix build against DRI3-less server Signed-off-by: Ben Skeggs commit 88ae58d786b0c41148e692dbfe8e2646e7533d9e Author: Ilia Mirkin Date: Thu Jun 19 02:37:45 2014 -0400 update man page with new chips, AccelMethod option Signed-off-by: Ben Skeggs commit 5cb36ba57493bf7edf560bf370c87eff79f1d1a6 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 default to glamor on maxwell We have no RENDER/Xv acceleration in EXA for Maxwell. Signed-off-by: Ben Skeggs commit 81148bb1dbc7007c021c59411d56cb31cfc74ef2 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 glamor: provide dri3 support when enabled Signed-off-by: Ben Skeggs commit 86024ceef015ffe31a204cc5bc6c326a19363ff1 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 glamor: initial support (no dri) Signed-off-by: Ben Skeggs commit fd0ce8839f307693d86c7602dd926ce79e6b777d Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 add support for maxwell, minus Xv/renderaccel More extensive acceleration will be via glamor, at least to begin with. It seems to make sense to jump on the bandwagon now, and deal with any issues that arise before it it becomes the standard for XWayland. Signed-off-by: Ben Skeggs commit 8ad0465e15bfc502abc259e886d6dcb448e0141a Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 50/c0/e0 -> tesla/fermi/kepler Signed-off-by: Ben Skeggs commit 4b138ab18f58c6d459e21dc319615f536c8e69c8 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 merge nv_dma.c into nv_accel_common.c Signed-off-by: Ben Skeggs commit 5c44e6b86195c22e092db5dae06e70208e8b66a0 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 pull copy engine handling into one place, a place that isn't also exa As a side-effect, we now allow Kepler to use async copies too. Signed-off-by: Ben Skeggs commit c375bacbdaeabd0288855c13b4717d0694be9e56 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 exa: move module load into nouveau_exa_init Signed-off-by: Ben Skeggs commit b24cae0bf5db6ece21439d4c6ff3668aed4c78d6 Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 dri2: move "is supported" checks out of nv_driver.c Signed-off-by: Ben Skeggs commit 07c26a0670dd2558acf8e1159f2f68989a7f753d Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 replace NoAccel with AccelMethod in preparation for glamor support Signed-off-by: Ben Skeggs commit e7cf48d9529160f7add2fef72d2e42be9370594a Author: Ben Skeggs Date: Thu Jun 19 14:54:20 2014 +1000 silence a warning Signed-off-by: Ben Skeggs commit 4a18dd74c0cc6e75937eb78347e8ea6c81d1373a Author: Dave Airlie Date: Mon May 26 17:30:24 2014 +1000 autogen: add support for gnome autobuilder Signed-off-by: Dave Airlie commit 8604a741baa5360164a882bd9f3c8474840744db Author: Hans de Goede Date: Fri Apr 11 14:20:43 2014 +0200 Fix building on older servers without xf86platformBus.h Signed-off-by: Hans de Goede commit 0c13843e300d1a9db2bfed18dc1b5df38c5adfdf Author: Hans de Goede Date: Mon Mar 17 17:37:31 2014 +0100 Add support for server managed fds v2 (Martin Peres): - Do not define "NVEntPtr pNVEnt" if not needed to avoid some warnings Signed-off-by: Hans de Goede Signed-off-by: Martin Peres commit 47f08aa6d713da4e6ae9c35ce691e790ffaed09d Author: Hans de Goede Date: Mon Mar 17 17:37:30 2014 +0100 Add a NVOpenNouveauDevice helper function This is a preparation patch for adding support for server managed fds Signed-off-by: Hans de Goede Signed-off-by: Martin Peres commit 480f0998ffed6d9a5c6656dba75182f00fd88a1b Author: Ben Skeggs Date: Thu Nov 7 14:56:48 2013 +1000 bump to 1.0.10 for release Signed-off-by: Ben Skeggs commit 59395c738ebdc21087109075ada67ea8d7783141 Author: Ben Skeggs Date: Thu Nov 7 14:56:06 2013 +1000 recognise GK208 as a Kepler board Signed-off-by: Ben Skeggs commit 03642323a954d0adb11662a98e92dfa20bee9728 Author: Dave Airlie Date: Wed Jul 31 11:19:50 2013 +1000 nouveau: fix build against older servers. Older servers had no GPU support. Signed-off-by: Dave Airlie commit 27323ce68d58fcb82a648ab14abbc99acdc36f44 Author: Dave Airlie Date: Wed Jul 31 11:01:15 2013 +1000 nouveau: add gpu identifier to connector names for secondary gpus this avoids clashes with identifiers from other GPUs. Signed-off-by: Dave Airlie commit 1df177f35a05db505577cdc929e63fde906a704b Author: Dave Airlie Date: Wed Jul 31 10:51:03 2013 +1000 nouveau: fix build on ppc by wrapping immintrin include. Signed-off-by: Dave Airlie commit 300c5a32d79cf507b5fede96710335bcd316eccb Author: Dave Airlie Date: Tue Jul 30 15:28:06 2013 +1000 bump to 1.0.9 for release Signed-off-by: Dave Airlie commit be44e7804862b4c276ed4d4717b1212920f428e6 Author: Dave Airlie Date: Tue Jul 30 15:26:46 2013 +1000 nouveau: fix crash when xinerama is enabled. Signed-off-by: Dave Airlie commit 588252556d1c84bf6793bc22edd48e6650a0f1b9 Author: Dave Airlie Date: Tue Jul 30 15:14:22 2013 +1000 fix make distcheck. add all the nvf0 stuff. Signed-off-by: Dave Airlie commit 29aecda1b5bdb95700894083874492a6d5dfc08a Author: Dave Airlie Date: Tue Jul 30 14:10:51 2013 +1000 drmmode: add support for multi-screen reverse optimus Initial reverse optimus didn't consider multiple screens, so this overhauls the code to use the new X server interface, and allows for multiple outputs on the nvidia to be used with the intel doing the rendering. Signed-off-by: Dave Airlie commit d7ae886260b480da0ea4cad22eb6f7b7d12f07b0 Author: Ilia Mirkin Date: Mon Jul 29 21:03:54 2013 -0400 nouveau: use uppercase for chipset name Right now the log will output e.g. NVaa instead of NVAA, which is how we usually talk about it. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 4492cf90c2a7fe27badf6f3f0f296755a65e1e83 Author: Ilia Mirkin Date: Mon Jul 29 02:40:39 2013 -0400 xv: speed up YV12 -> NV12 conversion using SSE2 if available memcpy() goes from taking 45% to 66% of total function time, which translates to a 30% decrease in NVPutImage runtime. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 08c667b06d28756d0d32f82bd736b0bdf2b4448e Author: Ilia Mirkin Date: Mon Jul 29 02:40:38 2013 -0400 xv: fix last pixel for big-endian machines in YV12 -> NV12 conversion Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 8c1c5d4f212958559132506d51dcfeeb17f60371 Author: Ben Skeggs Date: Wed May 15 21:34:13 2013 +1000 nvf0: implement EXA and XVideo acceleration Signed-off-by: Ben Skeggs commit 779b8d44b5ff84b87b52600a2f010ac19cd396ad Author: Sven Joachim Date: Thu Jun 13 20:41:53 2013 +0200 Link against libdrm The DDX uses symbols from libdrm but currently does not link against it, but rather relies on indirect linkage from libdrm_nouveau. This could lead to insufficient dependencies in distribution packages, seen in http://bugs.debian.org/633786. Signed-off-by: Sven Joachim commit e96ae2b129df2a50d1d3839084df4fb1868d914d Author: Maarten Lankhorst Date: Wed Jun 12 11:05:23 2013 +0200 fixup the dri2 check Signed-off-by: Maarten Lankhorst commit 7f20a6af25ae28452ec9c971bfa2227857e6ee93 Author: Maarten Lankhorst Date: Wed Jun 12 10:46:39 2013 +0200 bump to 1.0.8 commit 1fda669c0e5a25eac7f9f1e9a743120cae50ff51 Author: Emil Velikov Date: Sat Feb 16 20:48:47 2013 +0000 configure: printout the configuration info Let the bikeshedding begin Signed-off-by: Emil Velikov commit 45dbcaac301efce04d0bb492337f4febf8129ed9 Author: Emil Velikov Date: Sat Feb 16 20:48:45 2013 +0000 nouveau: mandate dri2 build Building nouveau without dri2 is just silly Signed-off-by: Emil Velikov commit ea8d225fe100ecabb72e3cc0a92372f16afb10b3 Author: Emil Velikov Date: Sat Feb 16 20:48:44 2013 +0000 dri1: purge the final references Signed-off-by: Emil Velikov commit b5d1a9bd269c9d2758fee37492cdcccc976fcc3b Author: Emil Velikov Date: Sat Feb 16 20:48:43 2013 +0000 nouveau: Do not load dri {sub,}module Nouveau does not use dri1, thus loading XFree86-DRI is not needed On the other hand, we do use dri2 As a side effect, purge the 'set-but-unused' variable pLibDRMVersion Signed-off-by: Emil Velikov commit 7c3f6cd8d6b14aea561fb877f6006d339d156f35 Author: Emil Velikov Date: Sat Feb 16 20:48:42 2013 +0000 nouveau: stop using dri1 function DRICreatePCIBusID Step 1 to completely rip out dri1 out of nouveau Signed-off-by: Emil Velikov commit 3b1a45325d5fd46f0e7fad17168742b4c9a2465a Author: Maarten Lankhorst Date: Wed Jun 12 10:30:32 2013 +0200 update makefiles for make distcheck commit b82aacd3e72b52240181569c8b0abb55c1f716d5 Author: Emil Velikov Date: Sat Feb 16 12:48:46 2013 -0800 configure: require xorg-macros 1.8 Explicitly check for xorg-macros 1.8, as a subtle hint to update your build deps if building your own ddx Signed-off-by: Emil Velikov commit 4f667b40f41e311fbe302237efe173bcc24fb8bb Author: Maarten Lankhorst Date: Mon Jun 10 14:29:59 2013 +0200 fix a xfree from previous patch Signed-off-by: Maarten Lankhorst commit 2e34d11541e1f987c7ca0556592cb16f4d232299 Author: Maarten Lankhorst Date: Mon Jun 10 13:06:35 2013 +0200 nouveau: enable support for normal optimus configuration nvd7 has no display engine, only enable sink output capability if there is a crtc. drmmode doesn't work without crtc's, so prevent crashes by skipping the drmmode code in that case. Signed-off-by: Maarten Lankhorst commit bf72ae1f6574c540f0afc2d7845d41df43507a8f Author: Ben Skeggs Date: Wed May 15 22:05:01 2013 +1000 nve0: envyas isn't overly clever.. avoid short-form instructions Signed-off-by: Ben Skeggs commit 41cc2f24c43d2656ac722f594aaebad93e37dfec Author: Ben Skeggs Date: Wed May 15 21:13:11 2013 +1000 nvc0-nve0: decompile shaders into their source, add basic build system Far, far easier to maintain this way... Signed-off-by: Ben Skeggs commit 1edb5d7ae450a32fe6607d536653cf733444e7e2 Author: Ben Skeggs Date: Wed May 15 20:47:44 2013 +1000 nvc0-nve0: split shader code from their headers Signed-off-by: Ben Skeggs commit c18439f759bec267a3b67d375dcbfeb8a6fd7b6a Author: Dave Airlie Date: Mon May 13 13:55:51 2013 +1000 nouveau: clean up nv entity index declarations. Signed-off-by: Dave Airlie commit d3b52efe959f255784f5ead16d7276ca0fb4cdb1 Author: Dave Airlie Date: Mon May 13 13:35:12 2013 +1000 nouveau: attempt to fix zaphod since dri1 code removal j_v on #nouveau bisected b1a630b48210d6a3c44994fce1b73273000ace5c has breaking zaphod, on review it was trying to open the drm fd a second time which was unnecessary. Avoid the problem by storing the nv fd in an entity and have share it between the two scrn info recs. Signed-off-by: Dave Airlie commit 50426ac83f9f077791e4df8c04fc0ecefc06e8ab Author: Marek Vasut Date: Fri May 3 15:48:55 2013 +0200 nouveau: Allow 3D accelerators with output ports This patch let's cards with PCI class 0x30200 (3D controller) be operated by the nouveau driver as well. The nv Quadro NVS 450 is one such card, where the first GPU has PCI class 0x30000 and the other GPU has PCI class 0x30200. By ignoring the 1 << 9 bit in the PCI class mask, displays attached to the other GPU can also be used now. Signed-off-by: Marek Vasut Cc: Dave Airlie Cc: Ben Skeggs Signed-off-by: Ben Skeggs commit 2fa3397e348161a3394e2b456f065921272a056a Author: Ilia Mirkin Date: Fri May 3 09:59:39 2013 -0400 nouveau_xv: Avoid reading off the end of the source image on NV50+ The 'w' argument to NVCopyNV12ColorPlanes is used to index into the source image. line_len is rounded up to 8 on NV50+, so if the source image (+ left offset) is not rounded to 8, NVCopyNV12ColorPlanes could read past the end of the array and crash X. This change can cause the last few horizontal pixels of dst to not be initialized, but they should be truncated by the renderer anyways. See https://bugs.freedesktop.org/show_bug.cgi?id=63263 Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 81f9ab38f0a5de7217227dd17a4d0e50dffd0d28 Author: Ben Skeggs Date: Thu May 2 11:38:07 2013 +1000 nvf0: recognise as supported chipset Signed-off-by: Ben Skeggs commit 653c95d60af0f7c19a1d2f3b76dd17bb169d9c9b Author: Ben Skeggs Date: Mon Apr 29 10:07:59 2013 +1000 nve0: explicitly ask kernel for copy2 object Signed-off-by: Ben Skeggs commit 6771424d79e541d2fa7253a582db3dc9108fd97d Author: Maarten Lankhorst Date: Wed Mar 27 09:50:03 2013 +0100 bump to 1.0.7 Signed-off-by: Maarten Lankhorst commit 84998320162a74a0861b7be1fcc230e50f08424a Author: Maarten Lankhorst Date: Mon Mar 25 13:55:37 2013 +0100 Clean up some errors on closing. If forced close happens, all ioctl's will fail. Some of the handlers also need to be unregistered before the module is unloaded entirely. commit a80785f79268ed3701fc69cbd9194ad12822c82c Author: Dave Airlie Date: Mon Feb 11 09:56:25 2013 +1000 nouveau: fix build against old servers (part 2) Should fix next bit of https://bugs.freedesktop.org/show_bug.cgi?id=60369 Signed-off-by: Dave Airlie commit 05dc9b57896689a3dbd9e6aeb16d57c49515b02e Author: Marcin Slusarz Date: Sun Feb 3 21:12:46 2013 +0100 nv30/exa: fix shaders on big-endian machines Direct port of commit d1bc38b6673c54af61196056c489383fba8dced8 "nv40/exa: fix shaders on big-endian machines" to nv30. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=60050 Signed-off-by: Ben Skeggs commit 61a277488f7195914cbdda10355db0d758fc801c Author: Dave Airlie Date: Thu Feb 7 10:47:20 2013 +1000 nouveau: fix build on older X servers should fix https://bugs.freedesktop.org/show_bug.cgi?id=60369 Reported-by: fabio.ped@libero.it Signed-off-by: Dave Airlie commit e8f222fd10e21f39488d3d8c697e4948cd787cd0 Author: Dave Airlie Date: Wed Feb 6 16:21:50 2013 +1000 nouveau: make prime regression fix more robust. This makes this fix more robust and less crashy. Signed-off-by: Dave Airlie commit d762631c9306b6580b34db1e7eb57bbcac901390 Author: Dave Airlie Date: Wed Feb 6 15:52:33 2013 +1000 nouveau: align shared buffers to 256 We were getting 0xa5 error code on 2D transfers from tiled VRAM to untiled GART when using USB offload devices, this fixes this by upping the alignment on the 2D engine for shared buffers. Signed-off-by: Dave Airlie commit c6980b2add5752a7c285a846b2c9353c9d18afd4 Author: Dave Airlie Date: Wed Feb 6 15:24:09 2013 +1000 nouveau: fix regression in PRIME since 58284cf32778d54cde139423450bc33360784503 Signed-off-by: Dave Airlie commit 59fb3f0252e9b769c5877cfe83d8dbc51cdff232 Author: Dave Airlie Date: Wed Feb 6 14:58:08 2013 +1000 nouveau: create shared pixmaps in GART this creates the shared pixmaps in GART, and makes sure they are untiled. Signed-off-by: Dave Airlie commit 1fdd7db94b55c65ea62cc9eaefff620b20e9e4ea Author: Dave Airlie Date: Mon Jan 7 15:28:53 2013 +1000 nouveau: add reverse prime support This allows the nvidia card to scanout Intel cards rendering. Signed-off-by: Dave Airlie commit 58284cf32778d54cde139423450bc33360784503 Author: Christoph Bumiller Date: Tue Jan 29 16:38:21 2013 +1000 dri2: fix missing frame throttle on copy_region buffer swaps Signed-off-by: Ben Skeggs commit 912d418fdfd2e99eef1e5c631c76dda1d82cf451 Author: Marcin Slusarz Date: Mon Jan 21 00:15:38 2013 +0100 nouveau: put cursor BO in GART Keeping it in VRAM wastes CPU time, because cursor_set ioctl reads handed BO back to RAM, just to write it to actual cursor BO. Here (nv92/core i7), this patch decreases overall cpu usage of drmmode_load_cursor_argb from 4.6ms to ~90us and lets nv50_crtc_cursor_set disappear from perf traces. Signed-off-by: Ben Skeggs commit 8f934fad5d4934936b3265f272ca81e73c60d7dc Author: Dave Airlie Date: Mon Jan 7 14:13:10 2013 +1000 bump to 1.0.6 Signed-off-by: Dave Airlie commit 00834273e22f7234a3755269100ea3f10b521e35 Author: Dave Airlie Date: Mon Jan 7 14:04:40 2013 +1000 nouveau: fix dirty redisplay damage handling This processes the damage in the correct order. Signed-off-by: Dave Airlie commit 389b8a8dd91a48dee524eac96e60813c507f1a82 Author: Ben Skeggs Date: Mon Jan 7 14:05:06 2013 +1000 bump to 1.0.5 Signed-off-by: Ben Skeggs commit efe9c57af6ff4c12936e49ac3e188c54b8b2d5bd Author: Ben Skeggs Date: Mon Jan 7 11:35:56 2013 +1000 nvc0-/exa: fix typo which caused breakage in rendercheck tmcoords test Signed-off-by: Ben Skeggs commit 5cd86445272818ec2f598f4685a5d7f24e403d07 Author: Marcin Slusarz Date: Sun Nov 25 22:59:49 2012 +0100 add some missing newlines in error messages Signed-off-by: Ben Skeggs commit 3b33a0b426b8915f302247dcd40c64fb1a6dcdd2 Author: Emil Velikov Date: Sun Nov 4 18:06:18 2012 +0000 kms: Let the server know if we got more than 1 EDID block Verbatim copy from xf86-video-radeon commit 809cacb Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32341 Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit 018ab2d4634f3c8923038337ce9600973e2f0002 Author: Ben Skeggs Date: Fri Nov 9 12:16:00 2012 +1000 bump version to 1.0.4 Signed-off-by: Ben Skeggs commit 0d32d964dbba3864af0946aa8894cef858eb1319 Author: Dave Airlie Date: Wed Nov 7 14:49:03 2012 +1000 nouveau: drop unused nv private members. these are no longer needed. Signed-off-by: Dave Airlie commit b1a630b48210d6a3c44994fce1b73273000ace5c Author: Dave Airlie Date: Wed Nov 7 14:45:14 2012 +1000 nouveau: drop DRI1 device open interface. this is a DRI1 left over, the driver is meant to open the device itself now. this old interface did crazy stuff like drmAddMap. Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie commit 27a1a0616304e9b9f0ae842899b7d614f1026578 Author: Emil Velikov Date: Fri Nov 2 03:57:42 2012 +0000 nouveau: NVPlatformProbe, handle shareable entities During NVPciProbe, xf86ConfigPciEntity() implicitly calls checks and sets the entity as shared Here we are only allocating the screen, thus need to explicitly call the functions ZaphodHead and Xinerama should finally work Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56347 Reported-By: Vladimir Chebotarev Reported-By: Damian Nowak Tested-By: Damian Nowak Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit e34cfbd5bd23f7f15372af52d8a39a5715ce7310 Author: Emil Velikov Date: Fri Nov 2 03:57:41 2012 +0000 nouveau: Factor out common code to NVHasKMS() As the name suggests checks if it has kernel mode setting, prints out the interface version and checkes if the chipset is supported Function is used in NVPciProbe and NVPlatformProbe Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit 78f24dc3798d635fca2e20856a09012c28bbbb8b Author: Emil Velikov Date: Fri Nov 2 03:57:40 2012 +0000 nouveau: introduce NVInitScrn() Common/helper function for NV{Pci,Platform}Probe() This introduces some the following functions to the NVPlatformProbe codepath * xf86SetEntitySharable() * xf86SetEntityInstanceForScreen() Necessary for dualhead, xinerama and/or zaphodhead v2: Rename nouveau_init_scrn() to NVInitScrn() Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit 47457fbd5006070ea9a06238a5a69ca8167dac77 Author: Emil Velikov Date: Fri Nov 2 03:57:39 2012 +0000 nouveau: Remove unneeded xf86GetEntityInfo() Retrieving the whole entity information is not needed as we only use the index - stored already in entity_num Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit 20995bb5920021668b8b607f886201c643ee0e9a Author: Dave Airlie Date: Fri Nov 2 09:04:43 2012 +1000 nouveau: fix regression in virtualbox drawing hopefully. Signed-off-by: Dave Airlie commit 8c3e1623b0be15f8cc590d893bfd19be87bd079a Author: Maarten Lankhorst Date: Wed Oct 24 11:19:04 2012 +0200 bump version to 1.0.3 commit 6644a3a724a11150eba0c0082c8d4fe167b1755e Author: Maarten Lankhorst Date: Tue Oct 23 20:17:29 2012 +0200 exa: remove exaMarkSync from download/upload screen They're noops on nouveau since sync markers are unused and download/upload are always synchronous anyway from exa's POV. Signed-off-by: Maarten Lankhorst commit 2a757b7dffa85c30879653a1e52e33b8f4fa8806 Author: Maarten Lankhorst Date: Tue Oct 23 17:04:37 2012 +0200 exa: fix comparison in download_from_screen Presumably a copy/paste error from upload_to_screen. Signed-off-by: Maarten Lankhorst commit 72230cd5a7846f7a26f929262a745dc0bdc34a3d Author: Maarten Lankhorst Date: Tue Oct 23 10:37:27 2012 +0200 exa: fix up download_from/upload_to screen Add a missing return TRUE to download_from_screen. Add a missing exaMarkSync to memcpy in upload_to_screen. Add a really loud warning to both if memcpy to/from tiled is done. Signed-off-by: Maarten Lankhorst commit 1d7890ecb8b3188177ab85608ea232812672d923 Author: Maarten Lankhorst Date: Tue Oct 23 09:53:39 2012 +0200 remove unused members from nv_type.h commit 0b2a548316b0ce88ba19d5e05fdca205fc139962 Author: Maarten Lankhorst Date: Mon Oct 22 13:12:06 2012 +0200 nvc0/exa: make solid fill actually work Some investigation showed that the code for accelerating solid fill didn't actually work because NVC0EXACheckTexture would fail. Making the check the same as in NV50EXACheckTexture fixes this, and seems to get acceleration for solid fills working right. Signed-off-by: Maarten Lankhorst commit b4231dd715a8a7f86b04519b5f4e8a8d93c2f561 Author: Mario Kleiner Date: Tue Oct 9 09:06:59 2012 +0200 dri2: Fix potential race and crash for swap at next vblank. This fixes a potential race + crash that wasn't properly handled by commit 248de8cdbd6d0bc062633b49896fa4791148cd3b and happened at least on one users machine. That commit wrongly assumed no special action would be needed for swaps at next vblank while triple-buffering is enabled on XOrg server 1.12 or later. Closer inspection of the x-server main dispatch loop shows it is possible that the client manages to get the server to dispatch a new DRI2GetBuffersWithFormat() call before the server calls the vblank event handler and executes the nouveau_dri2_finish_swap() routine. Such a race would cause a crash, as described in above commit. This commit handles the "swap at next vblank" case by calling nouveau_dri2_finish_swap() immediately without the roundtrip (queue vblank_event -> kernel -> deliver event -> x-server processes event -> nouveau vblank event handler), before control gets returned to the client. This avoids the race while retaining triple-buffering. As a bonus, time-critical swaps at next vblank get processed without roundtrip delay, increasing the chance of not skipping a frame due to vblank miss while sync to vblank is on. Thanks to Anssi for reporting this problem on the nouveau mailing list at 12th July 2012 and for testing this patch. Reported-by: Anssi Hannula Tested-by: Anssi Hannula Signed-off-by: Mario Kleiner commit 01c9a9cff7d6232ca6eafa59dd60833a0d9cdc5b Author: Ben Skeggs Date: Thu Oct 18 18:38:21 2012 +1000 shadowfb: fix segfault due to reading outside of shadow buffer Probably caused by the new libdrm port, the new libdrm sets the bo size field to the *allocated* size and not the *requested* size, making the max_height calculation here invalid. Switched to using virtualX/virtualY as the bounds, which should hopefully do the right thing.. Signed-off-by: Ben Skeggs commit 297fd0d0755bda698be1d0b30cc60a41d7673c0b Author: Dave Airlie Date: Tue Oct 16 16:15:16 2012 +1000 nouveau/dri2: fix pixmap/window offset calcs. This should fix prime rendering under kwin, and not break it under the others. Signed-off-by: Dave Airlie commit 5c9379b14cdabc81fd5d4c916dcd93dc77c4f683 Author: Sebastian Keller Date: Tue Sep 25 11:35:35 2012 +0200 exa: use CLAMP_TO_EDGE for RepeatPad This fixes border rendering in some gtk3 themes. https://bugs.freedesktop.org/show_bug.cgi?id=55310 v2 (Ben Skeggs): implement same fix for fermi/kepler too Signed-off-by: Sebastian Keller Signed-off-by: Ben Skeggs commit 302b5da84b4890c067f5f7e8b0f4e689909bbb51 Author: Adam Jackson Date: Tue Sep 25 10:44:32 2012 -0400 Remove mibstore.h Signed-off-by: Adam Jackson commit 20f3830ddf868c0d1a46c18fa381585c076bfb8d Author: Maarten Lankhorst Date: Wed Sep 12 13:42:43 2012 +0200 bump version to 1.0.2 commit 239f39977ebb64c9d545c6f3c905de3c0ad840d0 Author: Dave Airlie Date: Thu Jul 19 13:46:44 2012 +1000 nouveau: enable provider/capabilities this adds the provider object for nouveau and enables the capabilities on it. Signed-off-by: Dave Airlie commit 28abba276e36fd0176f416996d44297ddf13f5cd Author: Dave Airlie Date: Thu Jul 19 13:46:12 2012 +1000 nouveau/dri2: add support for DRI2 offload This adds the nouveau interfaces for DRI2 offload, this allows nouveau to act as an offload slave. Signed-off-by: Dave Airlie commit b0be0ac86bae871c9f1724c40298d50d7f2b08e4 Author: Dave Airlie Date: Thu Jul 19 13:45:32 2012 +1000 nouveau: add pixmap tracking/updating support. This should allow nouveau to act as an output master for driving output slaves. Signed-off-by: Dave Airlie commit baf485b1d304d741073f058d524ca698af3c15cd Author: Dave Airlie Date: Thu Jul 19 13:42:13 2012 +1000 nouveau/exa: add support for shared pixmaps. This adds the pixmap export/import hooks, along with code for nv50/nvc0 to validate shared buffers in GTT space. Signed-off-by: Dave Airlie commit 2f48b8f462a03cb92db9e9a7ae1957eb27473965 Author: Dave Airlie Date: Thu Jul 19 13:40:23 2012 +1000 nouveau: add platform bus support This adds the ability to load nouveau via the new platform apis. Signed-off-by: Dave Airlie commit 3aa9a296f508089a247f92b829036ca6a55b7b42 Author: Adam Jackson Date: Wed Aug 15 13:26:51 2012 -0400 Remove vbe and int10 includes This driver has never used int10 or vbe, presumably these were just copypasta from nv. Signed-off-by: Adam Jackson commit 9b9be11e99930136a591059db1bf4ceaca8806e7 Author: Adam Jackson Date: Thu Jul 19 18:22:44 2012 -0400 Implement ->driverFunc Copied from fbdev, makes it so we can run without iopl. Signed-off-by: Adam Jackson commit 6629066b87142cdd1d9e881b61ef55c97aedf949 Author: Ben Skeggs Date: Fri Aug 3 17:05:33 2012 +1000 nvc0/nve0: support sync-to-vblank if kernel is new enough Signed-off-by: Ben Skeggs commit d1bc38b6673c54af61196056c489383fba8dced8 Author: Ben Skeggs Date: Fri Jul 6 16:23:50 2012 +1000 nv40/exa: fix shaders on big-endian machines Signed-off-by: Ben Skeggs commit 0d2b414aff634c996e0468bb0df1894d6c28c09e Author: Ben Skeggs Date: Tue Jun 19 10:12:37 2012 +1000 bump version to 1.0.1 commit f84c28c9e6a0079e527655994689cb9c2ba51999 Author: Ben Skeggs Date: Tue Jun 19 09:49:02 2012 +1000 exa: fix remaining signed datatype issues Wasn't expecting this situation, apparently it happens.. Signed-off-by: Ben Skeggs commit 794141f22179a09ba6b2a094ba72316c298fee8b Author: Maarten Maathuis Date: Tue Jun 19 00:28:59 2012 +0200 exa: fix various issues in transfer bo handling Thanks to "Christoph Bumiller " for hinting at the cause of the memory leak. Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 661d0cf42219a063f8faa0518f3490ddd38209ff Author: Christoph Bumiller Date: Mon Jun 18 17:13:55 2012 +0200 nve0: fix and improve NV12 shader Only the 1st set of coordinates is valid. NVC0 was fixed in 9a3e579f637267b32efc46cfce5d1a36a41323b1. commit a907efe44177298cb1c42a236aab087c14b71657 Author: Christoph Bumiller Date: Mon Jun 18 13:50:27 2012 +0200 nvc0/accel: oops fix method size in previous patch commit 8805e20bb9c1cfb7477f3eb7def64c5711fc91ea Author: Christoph Bumiller Date: Mon Jun 18 13:41:43 2012 +0200 nvc0/accel: use correct (signed) vertex data type in PUSH_VTX1/2s Could have kept s16 but decided against mask and shift. commit 6dbf4ea12600275775123f9f564469454415da55 Author: Ben Skeggs Date: Mon Jun 18 13:28:07 2012 +1000 bump version to 1.0.0 Signed-off-by: Ben Skeggs commit 5e74cee90eeb4e8e638b371a5f1a2c6737be70ff Author: Ben Skeggs Date: Mon Jun 18 15:36:47 2012 +1000 distcheck fixes commit 383aef5a8882a65efdf34e8d2681cd5ccec51b22 Author: Ben Skeggs Date: Mon Jun 18 13:31:37 2012 +1000 exa: drop massive gart allocation in favour of smaller ones, as needed Signed-off-by: Ben Skeggs commit 52836c15b1c0e4f28d92ca9e6c76872481917fd4 Author: Ben Skeggs Date: Mon Jun 18 13:20:18 2012 +1000 nv50/exa: somehow fix firefox tabs not being drawn properly since vp xfrm Signed-off-by: Ben Skeggs commit 36d3f8c28c55c05ccf4efa985831d2d249bad2fe Author: Ben Skeggs Date: Wed Jun 13 22:41:58 2012 +1000 dri2: kill debug spam Signed-off-by: Ben Skeggs commit 4dbc132f22721e3da30eb2e7fc97dea5b8458df6 Author: Viktor Novotný Date: Sat May 26 22:15:20 2012 +0200 nv04/exa: Reset destination surface offset in the same call of NV04EXACopy Fixes FDO bug #48954. Signed-off-by: Viktor Novotný Reviewed-by: Marcin Slusarz Signed-off-by: Ben Skeggs commit aab58ee9a8025422416458d637c203af5ba008fd Author: Dave Airlie Date: Tue Jun 5 12:34:06 2012 +0100 nouveau: i is used inside the function fixes build, reported by tallica on irc. Signed-off-by: Dave Airlie commit 619e99731f772ff8d9d93cd1d6d83de5d450574b Author: Dave Airlie Date: Tue Jun 5 11:02:54 2012 +0100 nouveau: port to compat server API. This ports to the new server API. Signed-off-by: Dave Airlie commit d2e16c62b5054f34a439e504bfa261fb71f5d7de Author: Dave Airlie Date: Tue Jun 5 10:57:30 2012 +0100 nouveau: drop flags arg to adjust frame Signed-off-by: Dave Airlie commit fadf83d7b373282ccbf0fa0c01928a35ff717a5e Author: Ben Skeggs Date: Thu May 31 15:46:57 2012 +1000 nvc0/exa: add support for async UTS/DFS copies Signed-off-by: Ben Skeggs commit 1600f7f202721c4b29c29e94f7fb69dc313b99dc Author: Ben Skeggs Date: Thu May 31 15:40:45 2012 +1000 nva3/exa: add support for async UTS/DFS copies Signed-off-by: Ben Skeggs commit ace77b6b1304826f4004bde23809b55d476b0615 Author: Ben Skeggs Date: Tue May 29 21:21:57 2012 +1000 disable fermi accel on 0.0.16 interface Kepler accel support broke some assumption made by the older kernel interface, and Fermi shares the same code. It can't work (without some annoying hacks anyway) with the 0.0.16 kernel anymore. commit 7041e30ab8beb627bbf569367961a658e79c2bdc Author: Dave Airlie Date: Wed May 23 14:18:24 2012 +0100 vl_hwmc: add missing compat include. Reported-by: tallica on irc. Signed-off-by: Dave Airlie commit 2abf8467cfb7a7648ce73ba5bcbbc62219d65d6d Author: Dave Airlie Date: Wed May 23 11:29:05 2012 +0100 nouveau: add compat-api.h to makefile. Signed-off-by: Dave Airlie commit 1d861ad716861c57b2b81531d21840d7c8de024b Author: Dave Airlie Date: Wed May 23 11:15:06 2012 +0100 nouveau: convert two more xf86Screens access to macros for some reason the script missed these two, just fix them manually. Signed-off-by: Dave Airlie commit 5625fb84efc699e65da0062ae101915a49f2969b Author: Dave Airlie Date: Wed May 23 11:13:30 2012 +0100 nouveau: convert scrn/screen to using new interfaces This commit was generated with the util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie commit 9f037f7be516ebf8fa4a67a5c9ff258594ab353e Author: Dave Airlie Date: Wed May 23 11:12:59 2012 +0100 nouveau: add initial compat-api header This just provides the scrn conversion and picture stuff so far. Signed-off-by: Dave Airlie commit 581564466c47ab0435ecca3cf4d82c03e1b30259 Author: Francisco Jerez Date: Tue May 8 14:02:44 2012 +0200 dri2: Don't try to page-flip pixmaps (fdo bug 49351). Reported-by: Marcin Slusarz Signed-off-by: Francisco Jerez commit b1efc807392d372e6a232aad9d16ae6e1b1c1916 Author: Marcin Slusarz Date: Sun Apr 15 13:46:42 2012 +0200 nv50: add missing pushbuf space check in NV50SyncToVBlank Regression from "WIP: port to new libdrm". commit 174f17072005971fee6e4eb76a273c3cc1aa10d3 Author: Ben Skeggs Date: Tue Apr 24 21:55:03 2012 +1000 nv40/exa: return false from gradient picture setup Not implemented yet. Shouldn't hit this anyway, fallback in check_composite, but, best be safe :) Reported-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 60edf2a87b928f413385443335493cb27da30a48 Author: Ben Skeggs Date: Tue Apr 24 10:54:51 2012 +1000 nv40/exa: support for solid pictures Signed-off-by: Ben Skeggs commit 067b8416ad1ab3e71ebbb8db8bfb82ff6041939b Author: Ben Skeggs Date: Mon Apr 23 17:49:57 2012 +1000 nv30/exa: implement support for solid pictures using register combiners Signed-off-by: Ben Skeggs commit b09a61780ea6710b679a6a099e35987e7a5f559f Author: Ben Skeggs Date: Mon Apr 23 14:49:22 2012 +1000 nv10/exa: implement support for solid pictures Signed-off-by: Ben Skeggs commit 9583753a205c585ec844dfb7168513a2c2a157ba Author: Ben Skeggs Date: Fri Apr 20 20:52:01 2012 +1000 nv10/exa: use fixed-function texture matrix for transforms Signed-off-by: Ben Skeggs commit c21c0ae57717bfb0fceab82505009a5382d1428d Author: Ben Skeggs Date: Fri Apr 20 20:30:44 2012 +1000 nv30/exa: use fixed-function texture matrix for src/mask transforms Signed-off-by: Ben Skeggs commit 24a5ca723539a940bc2dabcc50aa631f0d9d4219 Author: Ben Skeggs Date: Fri Apr 20 15:24:45 2012 +1000 nv40/exa: do transforms in vertex program Signed-off-by: Ben Skeggs commit 9a3e579f637267b32efc46cfce5d1a36a41323b1 Author: Ben Skeggs Date: Thu Apr 19 16:58:52 2012 +1000 nvc0/exa: port recent nv50 changes (vp transform, solid pictures, etc) Signed-off-by: Ben Skeggs commit 8ea09db1a1e8dff7c341dc3da17edefda7e56e6d Author: Ben Skeggs Date: Thu Apr 19 13:46:03 2012 +1000 nv50/exa: support solid pictures Signed-off-by: Ben Skeggs commit b48bcc094beecf521899dd63c8fdbccfd534e5cd Author: Ben Skeggs Date: Thu Apr 19 13:21:27 2012 +1000 nv50/exa: perform texcoord transformations in vertex program Signed-off-by: Ben Skeggs commit 5ac2ca8c56ec8b055878c8ac4cbc8ca74379abda Author: Ben Skeggs Date: Thu Apr 19 09:52:24 2012 +1000 nv50: implement and use PUSH_DATAu Signed-off-by: Ben Skeggs commit 6c41b3d7a8799daa9d0b34dcfbfc5c891c24fffa Author: Ben Skeggs Date: Tue Apr 17 11:07:05 2012 +1000 nv30/nv40: upload shaders directly from rankine/curie init Also removes A8 surface shader hack, and implements proper shaders for the specific purpose. Signed-off-by: Ben Skeggs commit ec019b3a50475b7ff1b5e0a5dbe14e5ef677bd9e Author: Ben Skeggs Date: Tue Apr 17 09:30:49 2012 +1000 Keep a single buffer for random accel data, rather than 3 different ones Signed-off-by: Ben Skeggs commit fb3a36b1e5af0f81bb266da894d3442eed8e4e55 Author: Ben Skeggs Date: Wed Mar 28 16:38:30 2012 +1000 nve0: initial exa/xv acceleration for kepler chipsets Signed-off-by: Ben Skeggs commit 95be16d8cd88db1ace0ac4568b4c67b51fd30fd9 Author: Ben Skeggs Date: Thu Mar 29 19:55:27 2012 +1000 nvc0: create scratch buffer before initialising m2mf Signed-off-by: Ben Skeggs commit 4896c87484e1cf1e5421de377b6b83890948664d Author: Ben Skeggs Date: Thu Mar 29 19:47:21 2012 +1000 nvc0: switch to kepler's subchannel assignments (see note) This will bust for kernels with nouveau ABI version < 1.0.0... It should be possible to add compat for 0.0.16 however... Signed-off-by: Ben Skeggs commit 4225b486cb8ab98d27ba23874096ff0879d45575 Author: Ben Skeggs Date: Thu Mar 29 15:56:02 2012 +1000 nvc0: tidy and cull a heap of fermi init (stuff in default grctx) Signed-off-by: Ben Skeggs commit 007dd62a8c5244bc5e71fe8f32520fb35b67a237 Author: Ben Skeggs Date: Thu Mar 29 15:28:03 2012 +1000 nvc0: punt shaders out to a header file Signed-off-by: Ben Skeggs commit 1c7651532975cf738b3aac4ec3c3b46187e24eea Author: Ben Skeggs Date: Thu Mar 29 14:25:15 2012 +1000 nvc0: do tic/tsc binding only once, at startup Signed-off-by: Ben Skeggs commit 180d8778764913ed061e68520603c0925477faba Author: Ben Skeggs Date: Thu Mar 29 14:21:25 2012 +1000 nvc0: replace direct inline m2mf with inline helper to do the same Signed-off-by: Ben Skeggs commit e70d801ae9287eab5e82f4d467dc8cd4be1b31a8 Author: Ben Skeggs Date: Fri Dec 9 18:15:32 2011 +1000 WIP: port to new libdrm calim: nv50,nvc0/xv: fix src_w/h width/height confusion commit ab7291d368ddc66ad21c5ad5caa0faeee42ccaf1 Author: Ben Skeggs Date: Wed Mar 21 14:56:55 2012 +1000 xv: don't try to init textured video without 3d engine object Signed-off-by: Ben Skeggs commit fe7e0425a4a43b2a7d4743a0a90a86724c3b6775 Author: Ben Skeggs Date: Mon Mar 12 11:59:29 2012 +1000 recognise kepler Signed-off-by: Ben Skeggs commit f5d1cd2cb6808838ae1a188cef888eaa9582c76d Author: Ben Skeggs Date: Tue Mar 6 08:16:51 2012 +1000 remove use of xf86PciInfo.h, deprecated now apparently Signed-off-by: Ben Skeggs commit 248de8cdbd6d0bc062633b49896fa4791148cd3b Author: Mario Kleiner Date: Thu Feb 16 00:45:24 2012 +0100 dri2: Fix corner case crash for swaplimit > 1 If a swaplimit > 1 is set on a server which supports the swaplimit api (XOrg 1.12.0+), the following can happen: 1. Client calls glXSwapBuffersMscOML() with a swap target > 1 vblank in the future, or a client calls glXSwapbuffers() while the swap interval is set to > 1 (unusual but possible). 2. nouveau_dri2_finish_swap() is therefore called only at the target vblank, instead of immediately. 3. Because of the deferred execution of nouveu_dri2_finish_swap(), the OpenGL client can call x-servers DRI2GetBuffersWithFormat() before nouveau_dri2_finish_swap() executes and it deletes pixmaps that would be needed by nouveau_dri2_finish_swap() --> Segfault --> Crash. Prevent this: When a swap is scheduled into the future, we temporarily reduce the swaplimit to 1 until nouveau_dri2_finish_swap() is done, then restore it to its original value. This throttles the client inside the server in DRI2ThrottleClient() before it can call the evil DRI2GetbuffersWithFormat(). The client will still be released one video refresh interval before swap completion, so there is still some potential win. This doesn't affect the common case of swapping at the next vblank, where this throttling is not needed or done. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 247465ec5e21ce7151ef1e6a3e7644bc74d48a5b Author: Mario Kleiner Date: Thu Feb 16 00:45:23 2012 +0100 dri2: Reimplement hack for triple-buffering on old X-Servers. X-Servers before 1.12.0 don't have the DRI2SwapLimit() API. On these, default to a swaplimit of 1 - double-buffering. This patch implements support for swap limit of 2, triple-buffering, on old x-servers via Francisco Jerez previous hack: Return DRI2SwapComplete() before the swap has completed, so clients don't get blocked on the pending swap. This allows for a "triple-buffering look-alike" behaviour, but breaks the swap scheduling and timestamping defined in the OML_sync_control spec, so applications which rely on conformant behaviour will break with a swap limit of 2 on pre 1.12.0 x-servers. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit a1902ffaab1f6807fdaac0fce49f784e7208d1a5 Author: Mario Kleiner Date: Thu Feb 16 00:45:22 2012 +0100 dri2: Allow vblank controlled swaps for redirected windows. Part II This part implements proper throttling for clients. For vblank synchronized blits, it defers DRI2SwapComplete() until 1 vblank after the framebuffer blit is submitted to the gpu. Rationale: For unredirected windows, this is the earliest time the "blit swap" can complete, as blits are submitted one vblank before the target vblank and synchronized with vblank in the gpu. This makes swap completion timestamps at least reasonable. For redirected windows, the compositor will probably pick up the "blit swapped" frontbuffer pixmap of the window quickly, but defer its own recomposition to the next vblank, at least if sync to vblank for the compositor is on. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit c8572d329014afc0c79b5765468dcdfb65be0868 Author: Mario Kleiner Date: Thu Feb 16 00:45:21 2012 +0100 dri2: Allow vblank controlled swaps for redirected windows. Part I Make sure that swaps for redirected windows under a compositor are still scheduled via vblank events, to avoid effects like 2900 fps swaps under a compositor. See discussion with Francisco Jerez at: http://lists.freedesktop.org/archives/nouveau/2011-September/009278.html http://lists.freedesktop.org/archives/nouveau/2011-September/009292.html This is part I of the agreed upon band-aid, in a separate patch. It allows to use vblank related functions on redirected windows and thereby fixes functions from sgi_sync_control and oml_sync_control extension, e.g., glXWaitForMscOML(), glXGetSyncValuesOML(), glXWaitVideoSyncSGI, ... Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 919643888045b102f3e10dfdeb6210ab14b6ecab Author: Mario Kleiner Date: Thu Feb 16 00:45:20 2012 +0100 dri2: Fixes to swap scheduling. Fix some small off-by-one errors and a mismatch between 32 bit kernel interfaces for vblank count and 64 bit dri2 interfaces for target_msc et al. Return corrected target_msc to swap scheduling in x-server. A revised version of the patch discussed here: http://lists.freedesktop.org/archives/nouveau/2011-September/009143.html Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 5ede4538366a352aa9726560f8d42e85df4aec82 Author: Mario Kleiner Date: Thu Feb 16 00:45:19 2012 +0100 dri2: Update front buffer pixmap and name before exchanging buffers Buffer exchange assumes that the front buffer pixmap and name information is accurate. That may not be the case eg. if the window has been (un)redirected since the buffer was created. This is a translation to nouveau of a fix that was originally developed by Ville Syrjala for the ati/radeon ddx to fix the same bug there. See thread at: http://lists.x.org/archives/xorg-devel/2011-May/021908.html Fixes FDO bug #35452. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 6fdf60b7288d49f889c80705aabc1db3bc327ba3 Author: Mario Kleiner Date: Thu Feb 16 00:45:18 2012 +0100 dri2: Add support for DRI2SwapLimit() API. Uses the new DRI2SwapLimit() API of X-Server 1.12+ to allow to change the maximum number of pending swaps on a drawable before the OpenGL client is throttled by the server. The new optional xorg.conf parameter "SwapLimit" allows to select a new swap limit >= 1. The default swap limit is 2 for triple-buffering on XOrg 1.12+, 1 for double-buffering on older servers, as we can't change the swap limit there. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 820916e722db2997a53128f2f370d14a02d4401c Author: Mario Kleiner Date: Thu Feb 16 00:45:17 2012 +0100 dri2: Implement handling of pageflip completion events. Requests pageflip completion events from the kernel. Implements pageflip completion handler to finalize and timestamp swaps. Completion handler includes a consistency check, and disambiguation if multiple crtc's are involved in a pageflip (e.g., clone mode, extendend desktop). Only the timestamp of the crtc whose vblank event initially triggered the swap is used, but handler waits for flip completion on all involved crtc's before completing the swap and releasing the old framebuffer. This code is almost identical to the code used in the ati/radeon ddx and intel ddx. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit 4da68cedbefef4f72c00bb088e179071490882c8 Author: Mario Kleiner Date: Thu Mar 1 19:11:14 2012 +0100 dri2: Fix can_exchange() to allow page-flipping on more mesa versions. can_exchange() returns false and thereby prevents page flipping on some drawables where page flipping would work fine. This due to non-matching drawable depths values between front buffer pixmap and back buffer pixmap, because front buffer pixmaps inherit the depth of the screen, typically 24 bits, whereas the depth value of back buffer pixmaps for a given RGB8 or RGBA8 visual depends on the mesa version in use, either 24 bits or 32 bits. Use bitsPerPixel instead of depth to decide if drawable is flippable. This will still catch really incompatible formats like 32 bpp vs. 16 bpp buffers. Tested for screen DefaultDepth 24 and also 30 bits (for RGB10 framebuffers) on NV-50. The problem was fixed in the same way in the ati & intel ddx. Signed-off-by: Mario Kleiner Signed-off-by: Ben Skeggs commit b0d7f4ddd94154491d04dcb9698d63d61e9240dc Author: Christoph Bumiller Date: Mon Jan 9 15:17:27 2012 +0100 dri2: CreateBuffer format may be 0, use depth in that case commit 3d9f6b32e0ad72dc8c7db07d039d87e83d8fdb1d Author: Ben Skeggs Date: Fri Dec 9 17:45:31 2011 +1000 nv50/xv: bump max dims to 8k Untested, but I don't see why this wouldn't work... commit 57c62228e2e67370feeeb421c369fbf940d30ca4 Author: Ben Skeggs Date: Fri Dec 9 17:44:07 2011 +1000 xv: stop using custom m2mf code commit ad402333157c437ccd2c639f5b3f3bcb81e78d6c Author: Christoph Bumiller Date: Sat Dec 10 13:32:24 2011 +0100 dri2: fix allocation of Z16 depth attachments commit 3d2a752ca8aafee5e1e94dabfd7deec439890e95 Author: Ben Skeggs Date: Thu Dec 1 11:31:49 2011 +1000 move away from libdrm's BEGIN_RING (and variants) macros subchan auto-assignment is now gone. commit b6cfdc01aeb5c2ab401ee81fff66bd0560abdfcc Author: Ben Skeggs Date: Thu Dec 1 11:25:10 2011 +1000 Append _CLASS to object class id definitions I want to be able to use ring macros of the same name commit 1dadb5826363d0d8ed1a72209be18277550f8345 Author: Ben Skeggs Date: Thu Dec 1 09:06:24 2011 +1000 exa: create general m2mf rect copy for each chipset, use for UTS/DFS No point having duplicated UTS/DFS logic in each implementation. This also splits nv50 out into its own code, in preparation for it being made to not use relocs at all. Signed-off-by: Ben Skeggs commit b5534a15a5f5e1c3bd6c92e3ed8391ff628c09bb Author: Marcin Slusarz Date: Wed Nov 30 18:56:54 2011 +0100 fix typo in conversion to rnn headers commit 5975ce34a12d1943b2852d0f5fbe09358754c2ad Author: Ben Skeggs Date: Wed Nov 30 17:40:02 2011 +1000 convert entire ddx to rnn headers commit 9fa0c6c74d0b9f7d66ebe3c99184eaa13abeb1a0 Author: Marcin Slusarz Date: Sun Nov 6 20:32:10 2011 +0100 Default to 16bpp for low memory cards. commit 5aa30ae6554c957609929ef29d1b27c89e9a7f06 Author: Marcin Slusarz Date: Sun Nov 6 20:32:09 2011 +0100 nv50/exa: wait for enough space for at least one composite operation commit 3d54426c4833a7e058e50624452f89139921e64b Author: Marcin Slusarz Date: Sun Nov 6 20:32:08 2011 +0100 add missing return in nv50_accel_init failure path commit d575a28a5020ff083836d3d1cf50018a99f49c9f Author: Maarten Lankhorst Date: Sat Oct 8 10:33:20 2011 +0200 dri2: Add vdpau driver name entry libvdpau has a driver loading mechanism that looks for a dri2 driver first before falling back to nvidia, so lets use that. commit 656cfe3bdb8b487827b710a0cea35ae1bcd5044e Author: Marcin Slusarz Date: Sat Sep 10 23:14:53 2011 +0200 xv: support AI44/IA44 It's needed for osd in mplayer's xvmc output. commit 169512fbe91f0671a90dfee5e280357f0a4ef701 Author: Maxim Levitsky Date: Tue Aug 23 13:10:59 2011 +0200 dri2: Disable the "exchange" swapbuffers path for the moment (bug 35930). Allow page flipping only for scanout buffer for now as simple swapping between off-screen pixmaps confuses compiz because there is no syncronization method to tell it about that swap Signed-off-by: Francisco Jerez commit b806e3f97a73701f057c45b1f45233e69e19f113 Author: Bryan Cain Date: Wed Jul 20 13:48:36 2011 -0500 g3dvl: update for compatibility with latest pipe-video branch in Mesa Signed-off-by: Bryan Cain Signed-off-by: Ben Skeggs commit de9d1ba7efeba64f319efa00df183d3cb78f24af Author: Emil Velikov Date: Tue Jul 19 00:35:38 2011 +0100 drmmode_display: Resolve missing brackets Correct some missing/misplaced brackets in drmmode_pre_init() The issue was exposed when trying a 4 monitor desktop using two cards/gpus Resolves https://bugs.freedesktop.org/show_bug.cgi?id=39099 Reported-By: Damian Nowak Tested-By: Damian Nowak Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs commit ef4957492956df54fafa6c75d576a07ce678ea0a Author: Ben Skeggs Date: Mon Jul 11 12:48:34 2011 +1000 kms: fix multiple rotations in noaccel mode commit ab89aa022f0c78154e525b5f5787feee8024171f Author: Ben Skeggs Date: Fri Jun 17 10:10:09 2011 +1000 nvc0: accept 0xdx chipsets Signed-off-by: Ben Skeggs commit 7dd8987b8b69f56d04a199207122d2e51b9caa6e Author: Ben Skeggs Date: Fri Jun 17 10:07:36 2011 +1000 nvc0: assume 0x9097's presence on all chipsets This appears to be the case thus far, and is what the 3D driver does. Signed-off-by: Ben Skeggs commit 98ee2105dbd8685e59c1967a587fccb6135743ac Author: Ben Skeggs Date: Mon May 30 10:10:58 2011 +1000 kms: clear new fb to black on fb resize commit 8378443bd3b26b57ef2ae424a700e01ead813d33 Author: Ben Skeggs Date: Thu Mar 24 02:13:12 2011 +1000 nv50-nvc0/exa: fix bug causing surface state to not be reemitted after flush Signed-off-by: Ben Skeggs commit 92db2bc192a074d4b7fc3e9c16e9aa62a8deaeb6 Author: Christoph Bumiller Date: Thu Mar 3 22:17:23 2011 +0100 nvc0/accel: allow nvc1,nvc3,nvc4 in 3D engine init and use 9097 commit ace98a492353e6de712f4f717e6d3f562e3591f0 Author: Ben Skeggs Date: Tue Mar 1 13:54:38 2011 +1000 dri2: return an error rather than crashing if we can't allocate a buffer Signed-off-by: Ben Skeggs commit bc5dec2ca7ca7edc340a99bd73946e228117dfd8 Author: Ben Skeggs Date: Thu Feb 24 15:15:00 2011 +1000 dri2: disable page flipping if any crtc is rotated Signed-off-by: Ben Skeggs commit c123618470b5ff32c6377a4cae0f148d4a518a5d Author: Francesco Marella Date: Thu Feb 17 03:48:16 2011 +0100 Fix gcc 4.6.0 set but unused variable warnings Signed-off-by: Francesco Marella Signed-off-by: Ben Skeggs commit 3531b2aa13e9c78288d96fe5e1492f0b6e899b00 Author: Francesco Marella Date: Thu Feb 17 03:47:46 2011 +0100 Page flipping man page update Signed-off-by: Francesco Marella Signed-off-by: Ben Skeggs commit 85a706df6f7986158c964e3afd0aa8e352ff5cea Author: Francesco Marella Date: Thu Feb 17 03:47:08 2011 +0100 Update configure.ac with autoupdate Signed-off-by: Francesco Marella Signed-off-by: Ben Skeggs commit 42c16ff33dcca6cd9bae62fe0d71a40452e03581 Author: Ben Skeggs Date: Wed Feb 16 13:51:54 2011 +1000 nv50: attempt to allocate compressed Z buffers This should automagically fallback to the non-compressed version on kernels that don't support compression. Signed-off-by: Ben Skeggs commit 46acb7e095e9c0d55b90070b77c64679fcfb9d4e Author: Marcin Slusarz Date: Sun Feb 13 20:46:42 2011 +0100 fix drmSetMaster error reporting On error, drmSetMaster returns -1 and sets errno. Signed-off-by: Ben Skeggs commit 54764980411b4b8124c36edb8730612b04f292a9 Author: Maarten Maathuis Date: Thu Feb 10 20:12:07 2011 +0100 Also flush from the BlockHandler. - The fact that commit 02c50db307a4e4eeb87f7db5d401bc53cce3b21f fixed missing text for some people proves this is needed. That commit should have only improved latency a bit. - The FlushCallback is still needed for DRI2 texture_from_pixmap. - See bugs.fd.o #33977 for discussion. Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit 02c50db307a4e4eeb87f7db5d401bc53cce3b21f Author: Maarten Maathuis Date: Mon Feb 7 19:37:47 2011 +0100 exa: Flush (S)IFC to the frontbuffer immediately. This avoids high latency while typing with core fonts for example. Signed-off-by: Maarten Maathuis Signed-off-by: Ben Skeggs commit e4fb9fd2f790ed66e4be61ca00d55522525619f4 Author: Ben Skeggs Date: Wed Feb 9 13:46:32 2011 +1000 dri2: allow page flipping to be disabled in xorg.conf Signed-off-by: Ben Skeggs commit 38e8809bb415bae5c182fc79c8fc62992c5e4ed0 Author: Ben Skeggs Date: Mon Jan 17 09:14:31 2011 +1000 nvc0: merge initial acceleration support Squashed commit of the following: commit e8ce1ef351ee51bec51211dca6fda88fdbfbefee Author: Ben Skeggs Date: Mon Jan 17 08:55:04 2011 +1000 fix hardcoding of nvc0 wfb path commit b414b1f948da18d96309bad84c54948d877efaa6 Author: Ben Skeggs Date: Mon Jan 17 08:52:53 2011 +1000 general tidy-ups in preparation for merge to master commit 73bf71d5de0cb990178a1d2a31e0ea1717c214a4 Merge: fb499a4 b795ca6 Author: Ben Skeggs Date: Mon Jan 17 08:47:40 2011 +1000 Merge branch 'master' into nvc0 commit fb499a4e9d95650dc89f4c1820b94d01344733f6 Author: Ben Skeggs Date: Mon Dec 20 12:54:43 2010 +1000 nvc0: switch to "standard" RING macros commit 64f0e1d0e9e29c5437ad4e52d01ccfb0b03a2ae9 Merge: eba7e17 c2092a4 Author: Ben Skeggs Date: Mon Dec 20 11:58:42 2010 +1000 Merge branch 'master' into nvc0 Conflicts: src/nv_dma.c commit eba7e173a5006ff50b950d0e8b8154564471a9ce Author: Ben Skeggs Date: Fri Dec 17 11:04:40 2010 +1000 nvc0/xv: use mad in nv12 shader, rather than mul+add Signed-off-by: Ben Skeggs commit b025ceb40a5e94a3657f3c7f76044c49a1a05e8d Author: Christoph Bumiller Date: Thu Dec 16 23:34:29 2010 +0100 nvc0: fix offset of 17bc buffer I had messed it up in 5e4da3451c3c0f645f98fea7fb0ce2629b1bfd2f. commit 6ff5a9a7f3411ef218f17fa481c583596ffde2cc Author: Christoph Bumiller Date: Thu Dec 16 01:07:25 2010 +0100 nvc0/xv: bind textures for the FP, not the TEP commit 5e4da3451c3c0f645f98fea7fb0ce2629b1bfd2f Author: Christoph Bumiller Date: Thu Dec 16 01:02:58 2010 +0100 nvc0: switch to rnn headers commit 0839041e79dbb0e629326d0f240220b33921db1a Author: Ben Skeggs Date: Wed Dec 15 16:42:41 2010 +1000 nvc0/exa: fix m2mf dfs commit 88c1c43302331e1cb8b7035bfb4677a5e7da3090 Author: Ben Skeggs Date: Mon Dec 13 12:00:23 2010 +1000 nvc0: add Xv implementation commit ad5b4cfe388a102a0c93f7281cb4bba532b1796b Merge: 1942a81 b6cb21b Author: Ben Skeggs Date: Wed Dec 15 14:57:04 2010 +1000 Merge branch 'master' into nvc0 commit 1942a81c0eb592972d4a3e8c46b80192ae8d1a59 Author: Ben Skeggs Date: Thu Dec 9 12:48:27 2010 +1000 nvc0: call grobj_alloc for all used object classes Though the hardware has no concept of object handles any more, the nouveau DRM still uses this call to know what engines are in use. commit 0c670a6d406fe0a57373fa9e03005be6f28ecc3e Author: Ben Skeggs Date: Thu Dec 9 12:44:41 2010 +1000 nvc0: don't try and create DmaNotifier0 commit 5d3d20d908a50ad7742567d58969c7f12dd944f7 Author: Christoph Bumiller Date: Thu Dec 9 01:36:32 2010 +0100 nvc0: change tile_mode to contain 0xZYX instead of 0xZY Warning: the kernel will not like that (EVO) commit dd7fd8263e0e9f92412fb20086e4c8acf8cab099 Author: Christoph Bumiller Date: Thu Dec 9 00:29:58 2010 +0100 exa: don't fall back to nv04 m2mf if nvc0 m2mf fails commit b4cf5a8f2276392945c2530f0d6fe96b5ab4b5da Author: Christoph Bumiller Date: Thu Dec 9 00:07:59 2010 +0100 nvc0/exa: remove noisy debug messages commit 5419ef6d2cfabb7329982cb8dbdb5bbc8e973fe3 Author: Christoph Bumiller Date: Wed Dec 8 23:55:51 2010 +0100 nvc0/accel: remove unneeded scratch method 0x3420 init It was intended be read by a MACRO method to get the address for constants upload. commit 178356391ff6831599eba257a5912079894641a1 Merge: 8573280 8bb8231 Author: Christoph Bumiller Date: Thu Dec 9 01:31:40 2010 +0100 Merge remote branch 'origin/master' into nvc0 Conflicts: src/drmmode_display.c src/nouveau_exa.c src/nv_driver.c src/nv_type.h commit 8573280871401e29f27fa24d0b7c6ac5e35b2cc1 Author: Christoph Bumiller Date: Sat Jul 3 14:27:36 2010 +0200 nvc0: initial implementation EXA should work, Xv not yet done. commit b795ca6e97fae9735843748585401098dae1c3e1 Author: Ben Skeggs Date: Fri Jan 7 13:33:36 2011 +1000 nv50: fix pitch of linear scanout buffers Un-breaks NoAccel on these chipsets. Signed-off-by: Ben Skeggs commit dc89dac734167bcbc667b39ca6ee2043871a60bf Author: Xavier Chantry Date: Sun Dec 19 23:17:34 2010 +0100 nv04/exa: kill useless WAIT_RING Signed-off-by: Francisco Jerez commit b76b43928bf4dcf5ce3a4b58c7fefe780070c0d3 Author: Ben Skeggs Date: Tue Dec 21 16:25:23 2010 +1000 add back generic include of nouveau_pushbuf.h So places that FIRE_RING() still work. Signed-off-by: Ben Skeggs commit c2092a458401377f421d9bdfe1d97ce580b99508 Author: Ben Skeggs Date: Mon Dec 20 11:50:57 2010 +1000 include nv04_pushbuf.h for ring macros, rather than nouveau_pushbuf.h Signed-off-by: Ben Skeggs commit aa2821a42706ac7b69703d1869e2d00a4ced9f4b Author: Ben Skeggs Date: Mon Dec 20 11:53:53 2010 +1000 kill NVSync(), it's rather useless Signed-off-by: Ben Skeggs commit 1fc564fe3494cf0abcc848d0e90bf2232f8fd272 Author: Ben Skeggs Date: Thu Dec 16 09:49:09 2010 +1000 nv50/xv: use mad in nv12 shader, rather than mul+add Signed-off-by: Ben Skeggs commit b6cb21b91f7d0409794a14ddbdd606728d4d49e3 Author: Ben Skeggs Date: Mon Feb 8 12:51:47 2010 +1000 set canDoBGNoneRoot if building against new enough server commit 11510f9ce8c9eab15e7f6d5962b83fc0052c8619 Author: Ben Skeggs Date: Tue Dec 14 15:39:01 2010 +1000 nv50/xv: implement brightness/contrast/saturation/hue controls Adapted from the code in xf86-video-ati. Signed-off-by: Ben Skeggs commit 214ea264cdb386520a1308a29f204e441f349cb1 Author: Ben Skeggs Date: Tue Dec 14 14:42:24 2010 +1000 nv50/xv: kick csc parameters out into a constant buffer These were previously inlined into the shader, which is simple, but makes implementing brightness/contrast adjustments impossible. Signed-off-by: Ben Skeggs commit 8bb8231236a6b877895663aeaa9cef731d67fe68 Author: Ben Skeggs Date: Tue Nov 30 15:27:36 2010 +1000 dri2: fix certain clients blocking forever when sync-to-vblank unavailable Signed-off-by: Ben Skeggs commit f29afe65b67c9b89ceba421d9b3aee590f7ded20 Author: Ben Skeggs Date: Mon Nov 29 09:23:35 2010 +1000 dri2: don't return failure from get_msc if sync-to-vblank isn't available Signed-off-by: Ben Skeggs commit 4b1d26578116f4d1745dd92a7c99413972a2bedf Author: Francisco Jerez Date: Thu Nov 25 21:33:46 2010 +0100 dri2: Don't return failure from schedule_wait if sync-to-vblank is unavailable. Reported-by: Ben Skeggs Signed-off-by: Francisco Jerez commit 1143e7a97dce1b741376e178b73b8b766e03849a Author: Jesse Adkins Date: Tue Oct 26 16:05:32 2010 -0700 Purge cvs tags. Signed-off-by: Jesse Adkins Signed-off-by: Francisco Jerez commit 22020457f43eceaf26532ecb50e46d743f4a691f Author: Francisco Jerez Date: Tue Oct 26 00:24:06 2010 +0200 dri2: Fix throttling on occluded drawables. Signed-off-by: Francisco Jerez commit 9737a812aacbc544b93eeaa031cf1c2e8adbd661 Author: Ben Skeggs Date: Mon Oct 25 10:37:08 2010 +1000 kms: initial pass at supporting zaphod-mode This works ok from some simple testing, there's undoubtedly things that will need polishing still however. Signed-off-by: Ben Skeggs commit d40c16f5497739c0215f37566db1651a74cb20ba Author: Francisco Jerez Date: Sat Oct 23 02:20:30 2010 +0200 dri2: Fix build on X server 1.8. Signed-off-by: Francisco Jerez commit a4d580bf05d7aac1d486e5d1ba9a2201c026e5f5 Author: Francisco Jerez Date: Fri Oct 22 23:09:30 2010 +0200 Bump the required X server version to 1.8. Signed-off-by: Francisco Jerez commit d0f2e16bc35660d01d3cd20a770cf8e613ab5323 Author: Francisco Jerez Date: Fri Oct 22 23:06:28 2010 +0200 dri2: Report damage on page-flipped drawables. Signed-off-by: Francisco Jerez commit c61e8d03161adcfbba4162172153814accf9e86b Author: Francisco Jerez Date: Fri Oct 22 23:05:24 2010 +0200 Make the sync-to-vblank helpers take a box as argument. Signed-off-by: Francisco Jerez commit a685a5c3be12f3e95a6ec1140af115e7ef28fcaa Author: Francisco Jerez Date: Wed Oct 13 18:45:04 2010 +0200 dri2: Implement the ScheduleWaitMSC/GetMSC hooks. Signed-off-by: Francisco Jerez commit eb83c830c87bce345748edef3b50660246143db7 Author: Francisco Jerez Date: Thu Oct 21 22:57:08 2010 +0200 dri2: Add pageflip/exchange support. Signed-off-by: Francisco Jerez commit c88f13e25b0040c1dd0f93e0ac40f62a6005ce59 Author: Francisco Jerez Date: Thu Oct 14 22:25:50 2010 +0200 Allocate a tiled scanout on pre-nv50 too. Pageflip between tiled and non-tiled surfaces isn't such a good idea. Signed-off-by: Francisco Jerez commit 4642d71bdffc04ce0dd458225541940c65f5443d Author: Francisco Jerez Date: Thu Oct 14 22:17:58 2010 +0200 dri2: Give out buffers ready for scanout. Signed-off-by: Francisco Jerez commit 75daada678d03d2e162f8003a6f2edcbe0525f92 Author: Francisco Jerez Date: Thu Oct 14 22:32:54 2010 +0200 Restructure tiled pixmap allocation in a single place. Signed-off-by: Francisco Jerez commit 70f0d2c886ceaa965ca4864788f4dd8e8f757a92 Author: Francisco Jerez Date: Thu Oct 21 22:55:02 2010 +0200 dri2: Add sync-to-vblank support. Note that you need a recent enough kernel for it to work. Use the "GLXVBlank" option to enable it (it defaults to disabled for now). Signed-off-by: Francisco Jerez commit 72dd4899ff036b09e3680ed2e09b3dbae3a7ba71 Author: Francisco Jerez Date: Thu Oct 21 22:31:45 2010 +0200 nv04-nv40/exa: Make the copy hook blit downwards for non-overlapping regions. Signed-off-by: Francisco Jerez commit 21ed642d3f76f286f23cd64ca817038ec94a1bf6 Author: Francisco Jerez Date: Wed Oct 13 18:22:22 2010 +0200 Make the sync-to-vblank helpers more consistent. Signed-off-by: Francisco Jerez commit 258e483d47f0f63155be18981c1118261f7675a8 Author: Francisco Jerez Date: Thu Oct 21 22:41:24 2010 +0200 kms: Register a wakeup handler to poll vblank/pageflip/udev events. Signed-off-by: Francisco Jerez commit 4f42708c26fa57bac7854701a6e757958c8d0654 Author: Francisco Jerez Date: Sun Oct 10 04:39:27 2010 +0200 Update to the last libdrm API. Signed-off-by: Francisco Jerez commit 8c8f15c9d3a31c35bf2ef20faf8c4133295a678f Author: Francisco Jerez Date: Sun Oct 10 04:36:17 2010 +0200 nv10-nv40/exa: Fix tiled pixmap pitch alignment calculation. Signed-off-by: Francisco Jerez commit a47c274f329b3b8bfbdcf155d6d832599d823dc8 Author: Francisco Jerez Date: Sun Oct 10 04:43:25 2010 +0200 Fix for the last xserver ABI. Signed-off-by: Francisco Jerez commit 9a5142fae6e1a0a470352f511427916e6fa01b9c Author: Maarten Maathuis Date: Fri Aug 27 21:11:59 2010 +0200 nv50/exa: Stop using wfb by default, but add an option to enable it. - Some scenarios, such as those heavy in core font rendering might prefer wfb. - Other (modern) situations are better of with wfb disabled. Signed-off-by: Maarten Maathuis commit d5a6f103113985c50bbe749ed341de34af1b47a5 Author: Francisco Jerez Date: Tue Sep 28 21:49:48 2010 +0200 dri2: Throttle frontbuffer flushes. There was no need for throttling until the hardware interchannel sync kernel changes because the pushbuf IOCTL blocked to sync the GL and X channels anyway. Signed-off-by: Francisco Jerez commit f1ac413d1d3dec2ccf63d4a8c79b9bd9ea578dcf Author: Ben Skeggs Date: Mon Sep 20 08:05:00 2010 +1000 nv50: use 0x8697 on NVAF Signed-off-by: Ben Skeggs commit 14c93acfc3fde04415e1c6a2a056465d15c86315 Author: Ben Skeggs Date: Fri Sep 17 13:17:37 2010 +1000 noaccel: fix rotation, as well as an assert during server shutdown Signed-off-by: Ben Skeggs commit 065576d5df0df4da61050d789f548801656b62d5 Author: Ben Skeggs Date: Thu Aug 26 13:22:33 2010 +1000 dri2: remove explit flush from copy_region() Unnecessary now that we kickoff from within the flush callback chain. Signed-off-by: Ben Skeggs commit 34025f0dc9284873d4bf7e4f547ed69fc562a3c9 Author: Ben Skeggs Date: Thu Aug 26 13:19:39 2010 +1000 kickoff from the flush callback chain This is a port of intel commit: 69d65f9184006eac790efcff78a0e425160e95aa Submit batch buffers from flush callback chain There are a few cases where the server will flush client output buffers but our block handler only catches the most common (before going into select If the server flushes client buffers before we submit our batch buffer, the client may receive a damage event for rendering that hasn't happened yet Instead, we can hook into the flush callback chain, which the server will invoke just before flushing output. This lets us submit batch buffers before sending out events, preserving ordering. Fixes 28438: [bisected] incorrect character in gnome-terminal under compiz https://bugs.freedesktop.org/show_bug.cgi?id=28438 Signed-off-by: Kristian Høgsberg Signed-off-by: Ben Skeggs commit 390f1c86d9583f4ceabd407ee47410073c2a1b55 Author: Ben Skeggs Date: Fri Aug 20 09:48:32 2010 +1000 nv50/xv: support UYVY Signed-off-by: Ben Skeggs commit 00d390952c912d4e9fc2c962caaeb90bf563d5b1 Author: Maarten Maathuis Date: Fri Aug 13 22:24:26 2010 +0200 nv50/xv: Fix the uncommon codepath to use width/height variable. - The common codepath should be the correct one, because that is triggered often, while the other is rare. - This isn't neccesarily a problem, but let's be on the safe side. Signed-off-by: Maarten Maathuis commit f5b486dd237679aec1987985f9ecffc6a4fd3105 Author: Maarten Maathuis Date: Fri Aug 13 22:16:51 2010 +0200 nv50/xv: We have 18 relocs, not 16, adjust MARK_RING. Signed-off-by: Maarten Maathuis commit 1cb6c91a9afe88d73f8a1180b00f56a9150a16ed Author: Roy Spliet Date: Sat Aug 7 20:59:06 2010 +0200 nouveau_exa.c: move line_count logic out of UTS/DFS loop Signed-off-by: Roy Spliet Signed-off-by: Maarten Maathuis commit 9f50b62229d5984ee5c16bc54953c7f8e2d5e575 Author: Ben Skeggs Date: Fri Aug 6 08:28:34 2010 +1000 nvc0: recognise these chipsets, and allow NoAccel mode on them Signed-off-by: Ben Skeggs commit b96170a4e51c1d3167601210ca31e98283c02885 Author: Francisco Jerez Date: Thu Aug 5 00:40:40 2010 +0200 nv10/exa: Bump maxX/maxY to 4096/4096. This way we can do accelerated 2D on larger pixmaps, it will still fall back to software when we hit the 2048x2048 texturing limit in a composite operation. commit 321eb2df5c8b1da4d6469037dd1d8888b508fabd Author: Francisco Jerez Date: Wed Aug 4 13:11:24 2010 +0200 Revert "nv04-nv40/exa: Match the blob behavior more closely on PrepareCopy." This reverts commit 9de0d97bd2fc2ee8800d48b5340a3d495525ad3e. Unnecessary after kernel commit "drm/nouveau: Ack the context switch interrupt before switching contexts.". commit db98ad23633958e52f84501c5a2061d42d346b64 Author: Francisco Jerez Date: Tue Jun 15 15:32:36 2010 +0200 dri2: Fix for the last DRI2InfoRec ABI. Just pre-fill the whole structure with zeros to avoid future segfaults. commit 9a3d0ab43f6335ab6cd48be4aa2f4f728386b386 Author: Ben Skeggs Date: Fri Jun 11 21:58:38 2010 +1000 call NVEnterVT from CreateScreenResources We need to grab DRM master here for things to work, so we may as well call NVEnterVT as we used to in NVScreenInit up until the previous commit. Fixes server regeneration. commit 964eeac6dc2209da6aa8861aa8b0bc028700ab3d Author: Ben Skeggs Date: Thu Jun 10 09:38:19 2010 +1000 fix for server 1.9 commit c079408e287ad09e954fa3985f95912c02cf06bc Author: Christoph Bumiller Date: Thu Jun 10 01:07:49 2010 +0200 nv50/accel: fix perspective interps in YUV to RGB shader commit 65153490f7d74d45a92adbd9c5e2bbe11c884b00 Author: Ben Skeggs Date: Wed Jun 9 16:12:28 2010 +1000 use libc directly for [cm]alloc/free commit 2958cf464dca9761f0fa21c8dd2d8fa8c8a96791 Author: Ben Skeggs Date: Thu May 27 10:06:47 2010 +1000 nv50/exa: rip out compat defines, we depend on 1.7 anyway commit af40bf0af47ebcb7de2dc418429f0b56f8c04d15 Author: Ben Skeggs Date: Wed May 26 16:11:01 2010 +1000 nv50/exa: new nouveau_class.h has correct blend func defines commit 8950c5b2a0d318e2568bec38a39d744b968c9b85 Author: Ben Skeggs Date: Wed May 26 16:09:48 2010 +1000 update nouveau_class.h commit 4b8f1a082069a17555d4142003213cf83d4e5464 Author: Lubomir Rintel Date: Mon May 10 09:25:55 2010 +0200 Handle startup without monitor attached more gracefully Refuse to configure a screen which has no valid modes. Otherwise X server would crash attempting to dereference to modes list later on. Signed-off-by: Ben Skeggs commit ac8f8d14a82ae8ba5b41fa88903edcad67f339c2 Author: Maarten Maathuis Date: Fri May 7 20:51:43 2010 +0200 wfb: use 28 bits instead of 32 bits for multiply_factor optimisation - Avoiding division in a hot code path is noticable even on an otherwise idle computer, but it's subject to rounding errors. If anyone knows a corner case and has better ideas, don't hesitate to contact me. For the moment this should make the problem less likely to trigger. Signed-off-by: Maarten Maathuis commit 13c10430ba8f7b0edff3ad8aae4a97672eea4a8f Author: Ben Skeggs Date: Fri Apr 23 14:09:35 2010 +1000 Bump version number to 0.0.16 Forgotten when the ABI broke a while back.. commit 6ff8ade0c7cd835b4172257ea310a8d88f28e757 Author: Ben Skeggs Date: Fri Apr 16 16:09:51 2010 +1000 Add uevent support When a hotplug event is received from the kernel we should notify the client side to reconfigure the display. Ported to nouveau from radeon driver, based on work by ajax in intel driver. commit 4063616938f76af8028491276039d422c0782b1b Author: Ben Skeggs Date: Fri Apr 9 20:43:51 2010 +1000 Import latest nouveau_class.h from renouveau commit bfb95cc0ca600135474ff02a99889b09d41b3c80 Author: Rico Tzschichholz Date: Thu Apr 1 20:39:23 2010 +0200 Fix "make dist". - remove README.NV1 reference from Makefile.am - add nv_rop.h to src/Makefile.am Signed-off-by: Francisco Jerez commit 2462b417fc550b71f021ca9736808f8f2d1cb6f0 Author: Ben Skeggs Date: Mon May 4 17:04:34 2009 +1000 xv: only use bicubic filtering when scaling >=2x commit e2146d3b29a4bea3d584c145e3190c3313692ed9 Author: Francisco Jerez Date: Thu Mar 18 14:32:54 2010 +0100 Fix for the latest nouveau_class.h. Signed-off-by: Francisco Jerez commit 7858345b6b384e88902ccc516715156401edec04 Author: Ben Skeggs Date: Tue Mar 16 13:08:37 2010 +1000 nv50: fix texturing from >=4GiB mark commit 6b8b15731b7610c9d8fb3625861797a0c9fd9546 Author: Xavier Chantry Date: Fri Mar 5 00:53:47 2010 +0100 Remove leftover in man page and nv_const.h Signed-off-by: Xavier Chantry Signed-off-by: Francisco Jerez commit c642b9f7a13bdeecd0a83ddcbf6d6d4f2c287501 Author: Francisco Jerez Date: Fri Mar 5 14:27:08 2010 +0100 kms: Don't try to copy fbcon contents when there's no framebuffer bound. drmModeGetFB complains loudly when it's given an invalid framebuffer id, bail out earlier if that's the case. Signed-off-by: Francisco Jerez commit efd7a526ca1cbac10b33b9d5d4cf3e542bc9b73b Author: Ben Skeggs Date: Thu Feb 25 09:32:49 2010 +1000 fix typo commit 70d0a48b6c3f1a817bf850acd3bae48d063e56b9 Author: Ben Skeggs Date: Tue Feb 23 15:08:13 2010 +1000 Protect against potential crash for unknown connector types commit 83bbeea0d842094dd647e754608420a404eef6e3 Author: Ben Skeggs Date: Tue Feb 23 15:03:38 2010 +1000 Add connector name for eDP commit 29647021044463768cbfa3eead1416ef1cf27fa1 Author: Ben Skeggs Date: Thu Feb 18 14:17:57 2010 +1000 remove drm patchlevel check, libdrm checks this for us commit 9b4118d6d1fa488db86cd7d2875beea9cdefb096 Author: Francisco Jerez Date: Wed Feb 10 18:43:39 2010 +0100 Revert "kms: work around some bong hits with dpms" This reverts commit 98c9e4edb58374f18249e5c9c53b392fb8b4a1d1. AFAIK it's no longer needed. Signed-off-by: Francisco Jerez commit f7deabfec0dcec4f203f85cd8494a70fe8fa6ebb Author: Ben Skeggs Date: Thu Feb 11 08:39:49 2010 +1000 Pass pScreen to drmmode_fbcon_copy() commit 43524fcbb786c5b9e9ec25776560790aec208719 Author: Francisco Jerez Date: Wed Feb 10 17:58:24 2010 +0100 dri2: Fix crashes on server regeneration. Signed-off-by: Francisco Jerez commit f50577c117c82eea05e750fecd1ff5653105c648 Author: Francisco Jerez Date: Wed Feb 10 13:23:46 2010 +0100 kms: Clean up the set_mode_major hook. The X server already takes care of restoring the previous CRTC parameters after a failed mode set. As a bonus this patch fixes RandR13 projective transforms. Signed-off-by: Francisco Jerez commit b16792b553dee41fc81d74c6e453832807e36368 Author: Marcin Kościelnicki Date: Tue Feb 9 20:51:17 2010 +0000 Remove some UMS leftovers. Signed-off-by: Francisco Jerez commit c56bce93f120d0ff18895149d1984896372cdd60 Author: Francisco Jerez Date: Wed Feb 10 12:31:54 2010 +0100 kms: Don't pretend it works on xserver-1.5. Signed-off-by: Francisco Jerez commit 0917665d1f2f1e76b6a0e7a4c027512f9f45f41b Author: Francisco Jerez Date: Wed Feb 10 11:48:47 2010 +0100 kms: Kill nv_cursor_convert_cursor. Well, mostly, the remaining pitch conversion will be unnecessary soon. Signed-off-by: Francisco Jerez commit e75dd23bd28f636b4c1759633d8dbc775e799add Author: Marcin Kościelnicki Date: Fri Feb 5 18:09:55 2010 +0100 nv50/accel: Fix mangled A8+A8 shader. Turns out we used a misaligned long instruction near the end, and the shader was getting killed after writing R, A components. This has gone unnoticed since the remaining G, B outputs aren't actually used. commit 41fc1fdec47fa824c598e1f3d828f4c8c4a2cb71 Author: Marcin Kościelnicki Date: Sun Jan 31 19:29:32 2010 +0000 Update to new nouveau_class.h Signed-off-by: Francisco Jerez commit c94544c83ef84e96f8d132ac9ff9296c22c4468e Author: Francisco Jerez Date: Sun Jan 31 18:26:03 2010 +0100 nv10/exa: Fix up nv11 accel. Fixes an off-by-one error made when UMS was removed. Signed-off-by: Francisco Jerez commit a397b94e32e6b0109096aba09bbe7b5dcfdd8231 Author: Francisco Jerez Date: Sun Jan 31 18:11:06 2010 +0100 dri2: Fix for the new DRI2InfoRec ABI. Signed-off-by: Francisco Jerez commit 8b5c67145a9c29cd4c82f411f15e57723d76d0c0 Author: Francisco Jerez Date: Sun Jan 31 17:43:54 2010 +0100 nv10/exa: Fix build after the last nouveau_class.h changes. Signed-off-by: Francisco Jerez commit 2630a1553d560ce2c7391bc103d4a543f7d3d0da Author: Marcin Kościelnicki Date: Wed Jan 20 07:46:32 2010 +0000 Remove nv_dripriv.h, nv_local.h commit 2d341f7e0a0dc70a28c6091ef6919fc6c0d60561 Author: Ben Skeggs Date: Thu Jan 21 14:58:37 2010 +1000 xv: use nouveau_bo_new_tile() commit 2a76ff1106ee8c76bd2e16a4954b3c05714d1db3 Author: David Heidelberger Date: Mon Jan 18 11:50:19 2010 +0100 Remove deprecated NV1 readme commit fe484a9b635ad56afec7be086a56c692b00dd6d1 Author: Ben Skeggs Date: Wed Jan 13 16:14:41 2010 +1000 exa: remove nouveau_pixmap_offset() Completely useless now we don't have to try and support non-driver pixmaps. Signed-off-by: Ben Skeggs commit bbf79469a878a8ab5b4c07faadcfdc8d85ceac83 Author: Ben Skeggs Date: Wed Jan 13 16:07:13 2010 +1000 exa: remove nouveau_exa_pixmap_{map,unmap} Signed-off-by: Ben Skeggs commit 18e3a649f7df73bc1e6d199ecf7a62ddcfe37d6e Author: Ben Skeggs Date: Wed Jan 13 14:26:04 2010 +1000 Check for drm+kms availability in NVPciProbe() Signed-off-by: Ben Skeggs commit 6267b85460ef364aa51a7d33006940bb00a049d9 Author: Ben Skeggs Date: Wed Jan 13 12:03:14 2010 +1000 bump xorg-server requirement to 1.7 Signed-off-by: Ben Skeggs commit da5c0dc6040096fd12ddb6a04a22fada89115ccb Author: Ben Skeggs Date: Mon Jan 11 13:23:06 2010 +1000 remove more unused code Signed-off-by: Ben Skeggs commit 104b3ea842d4cebd993d3e7e9d55ebcadae0cf28 Author: Ben Skeggs Date: Mon Jan 11 12:59:12 2010 +1000 exa: Remove non-driver pixmaps path Signed-off-by: Ben Skeggs commit e8798d91eedc5d8337223b2257ca607da8a197de Author: Ben Skeggs Date: Mon Jan 11 12:48:00 2010 +1000 Remove pNv->NVArch Signed-off-by: Ben Skeggs commit 7a6f785de1732ec0af429a0b66d5d6ba45427dcb Author: Ben Skeggs Date: Mon Jan 11 12:00:19 2010 +1000 Remove pNv->Chipset use Signed-off-by: Ben Skeggs commit 68c1f908be5739692c9f0bde9c23f3dc2a7210ea Author: Ben Skeggs Date: Mon Jan 11 11:56:19 2010 +1000 remove pNv->VRAMPhysical Signed-off-by: Ben Skeggs commit 06499197d6eb07a272a1812e1c8bce886798a1d7 Author: Ben Skeggs Date: Mon Jan 11 11:51:14 2010 +1000 dri1: remove DRI1 support Signed-off-by: Ben Skeggs commit 6975651b0b74dca6edaee759fb1003f65189f1df Author: Ben Skeggs Date: Mon Jan 11 10:07:11 2010 +1000 xv: ifdef out another problematic piece of overlay support for the moment commit 17485c234ff191cee3dd19e3dd693a80b024e189 Author: Ben Skeggs Date: Wed Jan 6 14:58:15 2010 +1000 Initial pass at removal of non-KMS support. It's likely there's a lot more that can be cleaned up/removed as a result of this, we can handle that as we come across it. Signed-off-by: Ben Skeggs Signed-off-by: Francisco Jerez Acked-by: Maarten Maathuis commit 061cb284b93612848296599759b915a4d66b6d01 Author: Maarten Maathuis Date: Sun Jan 3 02:14:36 2010 +0100 exa: Some compat defines for new pixman formats. Signed-off-by: Maarten Maathuis commit 8ca5a7383aad0e0557b3c9a1e9edd5431cd509fc Author: Marcin Slusarz Date: Wed Dec 30 21:46:04 2009 +0100 start using BEGIN_RING_NI commit b259b7ce5e57e1d20111878318b4703a14ec27ec Author: Maarten Maathuis Date: Fri Jan 1 20:16:13 2010 +0100 nv50: always set semaphore handle and offset - This is in preperation of using semaphores for more than one thing. Signed-off-by: Maarten Maathuis commit 8deeed25014b36f8d60f25c7ea2509d88fcb52ae Author: Marcin Slusarz Date: Mon Dec 28 18:39:16 2009 +0100 nv50: upgrade nv50_texture.h - copy changes from mesa/src/gallium/drivers/nv50/nv50_texture.h - remove 2 redefinitions - fix R<->B rename (see df189c9efc0fbcdce816af483f0147ab635280d1 (nv50: TIC/TSC fixes and additions) in mesa repo) commit 1877ee268774443a58a7bb73244bd70c82d67879 Author: Marcin Slusarz Date: Thu Dec 24 21:29:10 2009 +0100 nv50/exa: add support for more color formats commit 8b3753fc34e3557b91c3bdebe7c8addfb148b3bd Author: Christoph Bumiller Date: Wed Dec 30 18:28:25 2009 +0100 nv50: check drawable.bitsPerPixel instead of depth to get format commit 920a346e14cdc40efe9e89c3583d8e573e7e2f87 Author: Marcin Kościelnicki Date: Mon Dec 28 16:11:51 2009 +0000 nv50: Dehexify and bring up to date with new method defines. Signed-off-by: Francisco Jerez commit 7c72ac1f47e19af97c997f57012e3af12f941894 Author: Francisco Jerez Date: Sat Dec 26 15:56:58 2009 +0100 nv10/exa: Fix for the latest nouveau_class.h changes. Signed-off-by: Francisco Jerez commit 6992d0e7a0cb3c32b16af0b724246e44f7a35d7e Author: Francisco Jerez Date: Thu Dec 17 19:13:08 2009 +0100 dri: Use classic mesa on the fixed pipe cards. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs commit 87b9916dd4b471a9b8b02f166f6553f04f219769 Author: Maarten Maathuis Date: Wed Dec 23 21:53:36 2009 +0100 kms: Remove the one-off offset of connector names compared to the kernel. - Seeing DVI-I-0 in xrandr and DVI-I-1 in the kernel logs can be a source of confusion. Signed-off-by: Maarten Maathuis commit bb1947831d9a4e080b8d1e9dba086af6527ef479 Author: Ben Skeggs Date: Thu Dec 17 13:08:34 2009 +1000 Revert "exa: map the pixmap bo after creation to ensure a useable driver pixmap" This reverts commit 740c9f3e79729e4e06c693e66826afbad9bd1ce5. To get the same effect as this commit, update to latest libdrm git. commit 03c7d675f6d12886b6bca8e0375888ecf1b393df Author: Francisco Jerez Date: Fri Dec 11 15:47:05 2009 +0100 dri2: Make the render targets tiled for pre-G80 cards. Signed-off-by: Francisco Jerez commit 963aaeff6b414f371eff3e8ce016f7707c60f7c0 Author: Francisco Jerez Date: Fri Dec 11 15:44:47 2009 +0100 exa: Pre-G80 tiling support. For now, pixmaps will only be tiled if driver pixmaps is being used and we're told to with the NOUVEAU_CREATE_PIXMAP_TILED usage hint. Signed-off-by: Francisco Jerez commit 41d8d511124fcbe83a3cc68aaf22c3ce0fb4eb8a Author: Francisco Jerez Date: Mon Dec 14 00:51:17 2009 +0100 kms: Allow interlaced/doublescan modes. After bcafdfbed6 (an X server commit) we have to explicitly state we can handle them. Signed-off-by: Francisco Jerez commit 740c9f3e79729e4e06c693e66826afbad9bd1ce5 Author: Maarten Maathuis Date: Sat Dec 12 22:27:30 2009 +0100 exa: map the pixmap bo after creation to ensure a useable driver pixmap - Large pixmaps (think of 8000x8000 pixmaps on NV50) will cause crashes otherwise because exa assumes driver pixmaps to be mappable. Handling this elsewhere is problematic. Signed-off-by: Maarten Maathuis commit 0b5120cf8ef2528a15d88054afdc6fc33eb521f5 Author: Ben Skeggs Date: Mon Dec 7 15:31:53 2009 +1000 Allow texturing from GART Unfortunately NV_CONTEXT_SURFACES_2D on most cards (probably only PCIE cards work actually, but that's not confirmed) rejects a GART DMA object, so the usefulness is a bit more limited than I'd hoped. commit 60a394222b410da8bb832935fc525132218b4d94 Author: Ben Skeggs Date: Thu Dec 3 21:14:00 2009 +1000 nv50: avoid touching 0x16b0 on 0x8597, it causes a DATA_ERROR from the GPU Signed-off-by: Ben Skeggs commit 95fc663d5fb653fc0a50aa4d589bbf3b9c79e928 Author: Ben Skeggs Date: Thu Nov 26 13:10:45 2009 +1000 shadowfb: fix segv on fb resize Signed-off-by: Ben Skeggs commit 1cf0cfa926dd78698ff8b8c2d776bcdaa6a867bd Author: Ben Skeggs Date: Thu Nov 26 10:04:43 2009 +1000 kms: zfill fb if we have no accel to do copy, better than random garbage commit 92578fb4db0feb549bea82d0874ba0e39a2b1ae2 Author: Francisco Jerez Date: Thu Nov 5 18:30:28 2009 +0100 nv10/exa: Rename VIEWPORT_SCALE to VIEWPORT_TRANSLATE. Signed-off-by: Francisco Jerez commit 9de0d97bd2fc2ee8800d48b5340a3d495525ad3e Author: Francisco Jerez Date: Thu Nov 5 13:29:09 2009 +0100 nv04-nv40/exa: Match the blob behavior more closely on PrepareCopy. Fix a somewhat indeterministic corruption problem on nv17 when there is stuff going on the other fifos (e.g. gallium but I've also reproduced it with an app just SIFM-ing memory around): in some cases it made the blits the X server had scheduled fail corrupting the nearby screen areas. Signed-off-by: Francisco Jerez Reviewed-by: Ben Skeggs commit 16ef9ff7e394a693fc74764d8bc2630e784947f3 Author: Francisco Jerez Date: Thu Nov 5 03:28:00 2009 +0100 nv10/exa: Spring-cleaning * Kill the A8+A8 hack. Recent enough X servers (>=1.7) fall back to ARGB glyphs for drivers not supporting A8 render targets. * Kill all the global state. It doesn't matter a lot yet but it might if we get multicard working at some point. * Other random clean-ups with no functional changes. Some numbers from x11perf -aa10text -aa24text -comppixwin10 -comppixwin500: * Before, with A glyphs: 12000000 trep @ 0.0025 msec (394000.0/sec): Char in 80-char aa line (Charter 10) 3200000 trep @ 0.0119 msec ( 84300.0/sec): Char in 30-char aa line (Charter 24) 8000000 trep @ 0.0036 msec (280000.0/sec): Composite 10x10 from pixmap to window 60000 trep @ 0.4813 msec ( 2080.0/sec): Composite 500x500 from pixmap to window * After, ARGB glyphs: 20000000 trep @ 0.0015 msec (649000.0/sec): Char in 80-char aa line (Charter 10) 4800000 trep @ 0.0057 msec (175000.0/sec): Char in 30-char aa line (Charter 24) 8000000 trep @ 0.0036 msec (280000.0/sec): Composite 10x10 from pixmap to window 60000 trep @ 0.4813 msec ( 2080.0/sec): Composite 500x500 from pixmap to window Signed-off-by: Francisco Jerez Tested-by: Pekka Paalanen commit e1c2efd7e7703f5860e5fe99e0413e3be10576d4 Author: Ben Skeggs Date: Thu Nov 5 13:04:17 2009 +1000 kms: don't update drmmode_output->mode_output when vtSema is FALSE Fixes fast user switching issues. Signed-off-by: Ben Skeggs commit aed811e71b544dccfe84671f962503342acb75ab Author: Ben Skeggs Date: Wed Nov 4 18:03:12 2009 +1000 exa/nv10: handle reloc failures commit 5315034b7d46980a3527c814526857aed3bc98f7 Author: Ben Skeggs Date: Wed Nov 4 16:52:02 2009 +1000 xv/nv04: handle reloc failures + fail on bad surface format commit 99b1bf3d3e6b8c8ef2aa4aae3e33f3908cd00dab Author: Ben Skeggs Date: Wed Nov 4 16:46:35 2009 +1000 xv/nv40: don't even try with unknown surface format commit c1447574a025416f92f8dec2c361859c3945db92 Author: Ben Skeggs Date: Wed Nov 4 16:46:18 2009 +1000 xv/nv40: handle reloc failures commit 6ca14ba77104542a2915af8dca56236646be139a Author: Ben Skeggs Date: Wed Nov 4 16:41:58 2009 +1000 xv/nv30: don't even try with an unknown surface format.. commit 53ef7be58a2c46b2b5ffe912dcd408d74705ccbf Author: Ben Skeggs Date: Wed Nov 4 16:41:44 2009 +1000 xv/nv30: handle reloc failures commit 6facc0f765c1130aeb19ddfb76cbaaabaecf3f4a Author: Ben Skeggs Date: Wed Nov 4 16:36:09 2009 +1000 exa/nv40: handle reloc failures commit a97501a4e64d690be4232b01f9a3663fc2338c8a Author: Ben Skeggs Date: Wed Nov 4 16:31:56 2009 +1000 exa/nv30: handle reloc failures commit 222d13a03b41eb610a05063f81f0c47f57e6098e Author: Ben Skeggs Date: Wed Nov 4 16:02:50 2009 +1000 exa/nv04: handle reloc failures commit bd8aa7515f69c412e8f379777c49d59364df32fe Author: Ben Skeggs Date: Wed Oct 28 12:59:59 2009 +1000 xv: handle reloc failures commit 0214cb8b25a6959573bfc183b259b435f0a728bd Author: Ben Skeggs Date: Wed Oct 28 12:55:25 2009 +1000 xv/nv50: handle reloc failures commit e84e98d7f9260006a8b16a5785e4d2926d2370d4 Author: Ben Skeggs Date: Wed Oct 28 12:47:49 2009 +1000 exa/nv50: handle reloc failures commit 62c5c875e4c0812815be48f74bdef25d9f046515 Author: Ben Skeggs Date: Wed Oct 28 12:30:24 2009 +1000 exa: handle reloc failures commit c839f6098451aa59c7cb1fd7819e17a966e8ace7 Author: Marcin Slusarz Date: Sun Nov 1 22:16:50 2009 +0100 nv30/exa: support more 16bpp formats Signed-off-by: Marcin Slusarz commit 1d93e207db6e5a58b702c1812feaeb6b7252bc70 Author: Marcin Slusarz Date: Sat Oct 31 20:24:52 2009 +0100 nv/exa: fix 15/16 bits solid fill after this change nouveau passes all fill and blend tests of rendercheck (before: fill - 108/120, blend - 3323868/3569150) tested on NV34 Signed-off-by: Marcin Slusarz commit df5f17e59a7f42781b388074798d26f7981b2296 Author: Arthur HUILLET Date: Mon Nov 2 15:56:56 2009 +0100 nv10exa: improve codestyle Signed-off-by: Arthur HUILLET commit 5587f40c1b8af7d178f9a68d0f1fecdfc0ca9749 Author: Ben Skeggs Date: Fri Oct 30 14:01:09 2009 +1000 exa: force the use of sysmem pixmaps on low-mem cards Very similar effect to forcing MigrationHeuristic "greedy" on classic EXA. Far better than the migration ping-pong that'd occur otherwise Signed-off-by: Ben Skeggs commit 718a41b9a2b5649ac37c18f456b94eaf99584598 Author: Ben Skeggs Date: Thu Oct 22 12:35:32 2009 +1000 nv50: NVA8's 3D object class is 0x8597 commit 7494b18bf4061fb960a2126c745721161baddd01 Author: Francisco Jerez Date: Sun Oct 18 19:45:02 2009 +0200 nv50/crtc: Don't perform the LUT expansion twice. Signed-off-by: Francisco Jerez commit b161a7f7fa81b6d499c91c17f988a38ed537ed35 Author: Francisco Jerez Date: Sun Oct 18 19:41:11 2009 +0200 nv04-nv40/crtc: Don't perform the LUT expansion twice. Fixes bug 24595. Signed-off-by: Francisco Jerez commit 9cbc139176ae991150bd9ddf66b61db471b391f2 Author: Francisco Jerez Date: Sun Oct 11 23:42:01 2009 +0200 Partially revert "kms: always set gamma on modeset" 6c8d3e39b72abe897b08d9e90cae85e121863d2c breaks gamma setting with servers older than 1.7. Keep the call to xf86HandleColormaps even with KMS enabled, as it's a no-op in the cases we don't need it. Signed-off-by: Francisco Jerez commit cef4b61b4d0cf096428d89eff65a78fd16f612d5 Author: Francisco Jerez Date: Sun Oct 11 20:23:45 2009 +0200 Fix NVLoadPalette for 15/16 bit depth. Signed-off-by: Francisco Jerez commit cc4f7a733e3504260437d06091490fcb8a4c8063 Author: Francisco Jerez Date: Sun Oct 11 20:31:11 2009 +0200 Remove an useless call to NVLeaveVT from NVCloseScreen. Signed-off-by: Francisco Jerez commit 5a4afade51fe5fd149f8726fc243fbb69a660bf3 Author: Francisco Jerez Date: Thu Oct 8 03:33:34 2009 +0200 nv10/exa: Replace "celcius" with "celsius". Signed-off-by: Francisco Jerez Tested-by: Pekka Paalanen commit 2e744325827d702b564c5d6becaf65f3ad164761 Author: Francisco Jerez Date: Sun Oct 11 17:40:56 2009 +0200 nv10/exa: Allow component-alpha masks. Signed-off-by: Francisco Jerez Tested-by: Pekka Paalanen commit c3bb746ab6b371e843e1754a919dd25fa7b96b19 Author: Francisco Jerez Date: Sun Oct 11 17:38:44 2009 +0200 nv10/exa: Fix PictOpAtopReverse for destination pixmaps with no alpha channel. Signed-off-by: Francisco Jerez Tested-by: Pekka Paalanen commit f0a3d9f59817ebf2b9606097785f0ad1ae45da12 Author: Francisco Jerez Date: Sun Oct 11 16:15:30 2009 +0200 nv10/exa: Refactor the reg combiner/alpha blending code. Signed-off-by: Francisco Jerez Tested-by: Pekka Paalanen commit 3f020b0bf2e8d2bc54eceda771829c4b2535688a Author: Ben Skeggs Date: Thu Oct 8 16:19:16 2009 +1000 kms: reload cursor on modeset, needed on rotation (rh#524632) commit 38d7520986078fd01c19957a75ebfd9d91665225 Author: Ben Skeggs Date: Thu Oct 8 11:34:20 2009 +1000 kms: switch to CP+MPH instead of GetScratchPixmapHeader commit 6c8d3e39b72abe897b08d9e90cae85e121863d2c Author: Ben Skeggs Date: Wed Oct 7 15:57:49 2009 +1000 kms: always set gamma on modeset fixes issues vt-switching between console and X of different depths. commit b13c0509be63f27a4a9c918112d0a0fc84ccce10 Author: Christoph Bumiller Date: Wed Sep 16 18:17:30 2009 +0200 nv50/exa: use A8 RT format for PICT_a8 Signed-off-by: Ben Skeggs commit 7a63e4c61cd5d082caf074702cde79e1a66354b0 Author: Christoph Bumiller Date: Tue Oct 6 11:58:39 2009 +0200 nv50/exa: cleanup shader settings Since we only pass through 2D coordinates in the VP, no need to occupy extra output registers for HPOS z and, which can be coded as 0, 1 into VP_RESULT_MAP. We don't have to fetch all 4 attribute components if we only read 2 in the VPs. Using 0x1, 0x1 as terminator instructions looks odd, just make the last ones that do something long and set the exit bit. Setup VP_RESULT_MAP and INTERPOLANT_CTRL correctly. Signed-off-by: Ben Skeggs commit 60818bdeb975a9f469d3ae890932d4de1cbb59f9 Author: Ben Skeggs Date: Wed Oct 7 10:49:00 2009 +1000 kms: don't copy fbcon if depths don't match commit dd8339fc4e18fa4fd409f2997db741be209e852d Author: Ben Skeggs Date: Tue Sep 29 10:52:53 2009 +1000 Pass NULL fb pointer to fbScreenInit when using EXA Fixes 1.7 xserver getting very confused... commit 6dbdc80016c2a81c390d77db613833cd4d15c617 Author: Ben Skeggs Date: Tue Sep 29 09:00:59 2009 +1000 exa: make tiled scanout a separate condition from wfb being used commit 96d025232e292a8b1aebd54eaad3a21dbf6e2f77 Author: Maarten Maathuis Date: Fri Sep 25 19:50:11 2009 +0200 nv40/exa: fallback on special case xrgb non-repeat textures commit ed05bd6dab4fdd1289947154df02cd21c0839574 Author: Maarten Maathuis Date: Fri Sep 25 19:49:14 2009 +0200 nv30/exa: fallback on special case xrgb non-repeat textures commit dd7b86cb5351a60f21eee9cf81ae0ef61cf45f13 Author: Maarten Maathuis Date: Fri Sep 25 19:39:24 2009 +0200 exa: fallback on src pictures without drawable commit de0b095a1deaa1e53e1f555a6eb537482c488638 Author: Maarten Maathuis Date: Thu Sep 24 19:21:59 2009 +0200 nv50/exa: avoid fallback on xrgb repeat none when dst has no alpha - This should fix resizing slowness in evince amongst other things. commit df94ebdbcd89c1678ac243217e7f5b20cbbe857c Author: Ben Skeggs Date: Mon Sep 21 08:37:27 2009 +1000 kms: use displayWidth for pitch calc in transition, not virtualX (rh#523281) commit 5a6c3c427796f7f3dac0f597a320b09feb25ffc8 Author: Ben Skeggs Date: Wed Sep 16 15:13:08 2009 +1000 dri2: call CreatePixmap rather than yet another custom-built one commit 95086de507df7c5676c7ee712139ac4c91c9f6d2 Author: Pekka Paalanen Date: Tue Sep 15 20:31:33 2009 +0300 Partially revert "kms: wait for fbcon to be copied before continuing" This partially reverts commit 6c045fc44783454180d7b3d00b5f25436bd5544e. The nv_driver.c hunk of the above patch breaks the build on at least git and 1.6.3.901 xorg-servers due to: nv_driver.c:745: error: 'struct _ScrnInfoRec' has no member named 'canDoBGNoneRoot' Signed-off-by: Pekka Paalanen commit 6c045fc44783454180d7b3d00b5f25436bd5544e Author: Ben Skeggs Date: Mon Sep 14 13:04:12 2009 +1000 kms: wait for fbcon to be copied before continuing commit 22971d5545a2cd03e5c0b5d5d16fb85d7fff2aff Author: Ben Skeggs Date: Thu Sep 10 16:05:15 2009 +1000 dri2: switch to bo_new_tile() commit 806eaf6b0b36cb05ca9d883ff4572629812a1d48 Author: Ben Skeggs Date: Thu Sep 10 12:00:44 2009 +1000 kms: rework fbcon transition This does 2 things. Most importantly, it avoids a situation where we get multiple GEM handles for a single object, making it possible to confuse the kernel if both appear in the same push buffer. Secondly, it moves the transition to only on X startup, and not on every modeset etc. commit f90edc168c4a18b20750043d33c193bdc1b89156 Author: Ben Skeggs Date: Wed Sep 9 09:23:58 2009 +1000 Revert "nv50: use 0x7000 everywhere for now, until we can fix mixed mode alignment" This reverts commit c80f125a97003c2d0db77f54e22d9de447a06f63. This was not supposed to sneak in.. commit ff6bdb14ac13168c1a4b7866784e4833a1162dbc Author: Ben Skeggs Date: Wed Sep 9 09:19:42 2009 +1000 Revert "kms: fetch active encoder during init if there is one" This reverts commit 4f66fc6e871969448eba25817bfb383f2fdd4b34. See reason in previous commit. commit 9708e50e820970d526b084e0ab736c1c7a4f50c0 Author: Ben Skeggs Date: Wed Sep 9 09:18:48 2009 +1000 Revert "kms: update encoder config during detect" This reverts commit 25610704d4b16293f5bc24d5ad18cc76e20896d2. Very bad thinko, drm_mode_get_connector.encoder_id is *not* the same thing as our DRM's nouveau_connector.detected_encoder. Need to find a better way of achieving this. commit c80f125a97003c2d0db77f54e22d9de447a06f63 Author: Ben Skeggs Date: Tue Sep 8 16:20:33 2009 +1000 nv50: use 0x7000 everywhere for now, until we can fix mixed mode alignment commit 25610704d4b16293f5bc24d5ad18cc76e20896d2 Author: Ben Skeggs Date: Tue Sep 8 11:33:51 2009 +1000 kms: update encoder config during detect commit 4f66fc6e871969448eba25817bfb383f2fdd4b34 Author: Ben Skeggs Date: Tue Sep 8 11:26:29 2009 +1000 kms: fetch active encoder during init if there is one commit 2b5ec6ad708164eb9b2df00f453ea84f4898153a Author: Ben Skeggs Date: Fri Sep 4 10:35:57 2009 +1000 kms: only call drmModeSetCursor when cursor is visible It seems we get load_cursor_argb() calls even when the cursor is hidden, and the drmModeSetCursor() call would then decide a cursor is available and show it on outputs where the cursor shouldn't have been actuve. commit 569a17a98d03d965f9500c37c0cb14e0fb462311 Author: Francisco Jerez Date: Thu Aug 20 18:44:38 2009 +0200 kms: No need to upload gamma on set_mode_major in older X servers. Fixes build for CRTC ABI < 3. Signed-off-by: Francisco Jerez commit 32fc8a9a3104b38fe89427ffa60d21dad1572c15 Author: Francisco Jerez Date: Thu Aug 20 18:43:58 2009 +0200 kms: Fix commit e4e6f863b626d77934935e13714c6cbfd014d916 Author: Maarten Maathuis Date: Thu Aug 20 12:04:26 2009 +0200 kms: actually call kernel when loading cursor image - In the past we depended on getting a cursor show to call the kernel and actually make it visible. commit 95f09df23efd0a36d29cb4810faa659f839194f0 Author: Ben Skeggs Date: Thu Aug 20 15:48:26 2009 +1000 kms: prevent X from hiding cursor before updating image This wasn't noticeable when everything was being done in userspace. However, with KMS there's more of a delay between the hide<->update<->show steps and this produces a noticeable flicker. If there's any good reason we shouldn't be updating the cursor image while it's being shown, we'll handle it transparently in the DRM as required. commit fe2b5e6c6f81f4c4a76f5e4c5816812459872af3 Author: Maarten Maathuis Date: Wed Aug 19 22:06:42 2009 +0200 kms: fix gamma - crtc->active is needed in order to set the gamma manually - the initial gamma must be set by us commit 9d270f65ee85dedc6bf9cd9cf24e3d8df062f670 Author: Maarten Maathuis Date: Tue Aug 18 21:59:10 2009 +0200 exa: update to latest CreatePixmap2 + do not align width to 64 - Only the pitch needs to be aligned to 64. commit b50110d00e32396e186168271adbb88ace8ba986 Author: Francisco Jerez Date: Mon Aug 17 16:54:48 2009 +0200 kms: Some TV-out fixes. commit 523feba8fdc6d285929ac72be0a6e037019f019e Author: Maarten Maathuis Date: Mon Aug 17 00:09:42 2009 +0200 wfb: more correct and more error tolerant - In a strange world it is possible that a high index is tiled, and a lower index empty. - This should avoid that loophole and also emit a warning when we run out of indices. commit 3db3e5350e2f6dea50cd2bce0c5fb0437fe08dcf Author: Francisco Jerez Date: Wed Aug 12 02:18:27 2009 +0200 kms: Implement output->get_property when RandR1.3 is available. This allows getting updated values when the kernel is modifying them behind our back. commit ba9817b88d31364a5d43d945359e357535aeb09a Author: Francisco Jerez Date: Wed Aug 12 02:18:26 2009 +0200 kms: Don't hardcode the output properties Replicate any properties the kernel exposes. Mostly taken from the intel DDX. commit 92f271020a1b9486bd5890a00649aed3678ead62 Author: Ben Skeggs Date: Thu Aug 13 15:40:52 2009 +1000 nv50/xv: provide SYNC_TO_VBLANK attribute commit ada1d36d7097c389c8e21707d36b3cdd6378db94 Author: Ben Skeggs Date: Thu Aug 13 15:38:14 2009 +1000 xv: disable overlay with kms for the moment commit 85b1c86983a39cb921bd68a8601785975c948e2d Author: Ben Skeggs Date: Mon Aug 10 11:42:15 2009 +1000 dri2: call exaMoveInPixmap() before accessing driver pixmap private commit 292f46a0a0e031fc8a4256aa1eed91e3b2167acd Author: Ben Skeggs Date: Mon Aug 10 11:36:56 2009 +1000 xv: call exaMoveInPixmap() for driver pixmaps commit 0210fbf01d61fb0541770d541b71396537bcb728 Author: Christoph Bumiller Date: Sun Aug 9 14:53:28 2009 +0200 nv50/exa: fix pointer increment in UploadSIFC We always output 'size' dwords to the ring buffer, so the pointer should be advanced accordingly, independent of cpp. commit 1ac7d83c1e46a164c4a3a3688de1bcde9e5a58e0 Author: Maarten Maathuis Date: Sat Aug 8 19:41:02 2009 +0200 wfb: don't default to linear when encountering a pixmap without bo - With exa "mixed" there are actually very valid cases where this happens. - This fixes certain types of corruptions, like the yellow and black in a gimp window. commit 64790e950e7f46e6f4f5b8486f8d0bd929cb5504 Author: Maarten Maathuis Date: Fri Aug 7 16:12:41 2009 +0200 Revert "nv50: enforce certain allignments on a tiled frontbuffer, as well as overallocate it a bit" This reverts commit dd72640c8133ee78304f875023134f214d94a630. Moved to the kernel. commit dd72640c8133ee78304f875023134f214d94a630 Author: Maarten Maathuis Date: Fri Aug 7 11:56:29 2009 +0200 nv50: enforce certain allignments on a tiled frontbuffer, as well as overallocate it a bit - There is reason to believe that with driver modifications (part of) this won't be needed. - Until then this should fix "tiles" appearing at the upper left or lower right corner. commit bfbe4d33679cc25939db0da729d89ba2a4295764 Author: Ben Skeggs Date: Fri Aug 7 16:02:27 2009 +1000 exa: default to enabling driver pixmaps if everything else is new enough commit 30ddd08bb2739514edf6d6e137f533b34a4369d2 Author: Ben Skeggs Date: Fri Aug 7 16:01:27 2009 +1000 exa: turn on new exa migration mode for driver pixmaps commit 712064e6188d65e2c7d85078b95a0292edcad0e7 Author: Ben Skeggs Date: Wed Aug 5 14:00:51 2009 +1000 nv04-nv40/exa: set cliprect to drawing area for IFC commit 7f63da83d8622176114ecd55048736fecd703322 Author: Ben Skeggs Date: Wed Aug 5 12:04:46 2009 +1000 dri: close before dropping master commit 0cc44b713ec07dfb56a4b4a6d7ae1c1a75c74971 Author: Ben Skeggs Date: Wed Aug 5 11:57:01 2009 +1000 Set/Drop master in Enter/LeaveVT commit 087e9f61b81ea90a1591d8b43e29bda091156405 Author: Ben Skeggs Date: Wed Aug 5 11:51:54 2009 +1000 dri: close before taking down accel Fixes "failed to destroy server context" errors on exit. commit 96ac8c5a9473d81b737afa116f4fd388e3152f50 Author: Ben Skeggs Date: Wed Aug 5 11:36:39 2009 +1000 nv04-nv40: deal with framebuffer resize in !kms_enable mode commit b8ea3b41b0540635585bc68334691414f7cff53d Author: Ben Skeggs Date: Wed Aug 5 11:30:51 2009 +1000 nv50: deal with framebuffer resize for !kms_enable commit d0dcc89825acb4b480f3849d8896b17a80df02f4 Author: Ben Skeggs Date: Wed Aug 5 11:28:45 2009 +1000 No wfb without KMS commit 2c7502680e1ab3a4ea4869a78d0317746084dd92 Author: Ben Skeggs Date: Wed Aug 5 08:55:09 2009 +1000 dri2: fix CopyRegion() commit 2a4c93a064353cf61c30dd1e96f93203895beb15 Author: Ben Skeggs Date: Wed Aug 5 08:36:26 2009 +1000 dri2: merge DRI2BufferRec and nouveau_dri2_buffer into a single struct commit 4f386f983fde197e9136ffe6fbf941a343996897 Author: Ben Skeggs Date: Wed Aug 5 08:20:46 2009 +1000 dri2: remove support for < version 3 commit 0f691257e6d2c3662f9c76adc3287f5320a8822d Author: Ben Skeggs Date: Mon Aug 3 11:30:46 2009 +1000 zfill scanout buffer, not offscreen commit d893600356b3480d3df536a04e9860bfada5a159 Author: Maarten Maathuis Date: Sun Aug 2 19:43:58 2009 +0200 kms: remove fb in NVCloseScreen otherwise server regeneration fails - The bo was deleted, but fb_id remained non-zero, so it never picked up the new one. commit ac2a644773e5b160b6794a252b85c0bf8acc5169 Author: Ben Skeggs Date: Sun Aug 2 20:10:35 2009 +1000 xv: really fix offscreen pixmap calculation sleep.. good.. commit 60635e5073e69c6f690dc3c876772b5478013783 Author: Ben Skeggs Date: Sun Aug 2 19:42:17 2009 +1000 xv: fix check for offscreen pixmaps commit 1ecd4358c851b3d7bebfb00f5f7ac3c7c151bc20 Author: Ben Skeggs Date: Fri Jul 31 15:30:08 2009 +1000 Recalculate displayWidth if we do a late NoAccel fallback Fixes G80, where we'd have calculated the pitch for tiled scanout. commit 08ef8aaf2bd7b9565cc36679412b721499f9a367 Author: Ben Skeggs Date: Fri Jul 31 15:23:49 2009 +1000 Don't allocate offscreen memory or GART when using NoAccel commit 64a1515fab9764d0ada304426e7f0d7ec995b84e Author: Ben Skeggs Date: Fri Jul 31 13:49:49 2009 +1000 Fix NoAccel/ShadowFB with fb resize commit e9034a2e8d8285cf45cd1410b9e8933991f82a2b Author: Ben Skeggs Date: Fri Jul 31 13:29:11 2009 +1000 NoAccel + wfb == bad idea commit 69a40131b700a4fbc4de9432110045870de0806e Author: Ben Skeggs Date: Fri Jul 31 13:28:02 2009 +1000 Fix up screen pixmap's devPrivate.ptr after resize commit 4ea65c594a1f10f586da2ca32e499de2ea0a2605 Author: Ben Skeggs Date: Fri Jul 31 13:25:45 2009 +1000 Point fb at the correct buffer.. commit c6b98608daec4162a7d23ce8c1d50a4a9c3ca3dc Author: Ben Skeggs Date: Fri Jul 31 13:09:56 2009 +1000 Switch on can_resize for non-kms commit 4bb007ebb8e60c87c815f9c4ce63b8d1d46e8b75 Author: Ben Skeggs Date: Fri Jul 31 13:03:45 2009 +1000 Fall back to NoAccel if channel/object creation fails commit 641fdacbd1aeb9882caa30da6d568ff9a0bd78f5 Author: Ben Skeggs Date: Fri Jul 31 11:46:47 2009 +1000 nv50/exa: use scissored triangle for composite too commit c6c0ef1b5a837838a0fc2e8d1659b1b4d76d26b0 Author: Ben Skeggs Date: Fri Jul 31 11:23:04 2009 +1000 nv50/xv: enable sync-to-vblank commit b3d6861fa482a92807aadd9222ca2c8c605beaeb Author: Maarten Maathuis Date: Thu Jul 30 17:23:25 2009 +0200 nv50_xv: switch to a scissored triangle to avoid strange artifacts when vsync is enabled commit 9b37bc96d86882b7f9c355e92cbeff517090a98d Author: Ben Skeggs Date: Thu Jul 30 19:24:19 2009 +1000 more cleanup commit d8c10eb14f8d6b5cad88a39a5da7104a403060cd Author: Ben Skeggs Date: Thu Jul 30 10:17:38 2009 +1000 non-kms fb resize commit 3b1a861aa56f823e8d26f33b7139e290bf44b79d Author: Ben Skeggs Date: Thu Jul 30 07:14:17 2009 +1000 free scanout buffer in NVUnmapMem() commit 4d20547df30d630b94b0cfc28dcf7ead564f7369 Author: Ben Skeggs Date: Tue Jul 28 18:14:03 2009 +1000 nv50: tile scanout buffer for "classic" exa if xserver new enough commit 03bc3a604e5c12829f81f2582374d37012da7f36 Author: Ben Skeggs Date: Tue Jul 28 11:45:51 2009 +1000 kms: only use rounded height for allocation Fixes minor cursor corruption in some circumstances with driver pixmaps. commit e4fb3e7064df14b21a6ea34b919ccf2bf9fa0ca2 Author: Ben Skeggs Date: Tue Jul 28 11:27:09 2009 +1000 More fixing of pitches + use 0x7000 tile_flags for tiled 16bpp on nv50 commit 97cca7630441876414da5dfabb9ad9f2b208e29d Author: Ben Skeggs Date: Tue Jul 28 10:21:11 2009 +1000 kms: implement rotation support without driver pixmaps commit 786ff2994aa4f614b7cc9d466455eef183697d42 Author: Ben Skeggs Date: Tue Jul 28 09:43:00 2009 +1000 kms: simplify drmmode_is_rotate_pixmaps args commit ff62da668a468796e4001523958e73eb2060b7f2 Author: Ben Skeggs Date: Mon Jul 27 22:07:38 2009 +1000 dri1: dodgyness to "survive" a framebuffer resize (or rather, move) This can never work well without a lot of work, which I'm not willing to put in for DRI1. This will at least let it keep sort-of working, any DRI1 apps running when a resize event occurs will continue rendering into the old framebuffer. commit b77d580ebcc9b371153774010d29038645effffb Author: Ben Skeggs Date: Mon Jul 27 21:43:25 2009 +1000 We already map offscreen and store the virtual, no need to keep doing it commit bdf2c9aee02a100b44c083347a2415c100bd2546 Author: Ben Skeggs Date: Mon Jul 27 21:35:19 2009 +1000 kms: implement framebuffer resize without driver pixmaps commit 595b1c74e52f16ef482be6f14e4a33b4649b8bfd Author: Ben Skeggs Date: Mon Jul 27 07:44:41 2009 +1000 Fix build with 0.0.15 commit 9b879b9b38809e7d206c9e78610836bdd9c2d09b Author: Ben Skeggs Date: Mon Jul 27 21:09:42 2009 +1000 Cleanup commit 0336eb15ebc351ab6900b48972e12f5cc6abf1bb Author: Ben Skeggs Date: Mon Jul 27 17:52:15 2009 +1000 Switch to using scanout buffer detached from EXA offscreen memory area commit 0403cf3698ecb9a290bb4b7e24d0deedc957ad2a Author: Ben Skeggs Date: Mon Jul 27 17:45:29 2009 +1000 Allocate scanout buffer independently of EXA offscreen area This is just wasted memory for the moment... commit f8ac9e35bd20391f923c5c5ccc509251ea23a4c5 Author: Ben Skeggs Date: Mon Jul 27 17:30:54 2009 +1000 Remove NoDRM mode commit e259925bbdcebe4c3d136f476fc54f426eea9261 Author: Ben Skeggs Date: Mon Jul 27 17:14:00 2009 +1000 xv: fix some badness in nv3x/nv4x textured video adaptors commit 3a10daca16752b52ec3187deb8b1c25d6c6fd641 Author: Ben Skeggs Date: Mon Jul 27 16:05:03 2009 +1000 rename pNv->FB to pNv->offscreen Not strictly true right now, but it's about to be. commit 91bfda81982a77a79c2baee39929711b38b1ae6a Author: Ben Skeggs Date: Mon Jul 27 11:46:51 2009 +1000 exa: allow acceleration to rotation bo commit d59aaa81590b52b6227b69028f08d8ab62505525 Author: Ben Skeggs Date: Mon Jul 27 11:02:44 2009 +1000 exa: use PixmapIsOffscreen hook for non-driver pixmaps path too commit c442376d4e9a8296760c1171fee5ca155534d011 Author: Ben Skeggs Date: Mon Jul 27 07:44:14 2009 +1000 Fix typo exposed by removal of NV_* card type defines from DRM header commit 15bfc676094d19e57711bbdff40edd5c8e8592d6 Author: Ben Skeggs Date: Mon Jul 27 07:40:20 2009 +1000 Warning fixes commit 6eb790b6113a999727895694d01910b83348647a Author: Ben Skeggs Date: Fri Jul 24 13:54:49 2009 +1000 kms: keep rotate buffer pitch in crtc struct, rather than recalculating commit 25f29426293fcac2e7a17b986673b2874e7a7264 Author: Ben Skeggs Date: Fri Jul 24 13:18:22 2009 +1000 Wrap CreateScreenResources and set screen pixmap's BO there Avoids reallocating pNv->FB yet again when we hit the resize hook. commit d1628dc9159343400f09f696b9c4ef9d0fe1acbf Author: Maarten Maathuis Date: Tue Jul 28 10:08:40 2009 +0200 nouveau: remove some more RAC bits - The assumption is that RAC is dead anyway on post-libpciaccess xservers. commit 75fba5dfd2a00f3b8212d0e8af544273c14ee0c5 Author: Dave Airlie Date: Tue Jul 28 13:53:06 2009 +1000 nouveau: rip out resources code whats left at least commit 094e4e075f8e48ace534a6f011f95b6ebf1abc3b Author: Ben Skeggs Date: Thu Jul 23 11:25:22 2009 +1000 kms: don't skip resize call if we don't have a backing bo for screen pixmap commit bff801941e23dfe3fb7449af5780ee477b10d092 Author: Ben Skeggs Date: Thu Jul 23 11:23:15 2009 +1000 Fix a DRM vs DDX confusion typo commit e9ebddae840789535acf56ac2281b3fde3cfee96 Author: Maarten Maathuis Date: Wed Jul 22 12:51:08 2009 +0200 Fix build without AM_SILENT_RULES. commit f70287cf7cacc03d8390376519165d50a325cec5 Author: Peter Henriksson Date: Mon Jul 20 23:56:13 2009 +0200 Add support for AM_SILENT_RULES Make use of the AM_SILENT_RULES functionality in automake 1.11 Defaults to quiet output. Verbose output can be enabled with "./configure --disable-silent-rules" or "make V=1" Signed-off-by: Ben Skeggs commit 69ba1095a9aef29ce8fdb71ecf48f15cb13202c2 Author: Ben Skeggs Date: Tue Jul 21 16:29:13 2009 +1000 nv50/xv: attempt sync-to-vblank if driver pixmaps are being used commit 994c37927289de7a0ab6e951892f0d66880a6210 Author: Ben Skeggs Date: Tue Jul 21 14:05:59 2009 +1000 nv50: fix a number of tiled buffer sizing issues in kms paths commit 9c1eefd221366b9f5efbd30e4a28fba244347d4f Author: Ben Skeggs Date: Tue Jul 21 13:43:14 2009 +1000 Don't set driver pixmaps enabled with NoAccel commit 52882e82708f79ef198dde51f9bbebee752154be Author: Ben Skeggs Date: Tue Jul 21 13:19:07 2009 +1000 exa: fix nouveau_exa_pixmap_is_onscreen() for driver pixmaps commit 9fb28d107ad9fcd6a4bbb0a35c1fc0f719d531ae Author: Ben Skeggs Date: Tue Jul 21 12:52:35 2009 +1000 exa: remove ModifyPixmapHeader hook, it's not required commit 574fa36c73a1b04b67289762a10b5bbda7be083f Author: Ben Skeggs Date: Tue Jul 21 12:51:26 2009 +1000 exa: only support driver pixmaps on servers with CreatePixmap2 commit 365ab69499f466aeebac1437578609a7790f5dc4 Author: Ben Skeggs Date: Fri Jul 17 13:41:07 2009 +1000 remove explicit pin of pNv->FB on creation commit a757db1aadfd7a7d206dfc7968da8647dd91e65f Author: Ben Skeggs Date: Fri Jul 17 13:38:52 2009 +1000 no need to pin GART bo commit 474ebdeea1266959fddeabf04b24e04aaab8449e Author: Ben Skeggs Date: Fri Jul 17 13:37:29 2009 +1000 remove pinned creation from nodrm path commit b9333d5d34386d88b58d2267b388bbcc89b73f47 Author: Ben Skeggs Date: Fri Jul 17 13:35:20 2009 +1000 nv04-nv40: explicitly pin scanout buffer when required commit 53b5b68cd168b15c377f83e5e068cee92361f51d Author: Ben Skeggs Date: Fri Jul 17 13:31:13 2009 +1000 nv50: no need to pin rotate scanout buffers on creation now commit a57a9bb825e04bbe4aa94d9ac1149e2fca6525a4 Author: Ben Skeggs Date: Fri Jul 17 13:28:36 2009 +1000 exa: only allow driver pixmaps when KMS enabled The pre-KMS code can't deal with driver pixmaps in some circumstances, and rather than leave it there for people to accidently trip on, remove support. The other option would have been to fix the UMS code, but, who really cares? commit 5d7a0b954c0da879f81a6fa1a9dc8070c58a0fe6 Author: Ben Skeggs Date: Fri Jul 17 13:25:31 2009 +1000 remove remains of prehistoric NOUVEAU_EXA_PIXMAPS stuff commit 784a0337c3165c8d8fb696e4fa30bbdc8cf01b98 Author: Ben Skeggs Date: Fri Jul 17 13:18:06 2009 +1000 nv50: explicitly pin scanout buffer in non-kms path commit 09db6180e4205ef55516c24ac5dfc3bd861d9fd6 Author: Ben Skeggs Date: Fri Jul 17 13:12:25 2009 +1000 nv30: don't pin shader memory commit 7da55d99e3c93cadda50dcad06b09c52daa0cc5b Author: Ben Skeggs Date: Fri Jul 17 13:10:16 2009 +1000 xv: don't pin buffer unless using the overlay commit e8b9f689b778909e710fc5bd5616e6497b922a09 Author: Ben Skeggs Date: Fri Jul 17 13:07:04 2009 +1000 kms: don't pin scanout buffer, no need, kernel will do it commit b1b233099853b56cfdcff9c4c31d3550b76b949e Author: Ben Skeggs Date: Fri Jul 17 08:22:02 2009 +1000 Fix build with xextproto 7.1 commit c089a71a94e7887c405af7141e188302a5e2d393 Author: Ben Skeggs Date: Thu Jul 16 09:32:59 2009 +1000 dri2: fix for xserver abi change commit ef3a386a6df4569343e63332eb798c1d722fe164 Author: Ben Skeggs Date: Mon Jul 6 20:33:49 2009 +1000 Update manpage + finish removing useless options commit 4b6e0b96188e32cb2a13f8d2bd5973f0287c827b Author: Ben Skeggs Date: Mon Jul 6 20:25:23 2009 +1000 No need for pci access wrappers now.. commit 1e22673f43acd0f02ba36e189b39e28b635cd50c Author: Ben Skeggs Date: Mon Jul 6 20:16:02 2009 +1000 Remove non-XSERVER_LIBPCIACCESS paths, we depend on a new xserver anyway commit aafb62f86adebb3418876649e8bd189c1523e961 Author: Ben Skeggs Date: Mon Jul 6 20:08:03 2009 +1000 Some more bits of NVRec to go... commit 0ba588cb75af67a644f51add35778925d4088cf9 Author: Ben Skeggs Date: Mon Jul 6 19:58:15 2009 +1000 Rip out vgaHW + more unused vars from NVRec commit 3e22547b6826ae741b168c4b3391b6ade56b4829 Author: Ben Skeggs Date: Mon Jul 6 19:46:26 2009 +1000 Nuke nv_hw.c, and a heap of unused vars from NVRec commit eea5259d951a5919fa7800877570347c14411a32 Author: Ben Skeggs Date: Mon Jul 6 19:13:44 2009 +1000 Remove nv_dac.c commit a38b91a7a5c3337d405aa217830857832c5399e0 Author: Ben Skeggs Date: Mon Jul 6 19:09:09 2009 +1000 Cull everything in !pNv->randr12_enabled blocks commit 4815d312911cb4cfad4b4a5b194fce41d82f4869 Author: Ben Skeggs Date: Mon Jul 6 11:44:26 2009 +1000 kms: fix CRTC offset when rotation enabled commit 6d143272f497a61c5578752f58261befbfaf911a Author: Ben Skeggs Date: Wed Jul 1 14:03:06 2009 +1000 nv50: initial support for depth 30 commit 9b0919c3f3269b88fb338c043bbad34f20c22f41 Author: Ben Skeggs Date: Tue Jun 30 13:20:15 2009 +1000 kms: don't try transition when we don't have src+dst buffer ids commit c0bf670ac6b58cff60a01ab6b174ece6b1b7d892 Author: Ben Skeggs Date: Thu Jun 25 07:26:54 2009 +1000 wfb: fix stupid thinko + more safety commit a12cb5c8c0a85a601188178c5fc0d84a13abd87e Author: Ben Skeggs Date: Thu Jun 18 14:28:25 2009 +1000 bios: oops commit e66867e4cf9f0bc8a1971664ccc3d5c56b08b2fb Author: Ben Skeggs Date: Tue Jun 16 10:28:00 2009 +1000 bios: use image from PRAMIN in preference to PROM on NV50 There's at least one known case (rh#492658) where the DCB table present in the VBIOS image from PROM is not suitable for use. It contained all 16 entries filled, each entry valid in itself, but contradicting other entries. The VBIOS image in PRAMIN however, still has all 16 entries filled, but the first few entries now match what is present on the hardware, and the rest are set as type 0xf, which we ignore. commit 42c5730a4f6c243b75fbd40f1dc26e8433191c7b Author: Ben Skeggs Date: Tue Jun 16 09:48:39 2009 +1000 wrap BlockHandler a little earlier commit 09e663aea82403f69a0e44e3b7cd89dfe96970d5 Author: Ben Skeggs Date: Mon Jun 15 16:09:27 2009 +1000 kms: safer fb resize func commit 90be5d5d6a696564bda23e9a2dad14a3a1808868 Author: Ben Skeggs Date: Mon Jun 15 13:43:21 2009 +1000 wfb: use straight memcpy hook if no tiled wraps present commit 86d905d34a5693e3d9b986660d4a2bcd6f30a06a Author: Ben Skeggs Date: Mon Jun 15 13:41:21 2009 +1000 wfb: be more cautious in a few places commit 1bcbc4b26f71f90345bd82b836fc634e741aced8 Author: Ben Skeggs Date: Mon Jun 15 10:19:53 2009 +1000 kms: small cleanup commit c2d3550aafeb3e7c4df3334f0ac3554a8aa15da3 Author: Ben Skeggs Date: Mon Jun 15 09:16:10 2009 +1000 kms: fix rotation buffer pitch commit 6fd982979e03ce3eace7dc7523c428aca2c30b4a Author: Ben Skeggs Date: Mon Jun 15 09:00:02 2009 +1000 kms: point rotation pixmap at correct buffer commit 67f8ebe77f047c12d76e508b4d7f6384baed39ac Author: Ben Skeggs Date: Mon Jun 15 08:52:36 2009 +1000 nv50: create non-linear scanout buffers for rotation commit b7e3306ddc3693699f6f9de7b22913ee22ed31ed Author: Stuart Bennett Date: Sun May 31 00:26:13 2009 +0100 Add DVI-A output info for Mac card missing bios tables (#21273) The reporter indicates the card also has DVI-D and ADC, but those can't be tested to deduce the fake correct data at present commit 01b19c9fc25b147596e1719008ed9d861246ced9 Author: Ben Skeggs Date: Wed Jun 10 18:00:05 2009 +1000 nv50: sigh commit 4d9e63baff079fad727430fc605cb1e43c4303a7 Author: Ben Skeggs Date: Wed Jun 10 11:38:43 2009 +1000 wfb: "mode0" tiles have the same pitch as the others This appears to be the case now (as in: after making the GPU do some of the dirty work) even though it didn't in the previous wfb patches. commit 02ed6b66e37e13ab4064974b89db2e73613108ef Author: Ben Skeggs Date: Wed Jun 10 11:23:37 2009 +1000 wfb: work-around wfb suckage wfb sucks far more than anticipated: - can only expose a single set of rd/wr hooks, not per-wrap as wfb doesn't treat the hooks as per-pixmap. - the hooks will get called on buffers that aren't even pixmaps commit 669c59ecb69a6f84ef8b8714cda6e87eacb3de9f Author: Ben Skeggs Date: Wed Jun 10 09:15:37 2009 +1000 wfb: need a 64-bit datatype for multiply_factor commit 86dedb748cb6d047b195e50e921e840c1c403f6f Author: Ben Skeggs Date: Tue Jun 9 22:25:01 2009 +1000 fix some pitch issues commit 794a27724fb9ab173dc7ea8062730797e1b4de04 Author: Ben Skeggs Date: Tue Jun 9 10:54:54 2009 +1000 nv50: use libwfb for pixmap access when driver pixmaps enabled commit 11d9690dd9e1190d1f6873bb9a5df8f98a39d4f5 Author: Ben Skeggs Date: Tue Jun 9 09:10:57 2009 +1000 exa: use the sane CreatePixmap hook, if available commit 6ee453381f00063522187939cb54ab9447b73ec7 Author: Ben Skeggs Date: Thu Jun 4 14:43:54 2009 +1000 xv: fix some issues with driver pixmaps commit 67c5287f31bf20ab3a38ffcdee410d9d49ce4d2b Author: Ben Skeggs Date: Thu Jun 4 14:19:14 2009 +1000 exa: wait_marker becomes a NOP with driver pixmaps mapping/unmapping buffers will sync as necessary commit f44e52852a199196f8428822bf9fb71711b9c4f9 Author: Ben Skeggs Date: Thu Jun 4 14:08:10 2009 +1000 nv50: make use of larger tile sizes commit 30c44ce3142ba44fc7a6c95ceaa9bf028cc112c1 Author: Ben Skeggs Date: Thu Jun 4 13:41:36 2009 +1000 exa: create unacceleratable pixmaps (ie. 1bpp) in system memory commit 1aa22d5894c4e4efe746592bf1c51cdaf0c31c24 Author: Ben Skeggs Date: Thu Jun 4 13:20:37 2009 +1000 nv50: use non-linear scanout buffer when driver pixmaps enabled commit 13d8d49f74fb10f631bcd38b169068e691b9ca99 Author: Ben Skeggs Date: Thu Jun 4 13:11:40 2009 +1000 nv50: use tile_mode from bo should have no effect currently, but needed later commit bd9f5f2cbe7687aba7bb3a7f397d9b1bf87a8ef3 Author: Ben Skeggs Date: Thu Jun 4 12:11:48 2009 +1000 exa: fix compile against latest libdrm_nouveau commit 5f97afe38095a274938b8c2e9c5ebd17b7733bb6 Author: Stuart Bennett Date: Wed Jun 3 12:16:23 2009 +0100 randr12: split from pre-randr12 structs into new header, de-typedef New nv_crtc->state shortcut and some renaming included for convenience commit 0c17b8790086a529ee9e4b5aca4b6f19f31900a9 Author: Stuart Bennett Date: Thu May 28 22:40:30 2009 +0100 Move head getting into nouveau_hw.c commit 12314fa6abb2dd6d325a370724c7d16c371c229c Author: Stuart Bennett Date: Thu May 28 21:45:36 2009 +0100 randr12: improve uniformity of props code commit b541c1c4400942c59be37f62b7a25719dbdaa1a1 Author: Stuart Bennett Date: Thu May 28 18:23:37 2009 +0100 Remove "TMDS table script pointers not stubbed" bios warning Scripts appear to be init scripts (+7 one for 0x6808b?, +9 for 0x6828b?), which when the pointer is non-zero (and the script isn't 'q') get called at POST (at least on my nv4b). The warning, from a time when the scripts were thought to perhaps be needed for setting up outputs, seems redundant. commit 8af50289136e562198b5acc851629606d9ce450f Author: Adam Jackson Date: Thu May 28 15:08:35 2009 -0400 Remove useless loader symbol lists. commit 317b58166bf9f3189f33e99493cf8a1b40e014b8 Author: Stuart Bennett Date: Wed May 13 19:05:25 2009 +0100 randr12: disable lvds (invalidate all modes) if bios lvds parsing fails commit e897191c7bcf61193576ecf52d23fcddf5b70634 Author: Stuart Bennett Date: Thu May 28 16:42:29 2009 +0100 randr12: better behaviour (avoid crash) when fp native mode can't be found commit 03167483b41f7205dd1efc5b571ec73ec4b3cdb5 Author: Stuart Bennett Date: Thu May 28 02:18:52 2009 +0100 randr12: line length improvements commit b60c16cdcbeff2d02ea0866dfbb742c3880b7ae4 Author: Stuart Bennett Date: Wed May 13 02:21:17 2009 +0100 Simplify tests for digital fp outputs commit 992d4b5d3aa04f88c22e52e25dc2e3e7d9bd776e Author: Stuart Bennett Date: Thu May 28 15:59:12 2009 +0100 randr12: a bunch of trivial improvements and tidyups commit 6f0a324a503431d757b2247e7232de2eb7c318a5 Author: Stuart Bennett Date: Wed May 27 16:17:38 2009 +0100 Fix oopsy from 81bbdd4e causing broken framebuffer commit c5799186b1f70df0484c6cef63c8485ddf924733 Author: Stuart Bennett Date: Wed May 27 16:01:42 2009 +0100 randr12: fix two colour cursor on second head Colour caching was preventing cursor from being set correctly on second head commit 81bbdd4ee2e942d91d056a10ef993a8f41651c64 Author: Ben Skeggs Date: Tue May 26 15:48:25 2009 +1000 explicitly mark buffers mappable commit 6c09ad5296820a845571d07cbe42d88bb19560df Author: Stuart Bennett Date: Wed May 27 00:53:51 2009 +0100 Tolerate missing fp bios table (rh#502371) Modern desktop IGPs frequently miss it out, and now it seems even some laptop parts (MXM style) do too commit db9ff958291416dd5b72d20d32d7412ec45c1e60 Author: Ben Skeggs Date: Mon May 25 08:31:07 2009 +1000 kms: clip sw transition dims to smallest common area commit 2688c97169d8ea579ba09b9db049e31704f96626 Author: Ben Skeggs Date: Mon May 25 08:29:47 2009 +1000 don't run vbios parser when kms enabled commit 9656762ba186e91dd2b3b7f3f9427ba520982f9d Author: Ben Skeggs Date: Thu May 14 10:26:44 2009 +1000 nv50: fix multiple-display hangs when encoders swap crtcs commit d70eed91b2909ba0b20415ab1d5a099fb6b39b08 Author: Stuart Bennett Date: Tue May 12 16:54:33 2009 +0100 randr12: fix digital dpms regression introduced in 3971dda57004894d5d4fc9420aa00da400815af9 setting two different "blank" DPMS modes (say Suspend, followed by Off) consecutively would lead to the saved fp control value getting overwritten with FP_TG_CONTROL_OFF flavoured state, so DPMS on would then never work also, an improvement to LVDS DPMS state caching commit 10721038b854d9945ae551c6aa382b90f5d743e1 Author: Ben Skeggs Date: Thu May 7 21:39:41 2009 +1000 exa: use exaDriverAlloc() to prevent issues across exa changes commit 8502a8024354b88a4f19c7ad355268bb20772356 Author: Stuart Bennett Date: Wed May 6 18:01:54 2009 +0100 Fix server regeneration again The DRM is now opened in PreInit, so it must not be closed in CloseScreen, as the DRM wouldn't then be open in the subsequent ScreenInit commit 7a796a94d0c0e18a77c5c50a0f9ca9c218d7201f Author: Stuart Bennett Date: Thu Apr 30 16:04:59 2009 +0100 randr12: off-chip lvds for nv28 (rh#487456) Quite how this possibly works with the off-chip DVI connector the laptop in question also claims to have is unclear: I suspect that (at least in nouveau's implementation) it doesn't. Sadly we've no dvi-in-use reg dump to see what should be done. commit 5959512ef5ce20aa52bbd41d5d987392f27b9e65 Author: Stuart Bennett Date: Wed May 6 14:44:40 2009 +0100 'drmCheckModesettingSupported' implicit function declaration fix commit f62719e2ac8b04d4496dc56d5fa181934bcea9f7 Author: Peter Hjalmarsson Date: Wed May 6 14:43:22 2009 +0100 Unused variable warning fixes commit c8260ef52b58234335bdbfab31364d3d25840c21 Author: Pierre Pronchery Date: Wed May 6 14:32:34 2009 +0100 Fix crash with Xinerama enabled From the mailing list, minor tweaks by Stuart Bennett commit 1a478edbd58bb2eb1a41f22dea893c6d85902318 Author: Stuart Bennett Date: Wed May 6 02:23:42 2009 +0100 randr12: de-magic ramdac general control values commit 6c209a87d2d90b39fddc446378b370bd7fb81f6b Author: Stuart Bennett Date: Tue Apr 7 14:37:05 2009 +0100 randr12: pre-nv17 load detection Sampling heuristic as close to nvidia's as mmiotrace-based inference admits Works on both nv05 and nv11 commit 3971dda57004894d5d4fc9420aa00da400815af9 Author: Stuart Bennett Date: Thu Apr 30 19:31:27 2009 +0100 randr12: fix fp_control again again again As prophesied, 9c991d3a84ad16f893b739282403eb01e02bb57f broke something: turning off a digital output, then turning on an analogue output on the same crtc as previously used by the digital output led to FP_TG_CONTROL being turned on again when the (unmodified by analogue mode_set) fp_control state was written out So, belt and braces attempt to get this right, one more time commit 0ef16031c7e27ffabb0299e9463def125bd5e72c Author: Stuart Bennett Date: Thu Apr 30 15:27:33 2009 +0100 randr12: solve off-chip encoder crtc exclusion in prepare, rather than dpms commit 0447ce06989d5599e268fdb8a4ba7bebf72f5c95 Author: Stuart Bennett Date: Sat Apr 4 20:08:32 2009 +0100 randr12: simplify nv11 digital encoder-crtc binding Always setting |0x10 on the appropriate crtc for nv11 digital is fine; it's what the proprietary driver does, even if the bios doesn't Fix some line lengths in nv_output_mode_set() too commit f69b34aa92050987e8f3da07d92d5698e9333b75 Author: Ben Skeggs Date: Fri May 1 09:07:55 2009 +1000 nv50: return immediately in GetDDCModes if no DDC on connector... commit 45e16187612bc09b234b598dff25bbcc8069fde1 Author: Ben Skeggs Date: Thu Apr 30 16:37:29 2009 +1000 bios: use NV_ARCH_50 to match G8x chips There's at least a couple of chips where we get 0x77 for chip_version, and fail to match the chip_version >= 0x80 test.. commit 3d61697c477dd7358e5fd4e5bc608b4fe763b5d3 Author: Ben Skeggs Date: Thu Apr 30 10:23:11 2009 +1000 nv50: remove reading back vbios-programmed lvds native mode commit bade2499db8e02dd2904bc811399c891bf126208 Author: Ben Skeggs Date: Thu Apr 30 09:33:21 2009 +1000 nv50: group encoders into connectors by i2c port commit 9ee2ac19d7adc067a5551e6d6853a19b89946d46 Author: Ben Skeggs Date: Wed Apr 29 16:26:41 2009 +1000 bios: remove dodgy mode-table search for g80 This appears to work in exactly the same way as on earlier chipsets, the strap value just moved slightly.. commit 6282574dbeeb7075a00ce03940c4f2a597a048b5 Author: Ben Skeggs Date: Wed Apr 29 16:25:43 2009 +1000 bios: modify get_fp_strap() for g80 commit 09b832e24b9bd887275ba882beabe9bba56f0207 Author: Ben Skeggs Date: Tue Apr 28 09:46:55 2009 +1000 nv50: merge NV50SorSetClockMode and NV50SorSetClockModeLVDS commit ed2c185caeb75c595dfb2e814748a856a23b2b35 Author: Ben Skeggs Date: Tue Apr 28 08:44:01 2009 +1000 bios/nv50: initial parsing of display script tables, not quite complete commit 3fccc9e83a194fd58c333c6c4793a27cb05ce026 Author: Ben Skeggs Date: Tue Apr 28 09:38:21 2009 +1000 bios: some nv50 init scripts have flags in reg values, deal with (1<<30) commit 2b4b3da73babbe9ebf4acc26238a4b2b8a6e6ee8 Author: Ben Skeggs Date: Wed Apr 29 11:00:17 2009 +1000 bios: dcb location is only 2 bits commit 7b5bfff21916461ce7f6a2adb27dc443ad0b8201 Author: Ben Skeggs Date: Tue Apr 28 08:12:05 2009 +1000 bios: parse BIT U table commit e4260ec4f0303b286f16eab4fe5a1bb66ff89e3d Author: Stuart Bennett Date: Wed Apr 1 02:56:05 2009 +0100 randr12: more use of logging abstraction in modesetting code commit 4d0fdba9abcd0af736821d54baca5f0c9a8d6ce1 Author: Stuart Bennett Date: Mon Apr 6 01:14:04 2009 +0100 randr12: fix for off-chip dual link digital (enable extra wide interface?) commit bb246d72a01285299599cbf8ff82c67f14682a4f Author: Stuart Bennett Date: Mon Apr 6 01:00:41 2009 +0100 Partial fix for nv28 lvds bios parsing (part of rh#487456) For rh#487456, though this is neither a complete fix for that bug, nor a complete fix for nv25/28 lvds (the EDID matching mentioned in the commit is omitted until someone appears with a laptop requiring it) commit 2915926702b7ae9ccb1e900c07ca14a2f32e4512 Author: Stuart Bennett Date: Mon Apr 7 23:20:12 2008 +0100 plls: max_log2p_bias is likely actually max_log2p As explained in nouveau_bios.h, a separate max_usable_log2p is needed (lack of change from 6 to 7 tested by setting a stable small mode, say 400x300, then manually tweaking the multiplier up and post divider down). The max_usable_log2p values hardcoded here are unchanged from those previously taken from the bios pll calculation code For reference, the blob will quite happily attempt to set clocks using the raw parsed max_log2p values (and go up to 7 therefore) when setting modes around 200x200 (3MHz pxclk), but at such a low clock my monitor won't agree to give a sensible picture anyway. Reg dumped data using "nvidia" below: nv40: log2P up to 7 (dual pll mode), at very low clocks driver gives up and sets 0x0006ff0d 0x80001f04 nv43: log2P up to 7 (dual pll mode), at very low clocks driver gives up and sets 0x0006ff0d 0x80001f04 nv11: single pll, therefore goes quite happily down to at least 0.25MHz nv31: log2P up to 7 (dual pll mode), at very low clocks card locks up nv34: log2P up to 5 (single pll), goes down to at least 2.25MHz nv4b: log2P up to 6 (single pll mode), at very low clocks driver gives up and sets 0x0006ff0d 0x80001f04 commit 47bb00fee8b9906adc03b372efa1ae813bc9ca9a Author: Ben Skeggs Date: Tue Apr 21 08:57:07 2009 +1000 nv50: missed a WAIT_RING commit 523ccecee26454fc43a65e9b33d91a7d0ff8487d Author: Ben Skeggs Date: Fri Apr 17 14:18:54 2009 +1000 nv50: use vbios-programmed lvds mode as native mode if no ddc Why was this even removed? Its replacement (read VBIOS fp mode table) has proven useless in the majority of cases I've seen. commit fa2f1115d5f7f3e3767d423a77c6d929a4ae8d0f Author: Ben Skeggs Date: Fri Apr 17 10:25:57 2009 +1000 Remove pNv->GART conditional for selecting CB_LOCATION in AGP/PCI Kinda useless, the DRM knows better whether GART is available. commit 7100c06be099bacc0f8bb8898bbf7eb34ff1cc6e Author: Ben Skeggs Date: Mon Apr 13 20:21:51 2009 +1000 kms: fix displayWidth in resize commit ef2de256dabfde2d619e4d451bd417973c919329 Author: Ben Skeggs Date: Mon Apr 13 19:09:32 2009 +1000 do e-edid for legacy modesetting path commit d8545e669aaa4362a236ba2e7231ca27ffdea1bd Author: Ben Skeggs Date: Wed Apr 8 16:15:02 2009 +1000 bios: logic typo from earlier commit commit 960a5c82a80272a1577dede6a05ab7dc5db37cc3 Author: Ben Skeggs Date: Wed Apr 8 14:44:06 2009 +1000 nv50: modify ddc<->nvreg assignments again.. commit 3a6c7091d9706778a2e3971b7f36601d79fe7a83 Author: Ben Skeggs Date: Wed Apr 8 14:34:20 2009 +1000 kms: fix setting the randr edid property commit a1194b3690ced5db552d63be118a605508a1b965 Author: Ben Skeggs Date: Tue Apr 7 19:24:25 2009 +1000 bios: fix typo commit 11451cabbd5357dd71ab65e6155d7ca7d9766db7 Author: Ben Skeggs Date: Tue Apr 7 18:34:57 2009 +1000 bios: some G8x don't have PBUS at 0x1800, us 0x88000 unconditionally there commit 62d69bdf807423a644d7c2c493f94948ea11e491 Author: Ben Skeggs Date: Sat Apr 4 01:41:47 2009 +1000 bios: add exception for chipset 0x73 for lack of fp table commit 620d519564fdc6b3a7d55184bd481fa69035371b Author: Ben Skeggs Date: Fri Apr 3 23:07:56 2009 +1000 consistent connector naming across Date: Tue Apr 7 00:40:31 2009 +0100 randr12: set 1 on cr59 for off-chip digital, 0 otherwise (#21023, rh#492399) The ubiqitous setting of 1 on cr59 for Date: Fri Apr 3 23:39:22 2009 +0100 randr12: unlock CR21 *after* turning off digital output otherwise the analogue output still fails to come up. That'll teach me to rearrange things just before committing commit 11be9a982073d66a68cd3db2bfc611eb58d3ea81 Author: Ben Skeggs Date: Fri Apr 3 12:22:04 2009 +1000 nv50: fix i2c port addresses commit e2aa03794420324ae5a682bbc415a79a4d830f7e Author: Stuart Bennett Date: Fri Apr 3 00:57:19 2009 +0100 randr12: fall back to standard timings when finding native mode (rh#492819) commit 6965663ddcc8dd3330842d3c4c4eb4cbf4e4fc39 Author: Stuart Bennett Date: Wed Apr 1 05:38:29 2009 +0100 randr12: fix hw cursor for fully transparent pixels ARGB8 pixels of 0x00000000 were getting bumped to 0x01000000, which was _just_ visible as a box around the cursor commit d12f70cedb0ba598234bbfc26dd6beed23e3dfe7 Author: Stuart Bennett Date: Sun Mar 29 00:51:05 2009 +0000 randr12: pre-nv17 digital fixes 1) set panel regs better (don't do min_front_porch adjustment) 2) scaler programming - nv11 and nv20 don't need / 2 for aspect scaling commit ea567dbc7bc9c8d2ee5d7d9e0dcd33b03c638edb Author: Stuart Bennett Date: Sat Mar 28 01:58:09 2009 +0000 randr12: fix restore for cards where CR21 is not left unlocked at POST More nv11 inspired fun. If CR21 is left without a 0xfa mask after boot, we'd restore the old CR21 value and the subsequent restoration of VGA CRTC values wouldn't get through. RE'd doc of CR21 behaviour included commit bd263d83139fcc93b967c71c99fd5e63e1ba6315 Author: Stuart Bennett Date: Fri Mar 27 18:27:18 2009 +0000 randr12: make nv11 dvi work for both crtcs commit 52c287dc64a97a750eb953ac5f725d794cbf0c64 Author: Stuart Bennett Date: Fri Mar 27 00:23:04 2009 +0000 Every card since nv5 can do panels We'll only try to do ones using scripts atm though Note that as we don't have a load detect function for pre-nv17 you'll likely get a 1024x768 mode set up on VGA-0 even if only the DVI output is plugged. Unclear if this is a bug or feature :) commit 3d371a78bc9522e9a1b2c967957a090bb527a30c Author: Stuart Bennett Date: Thu Mar 26 22:21:57 2009 +0000 randr12: enable tmds reg access on pre-nv17 I think this nv11 hates me commit 1bb85c8020802719e82c1335a18df9367215a8ff Author: Stuart Bennett Date: Wed Apr 1 04:09:09 2009 +0100 randr12: reorder ramdac reg access commit 4465fddb2467ad9d923120a2fd2c648222603771 Author: Stuart Bennett Date: Wed Apr 1 04:10:18 2009 +0100 randr12: remove nv30 special case 0x68?89? are just an alternative way to set scaling (set | 0x40 on 0x68.880, then horiz scaling in 0x68.898, vert in 0x68.89c) and afaict don't have any special significance on nv30 commit 72eced5eeeef438979dff06b6c1cbaa120738cfe Author: Stuart Bennett Date: Wed Apr 1 03:12:30 2009 +0100 randr12: fix/improve a load of version/feature tests Main improvement is introduction of flag for nv17+ display architecture Other version fixes include: * allow access of fp control regs on all cards (defined since nv4) * only read crtc_850 and gpio_ext on nv40+, since only written on nv40+ * set dither state on all versions (only written out on relevant cards) * PRAMDAC_DACCLK is only defined/usable on nv17+ * no point saving the lvds/tmds head for restore if there's only one head * fix a bunch of places the nforce (0x1a) case had been missed commit 37c6916d3eac54cc13812276fca99662162c4bbc Author: Ben Skeggs Date: Wed Apr 1 15:00:03 2009 +1000 bios: fix chips with pll limits table version 0 commit 76c5a05603b0eaa0831e031268e48ab6ffdee3a9 Author: Ben Skeggs Date: Wed Apr 1 10:36:34 2009 +1000 bios: xf86DrvMsg->NV_ERROR commit b1b9bcb111f1f5ec15e19d5a84b7ca576983c4a1 Author: Ben Skeggs Date: Tue Mar 31 11:43:26 2009 +1000 bios: support for pll limits table v3.0 commit 8c85b4b7451bd09b0607b1f4ef8ce4b833006328 Author: Ben Skeggs Date: Tue Mar 31 11:11:12 2009 +1000 kms: CONNECTORn -> CONNECTOR-n commit 4e1c3239648510a4024917289127ad1e982ed34d Author: Stuart Bennett Date: Tue Mar 31 20:59:26 2009 +0100 Restore call to NVDRIGetVersion, to ensure the dri module is loaded commit c973f756cfdf36db3a5c7095f6e2c57ff5841388 Author: Stuart Bennett Date: Tue Mar 31 17:07:26 2009 +0100 Abstract logging in nv_bios.c commit b17bebd811316b5ccca21146b58f8fbf4773f0ad Author: Stuart Bennett Date: Mon Mar 30 20:52:29 2009 +0100 nForce DIMM check is now in DRM Since it only at most suggests an optimization, there's no real need to wait for a DRM version bump commit 9c991d3a84ad16f893b739282403eb01e02bb57f Author: Stuart Bennett Date: Mon Mar 30 03:31:01 2009 +0100 randr12: FP_TG_CONTROL 2: dpms improvements For DPMS on digital outputs nvidia does not just OR the 0x68.848 value with 0x20000022, they mask off 0x10000011 too. To do the same thing here, don't change in-memory state of programmed reg value (hopefully nothing breaks) commit 5fb2888d79d39a1c74ab005d8d518686ad823224 Author: Stuart Bennett Date: Fri Mar 27 18:27:18 2009 +0000 randr12: FP_TG_CONTROL 1: turn off digital path when using VGA encoder On pre-nv17, having a CRTC's digital output path turned on when programming the CRTC for VGA confuses the chip and often results in the analogue output not working. Indeed, having it turned on even just before programming the CRTC seems to break it. Nvidia solves this by turning off the digital path early in modesetting and then delaying for 50ms, so (if the digital path was on to start with) that's reproduced here. Although this problem has not been seen on nv17+, nvidia uses the same approach, so we may as well too. Some tidying of the output_prepare function thrown in as well. commit 8023dc3e2dcfa8a4cc11a5a64750a7505e8aa704 Author: Stuart Bennett Date: Mon Mar 30 02:27:50 2009 +0100 Split DCB 1.5 parsing from 2.0+, get closer to 80 cols commit ea027b35b28c0305aca03edc8c1ff5cd84bbf3ef Author: Stuart Bennett Date: Fri Mar 27 00:03:38 2009 +0000 The dcb prior to v1.5 is pretty hopeless, just add a crt. Also, we don't use dcb 1.2 i2c for modesetting due to cards with broken tables (ala #14821), and I've got an nv11 with duff entries (v1.4), so don't raise hopes of init_dcb_i2c_entry working on these versions either commit 921fbccd53eae37ed86ecece6dc1fcae4b7bf3c4 Author: Stuart Bennett Date: Thu Mar 26 16:41:02 2009 +0000 randr12: avoid nv11 chip lockup when saving palette regs commit 9d46930f0eec7b787666671681e9a93fc33dce62 Author: Ben Skeggs Date: Mon Mar 30 20:11:03 2009 +1000 xv: oops commit 9213c39d3a8d9a7fc90a44f9427c1fb8218243e2 Author: Ben Skeggs Date: Mon Mar 30 11:14:20 2009 +1000 xv: post damage after we draw (rh#492239) commit d68a0527aa2a3e93c3408526d4bbb93db89e9b3c Author: Ben Skeggs Date: Mon Mar 30 10:45:59 2009 +1000 kms: small cleanup commit c9cb6a6f7f79233bdab737fa6b6d0916dab45971 Author: Stuart Bennett Date: Fri Mar 27 16:43:27 2009 +0000 rh#492511 has a CRTC_OWNER of 0x7 for some reason not that this probably affects the bug in any way commit 95bff61597ddf21d6415b40759258802a5f42150 Author: Stuart Bennett Date: Wed Mar 25 02:40:17 2009 +0000 randr12: fix LVDS legitimately disconnected case DPMS off still needs to work, but there's no native_mode for the pxclk. Fortunately LVDS_PANEL_OFF doesn't actually need a pxclk, so just use 0 commit f86e395231c97155c1a211010835fd02b8e4dc5f Author: Stuart Bennett Date: Wed Mar 25 02:07:15 2009 +0000 randr12: permit vga outputs to be force enabled in xorg.conf You need: Section "Monitor" Identifier "VGA-0" Option "Enable" "true" EndSection commit 8427b39a2f6cb32496bbbe370b793d5ba78f6b6c Author: Stuart Bennett Date: Tue Mar 24 03:32:24 2009 +0000 randr12: move a load of hw mode programming into nouveau_hw.c Pull in pll setting (common, no reason to bloat nv_bios with it), state load/unload from nv_crtc, and useful bits of nv_hw.c (remnants in nv_hw.c are only used on the non-randr12 path) commit 163bdce98c0f9ca5c1125e33a9a2bf2d2d9a1286 Author: Stuart Bennett Date: Tue Mar 24 03:19:38 2009 +0000 Turn the smaller mmio wrappers into static inline commit 21ee927f28d1ca8d3807acc767ef14783e43f057 Author: Stuart Bennett Date: Mon Mar 23 21:34:26 2009 +0000 Put arbitration and mnp calcs in separate file Make bios->chip_version public so the pll calcs can use it commit 83dc890f0b1fc88d2fbc7559f5d4decf4c84f340 Author: Maarten Maathuis Date: Sat Mar 28 01:25:32 2009 +0100 nv50: use E-EDID when available + apply edid quirks commit 2c130cf71587706a4f1dcd8f5db1de47a10522f5 Author: Pekka Paalanen Date: Fri Mar 27 23:16:59 2009 +0200 nv50: fix xf86GetDefaultModes() call for older servers Thanks to stillunknown for this build fix. commit f1907dcef8d06d7ee4ef10ba22bb7decef700110 Author: Ben Skeggs Date: Fri Mar 27 15:37:17 2009 +1000 nv50: add default modes to mode pool for LVDS panel At some point X stopped doing this if the display doesn't support continuous timing. For a lot of G80 LVDS panels, they only report their native mode via DDC. We'll add the default modes ourself, and use the GPU scalers. commit 7da6fdb8b477d2007c83b47e9cbcc2476ae40f22 Author: Ben Skeggs Date: Fri Mar 27 14:17:29 2009 +1000 kms: fix bug which prevented getting edid from the kernel commit f431e204d3a9be92df5ca606e86ed7c6d82103f0 Author: Ben Skeggs Date: Fri Mar 27 11:50:22 2009 +1000 randr: fix crash when rotation requested commit 36dedd04da1b3c89be61a95270414477d284b2ef Author: Ben Skeggs Date: Fri Mar 27 11:26:09 2009 +1000 kms: check for mm_enabled as an additional test for kms presence commit a923bc1e4840c0386301f8648add2ccbfbf79a88 Author: Ben Skeggs Date: Thu Mar 26 16:24:01 2009 +1000 nv50/xv: correct rendering to partically obscured windows Won't be exposed by current git, due to lack of accelerated front-buffer rendering. But should fix rh#492173, rh#492229. commit 01cee2906686897c4b795d308270b3b69a3e286e Author: Ben Skeggs Date: Thu Mar 26 11:43:09 2009 +1000 nv50: call NVSync() in CloseScreen() before restoring video mode Without this, if accel is still being done to the front buffer (usually at offset 0), we'll restore the video mode and then the engine will clobber the text mode fonts right afterwards leaving a messed up console. commit aa7c0375b51d813be54de5e19b96e958ac183f17 Author: Ben Skeggs Date: Thu Mar 26 06:36:17 2009 +1000 kms: implement AdjustFrame, should fix crash in fdo#24236 commit 61879b8079bee1caeedc0bd9c11061423ff27b4a Author: Ben Skeggs Date: Wed Mar 25 10:09:39 2009 +1000 kms: drm_mode_modeinfo struct changed names at some point commit 79306fc29f6b27fd61fe51855bad5489fc4fd986 Author: Ben Skeggs Date: Wed Mar 25 08:15:41 2009 +1000 dri: fail harder commit da1ba93f1dc2b02615e4f0366450872659176799 Author: Ben Skeggs Date: Wed Mar 25 08:12:26 2009 +1000 device close doesn't belong in DRI close, can have DRM without DRI commit 56b11c773ac9392069c6a589f4f87c5cc79e020e Author: Younes Manton Date: Tue Mar 24 14:27:40 2009 -0400 Fix mouse cursor disappearing when near top/left edge of screen. commit 4067ab466fe3aa817e0323959f70c7dd3494de0a Author: Ben Skeggs Date: Mon Mar 23 14:43:22 2009 +1000 another ppc fix commit 862dba8b6ca6354d915f2430826a5581f41d1002 Author: Ben Skeggs Date: Mon Mar 23 14:22:15 2009 +1000 more ppc.. commit 30634865617737171835f6ac9437df597e5a8951 Author: Ben Skeggs Date: Mon Mar 23 13:57:52 2009 +1000 fix ppc build commit d80fe7878379aefd3345746a149f2b46d3a84805 Author: Francisco Jerez Date: Mon Mar 23 03:27:16 2009 +0100 Fix nouveau_hw_decode_pll on NV30/35. commit 62aa81deca5c63d30407872c0e2b784f5084acb3 Author: Stuart Bennett Date: Sat Mar 21 01:43:14 2009 +0000 Some laptop mode finding fixes resulting from rh#487456 On closer inspection, it seems BMP laptops only depend on use_straps_for_mode to ban DDC. Therefore use pxclk alone to determine EDID case in parse_lvds_table, and invert sense of fp ddc flag to get a default of "false" commit aa6edfaf1c32432b07c298c42b68f2d93f3b337c Author: Stuart Bennett Date: Sun Mar 15 15:18:16 2009 +0000 randr12: name VGA CRTC fields Now with added consistent indentation Use fields in a couple of other cases while we're about it commit 7b7c44c828eda2edfad2fa9bea95f70889c59453 Author: Stuart Bennett Date: Sun Mar 15 03:45:54 2009 +0000 randr12: rename reg state members to follow reg names commit 4ae6c22957a929760e583d5704e350adb4404c3d Author: Stuart Bennett Date: Sun Mar 15 03:11:40 2009 +0000 randr12: name some FP flags, move some unrelated stuff out from nvreg.h commit b50b49f6f54148ee64ba7500e797f432b198a324 Author: Stuart Bennett Date: Sun Mar 15 04:21:40 2009 +0000 pre-nv50: use nvidia's names for PRAMDAC regs where known Mostly adding 'P' to the previous NV_RAMDAC regs -- either when known correct, or when totally unknown (eg NV_PRAMDAC_580); made-up names untouched. Lack of code changes checked with cpp. Unused defines removed too. commit a9df3049a7e38b3bf4478459e5f0736e10927247 Author: Stuart Bennett Date: Sun Mar 15 04:08:56 2009 +0000 pre-nv50: use nvidia's names for PCRTC regs where known Mostly adding 'P' to the previous NV_CTRC regs -- either when known correct, or when totally unknown (eg NV_PCRTC_850); made-up names untouched. Lack of code changes checked with cpp. Unused defines removed too. commit 2c0710d334e3e1dcb04cc4fc0b46ec4c8cdb9ba6 Author: Stuart Bennett Date: Tue Mar 17 18:50:18 2009 +0000 Separate maximum limits for encoder devices and i2c records, DCB_ prefixes From the comment with pNv->connector in nv_type.h I've assumed nv50 was using the previous define as an I2C limit, rather than encoder limit commit 0db27a6f1aee023782de14ae2f260fec4e60229d Author: Stuart Bennett Date: Tue Mar 17 13:43:13 2009 +0000 Add DCB 1.5 entry from a GeForce2 Go reported by Martin Ketzer on the ML commit 3e7fa97a50e42c0255876c79137dc1a40a6052a6 Author: Ben Skeggs Date: Wed Mar 18 09:36:33 2009 +1000 dri: pass object handle instead of offset if using real mm commit 88efe405213a3ea23edd9bed971da1d2492021eb Author: Ben Skeggs Date: Mon Mar 16 17:45:49 2009 +1000 dri2: initial implementation, only with driver pixmaps Also, no DRI1 when driver pixmaps enabled. commit 675126e0f0c1c077bde4b25ccb64f87d1d08547b Author: Ben Skeggs Date: Mon Mar 16 15:06:31 2009 +1000 kms: support framebuffer resize if driver pixmaps enabled commit 8b354b92a859cf277b19e51fc6cb109f4ea44b7a Author: Ben Skeggs Date: Mon Mar 16 13:13:07 2009 +1000 kms: copy old fb to new fb on modeset Requires driver pixmaps enabled, which suck on G8x currently. Paves the way for a nicer transition from console->X. There's still a flash where the screen goes black before X starts here, but this is on the way to what we want. commit 6658403cfd91556d06afecdde03feec7384c5398 Author: Ben Skeggs Date: Mon Mar 16 12:34:49 2009 +1000 Call NVEnterVT from NVScreenInit rather than duplicating it. commit f59fef15c94fc5c6f216d0f5dcdcb3d3188c0049 Author: Ben Skeggs Date: Mon Mar 16 09:17:29 2009 +1000 exa: fix multiple prepare/finish_access on a pixmap commit 75a1c4158a19bf0857de49b736fb87a40c095048 Author: Stuart Bennett Date: Sat Mar 14 15:48:39 2009 +0000 Wrap bios endian casting Also convert some functions to use individual bios pointers, rather than bios->data[offset + ... Plus some minor bmp structure documentation and tidying commit 3666d73333ecbdd3a4941a76af2528113db427bb Author: Stuart Bennett Date: Wed Feb 25 20:21:42 2009 +0000 Switch to using pll_vals struct for passing pll stuff around commit a3dbc06d4f9dc340f5c167b94d8e10ac8386c5b4 Author: Stuart Bennett Date: Fri Apr 11 16:51:30 2008 +0100 randr12: cull old unused pll code commit 71c821b8119cbac8dcd91b27e3b7556d00ceb546 Author: Stuart Bennett Date: Sat Mar 14 19:06:12 2009 +0000 Don't pointlessly overallocate cursor storage commit 7284c07a0ad6551ea99c28454f4e7308699835e6 Author: Stuart Bennett Date: Fri Mar 13 21:23:48 2009 +0000 randr12: nv10 hw cursor fixes/changes Remove access to PCRTC_GPIO, it's unused and on NV10 overwrites PCRTC_CURSOR_CONFIG leading to all sorts of cursor weirdness NV10 hw cursor is now set-up on the assumption it can do 64x64 (we've been using 64x32 up to now), but if it can't do cursors 64px high it can easily be fixed to behave like nv0x at 32x32 (64x32's pretty silly) It's possible that with the PCRTC_GPIO thing resolved the nv10 cursor can be more featureful: the code would also be simpler if it supported 32bpp cursors (test by seeing if setting NV_CRTC_CURSOR_CONFIG_32BPP has any effect). It may even do alpha -- change pNv->alphaCursor to be (NVArch >= 0x10) to find out. commit bcc3a14b15cdad3647cc7df0f540df1111843be5 Author: Stuart Bennett Date: Fri Mar 13 02:31:35 2009 +0000 randr12: use nv0x cursor colour expansion funcs on later cards, unify argb paths commit b21c807d2ced35ac1b06300f6e68d661710b336a Author: Stuart Bennett Date: Fri Mar 13 03:52:54 2009 +0000 randr12: store nv0x hw cursor image in VRAM nv_driver.c is already doing the alloc, nvidia uses the same method, and it saves code :) commit 3ea4b194e83735145d5e9d5c5357f92ae6c6a569 Author: Stuart Bennett Date: Thu Mar 12 15:37:59 2009 +0000 Kill pre-randr12 hwcursor code, and tidy randr12 hwcursor code If you're not using randr12 you should be. Misc fixes included: Ensure PNVM bit set on PCRTC_CURSOR_CONFIG for consistency Fix NV11 alpha cursors Add missing bo unref commit b988160dfa5a535fd042062d7318ab99fc7efa5a Author: Stuart Bennett Date: Thu Mar 12 16:31:24 2009 +0000 Remove calls to load ddc and i2c modules -- they're built-in since server 1.3 commit d5893ecf3dd915fc6937c61e6eae7c221edeb6e2 Author: Stuart Bennett Date: Thu Mar 12 21:46:02 2009 +0000 Hack around missing display table in rdivacky's GeForce 7050 PV/nForce 630a commit 369e1efd23c0180e210dbe898318b6b9efa1faad Author: Stuart Bennett Date: Thu Mar 12 16:09:27 2009 +0000 Fix xserver shutdown for randr12 off commit 8343d6b2c0ebddf1a1a7d146890ed90278559fea Author: Stuart Bennett Date: Wed Mar 11 01:11:02 2009 +0000 Remove bios lvds parsing pxclk test; ddc_permitted is a sufficient condition commit 8b56c699ad39c64326d76658c741801bb4118c5f Author: Stuart Bennett Date: Wed Mar 11 00:43:33 2009 +0000 Name some regs/values and reduce crtc reg struct size TVOUT_LATENCY taken from nv11 .scp file CRTC[]: even nvidia only use up to 9f, and they know what the regs do commit 79d23d87b489332af521fbda418a13b9ae032b7d Author: Ben Skeggs Date: Fri Mar 13 11:43:54 2009 +1000 improve drm/dri initialisation code The main motivation here was to fix the scenario where X is started without nouveau.ko loaded, checks if kms is enabled, is told no because nouveau.ko isn't loaded, and then later nouveau.ko gets loaded with kms enabled by default and starts fighting with the ddx for the display. One cool side-effect is that we're not depending on DRIScreenInit for our DRM fd now, which means that if DRIScreenInit fails for a non-fatal reason (like, NVIDIA's libglx being around instead of xorg's) we can still run with full 2D acceleration. commit bd1448216715681beebabe82b88c8b4d0e62eced Author: Ben Skeggs Date: Wed Mar 11 16:07:41 2009 +1000 kms: cleanup set_property commit 7a455929785e00beb2d1e65007a3407427ca693a Author: Ben Skeggs Date: Wed Mar 11 15:51:59 2009 +1000 kms: get current values for output properties on startup commit 7095e8942c74953fcf1615900e2d7864024ece5c Author: Ben Skeggs Date: Wed Mar 11 11:30:08 2009 +1000 kms: work around some xserver stupidity with DPMS The server calls the output DPMS functions with the intention of turning off outputs before reprogramming them. It probably shouldn't be doing this in the case of the randr driver using set_mode_major, and leave it up to the driver. The DRM modesetting will usually reenable the outputs after a modeset anyway, which is the behaviour that the xserver currently relies on. However, there's a shortcut used in the drm to allow far faster fb swaps without doing a modeset. When this path is hit, the DRM will rightly not touch any power states and the display will never get turned back on. commit 8f9a58070c2fc55c922e9d82d0796e32959a8431 Author: Stuart Bennett Date: Tue Mar 10 00:20:35 2009 +0000 Another DCB 1.5 entry (seen in rh#455194) Plus a few minor PLL tidyings commit 9a719900adcebf47442a30fe1989509f93e13e16 Author: Stuart Bennett Date: Mon Mar 9 15:57:06 2009 +0000 randr12: add output properties for digital vibrance and image sharpening commit 678ddc2e56aea3deb1e95b2309b47e1f2cce0635 Author: Stuart Bennett Date: Mon Mar 9 15:34:03 2009 +0000 randr12: functionate output properties creation notes: * setting pending at change time is necessary for props created as pending, so that PostPending doesn't overwrite the correct current state with the incorrect pending one * our call to PostPending can go; relic from when props were updated in update_output_fields commit ed9bd8848fcfe6a77894bfe520a5aa25a9b3f769 Author: Ben Skeggs Date: Wed Mar 4 15:10:24 2009 +1000 kms: remove early-exit from gamma_set, the kernel side works now commit 98c9e4edb58374f18249e5c9c53b392fb8b4a1d1 Author: Ben Skeggs Date: Wed Mar 4 13:40:49 2009 +1000 kms: work around some bong hits with dpms This'll need to get fixed elsewhere, but in the meantime, we have working DPMS *and* can actually see what's happening when X starts! commit 88ae2c92c0efc1919dbaa7e8db4c37b86987046c Author: Ben Skeggs Date: Wed Mar 4 13:36:36 2009 +1000 kms: implement dpms commit 5269cc8060e0ce5160dfca408b0807a4cf2ff17c Author: Stuart Bennett Date: Sun Mar 8 20:07:23 2009 +0000 randr12: make props code slightly less awful to behold commit 0b87c4964076101a2d8373fd3addd9355fb7765e Author: Stuart Bennett Date: Sat Mar 7 21:13:55 2009 +0000 More robust PLL upclocking for old cards commit cb237a34f31f8b8c841974cb64141a2f2e36c53b Author: Stuart Bennett Date: Sat Mar 7 04:38:12 2009 +0000 bios/randr12: mode validation fixes (includes fix for #20298) Remove arbitrary 12000kHz mode clock lower bound (#20298) Use DCB supplied max dac clock (and remove a memcpy) commit 9cfccd7281a715e45a4296226d9d52854230f346 Author: Stuart Bennett Date: Sat Mar 7 04:34:20 2009 +0000 Handle failure to calculate pll values better Ensure pll limit table get parsed on nv30 and nv35 too commit 1e994400913bc656b34440df67aa105aa2b211c4 Author: Stuart Bennett Date: Fri Jan 16 22:26:28 2009 +0000 xv: return BadAlloc if destination pixmap is not put into EXA offscreen (#15792) Lets the player get X errors, instead of the card choking trying to do system memory addresses We could use exaDrawableIsOffscreen() here, but that's only in new xservers. commit 77347da64f86822f128e0dae3e89a6b80282c4ba Author: Stuart Bennett Date: Fri Feb 27 01:22:13 2009 +0000 Remove duplicated DCB parsing Store stuff in DCB private instead commit 1b6cabeee4c0160335c174bd4e9111dbd9535aaa Author: Stuart Bennett Date: Tue Mar 3 01:03:45 2009 +0000 Remove VBIOS access in parse_dcb_entry commit 72fd0ae537e4db208bbfa142dd70144901d7f267 Author: Stuart Bennett Date: Tue Mar 3 21:51:46 2009 +0000 randr12: no need to re-detect edid for lvds, it's not going away Reuse of nv_connector->edid is safe as nv_lvds_output_get_modes doesn't call nv_output_get_edid_modes after a mode has been found once commit ae981a8075395af40cf530f2aa24ac68d2ca0e77 Author: Maarten Maathuis Date: Thu Mar 5 20:21:39 2009 +0100 nv50: some minor modesetting changes commit 42f99e68940a526f804e2046676c1d06d1bbbb42 Author: Ben Skeggs Date: Thu Mar 5 12:11:03 2009 +1100 nv30/xv: restore original viewport/clipping after putimage Fixes two cases of corruption I seen while using the texture adaptors with a composite manager. - desktop getting clipped to video size sometimes - missing fonts on some menu items after xv+compmgr commit 56bb8f8e81e9d152217df7863e59781009a9bb77 Author: Stuart Bennett Date: Wed Mar 4 19:48:29 2009 +0000 Allow parse_fp_mode_table for x86 cards that find themselves on ppc commit 1c2f33ed33791f391d059778b1490222e8cd1e1d Author: Stuart Bennett Date: Wed Mar 4 19:40:37 2009 +0000 Don't rely on the bios mobile feature bit for BMP biosen (#19986) Quadro bios builds also set the mobile bit (not on nv10gl, but for all observed subsequent Quadros before nv4x (intro of BIT bios structure). So for BMP cards, use bit 6 of cr4b on head A to detect mobile biosen (all sampled mobile bios images set this in their init scripts, and non-mobile don't) commit e436c7ee98c2eda9d5ba45f7d897d68497b52799 Author: Stuart Bennett Date: Wed Mar 4 20:59:42 2009 +0000 randr12: make treatment of CR4B more closely resemble blob's behaviour Possibly totally unnecessary anyway commit c61102b326455f6c63a55c8c73ed629994281588 Author: Stuart Bennett Date: Wed Feb 18 01:17:29 2009 +0000 Parse bios fp mode during modesetting, removing extra alloc Also, it seems that the mode parsing was wrong on big endian for years, so fix that (though Apple laptops have DDC panels anyway) commit 631e15a03b8a790d342aefe677f8c5eb33935de6 Author: Stuart Bennett Date: Tue Mar 3 22:03:00 2009 +0000 Get dual_link and dithering bios info through lvds table parsing function Now that lvds table is only parsed during modesetting, return the parsed data in out parameters to make the ordering requirements obvious Since calling this on nv50 is pointless, that code was commented out commit 2d4377193f5e2166af3df32ddcfb1235be82764e Author: Stuart Bennett Date: Tue Mar 3 21:52:04 2009 +0000 Call parse_lvds_manufacturer_table during modesetting only (#19986 partial fix) Also remove SetOwner call now that locking crtcs doesn't change the set head Moving parse_lvds_manufacturer_table to modesetting means it only gets called for lvds outputs, removing the dependency on checking for the mobile bios build. Another benefit is making the strap and EDID FP paths common. A side effect is that as the lvds dithering toggle depends on the results of parse_lvds_manufacturer_table, setting that moves to after calling the parsing function commit ce8f5d71dacbe0d56cfcb17dfe60f1c4c6cf1773 Author: Stuart Bennett Date: Tue Mar 3 17:24:09 2009 +0000 Variety of LVDS script changes Remove lvds invocation static No LVDS_INIT for BIT biosen Merge in one-time call to LVDS_INIT script to main script function Make sel_clk preservation stuff use regular reg writing functions commit 071d5373df744c0c9578134fa634bce1e202d4f3 Author: Stuart Bennett Date: Tue Feb 17 16:45:50 2009 +0000 Read embedded bios edid only on demand commit f04689cb326da409448d54694e2660cf4b4b7950 Author: Ben Skeggs Date: Tue Mar 3 10:14:26 2009 +1000 move memset of fb after NVSave(), hopefully fix lost VGA fonts commit 6961efb84dd6894aaaf010a9f620231dfcbad004 Author: Ben Skeggs Date: Mon Mar 2 11:35:05 2009 +1000 kms: fix check for xf86drmMode.h commit 76fa6569ffd1a7f61e295753383bd01b246b5348 Author: Stuart Bennett Date: Mon Mar 2 16:43:06 2009 +0000 Detypedef bios_t, rename bios io functions, group various helper functions commit 39c9d0231c0d24bf91dbe9ab262f54fcad1b3b2f Author: Stuart Bennett Date: Fri Feb 27 18:57:35 2009 +0000 Move parsed DCB to bios structs, split into public and private parts commit 275daaf7be46e54ca59067d3f2a6e6790e1ce7e0 Author: Stuart Bennett Date: Fri Feb 27 17:46:26 2009 +0000 Split bios struct into struct for nv_bios.c, and exported public info struct commit 8b3e966e3230add04aa05a9ded3f8a647afe0d91 Author: Stuart Bennett Date: Sun Mar 1 20:50:15 2009 +0000 Remove never updated bios opcodes 0x31, 0x5A and 0x73 Notices of removal left in case any bios using them ever appears, so they can be found in git history Also nuke a few unused reg access defines commit ce9eb05f516899f56e66cc290fc7c4f9d3085882 Author: Stuart Bennett Date: Fri Feb 27 23:14:24 2009 +0000 Trivial bios convenience variable changes commit cfeef1144943e72d62a2c0d9701ddf4a639deeca Author: Maarten Maathuis Date: Fri Feb 27 17:30:40 2009 +0100 exa: forgot to check if EXA_SUPPORTS_PREPARE_AUX was defined commit 37a85dcbd6f6134a43b5c9bb883553fdaf7c0bd9 Author: Maarten Maathuis Date: Fri Feb 27 17:23:42 2009 +0100 exa: we support PREPARE_AUX commit 1249fd25a529702a4c6fb4831ef92e801f0b6122 Author: Maarten Maathuis Date: Fri Feb 27 17:21:47 2009 +0100 Revert "exa: support major version 3" This reverts commit b7f99aec7282ca7c81d19ff3ad7d9ff22275d476. commit 1c4a284a80ebed9f9d1e01c47b929481801566b5 Author: Stuart Bennett Date: Fri Feb 20 20:02:38 2009 +0000 Rework PLL decoding in terms of pll_vals, save/restore pll_vals on vt switch If your nv04-nv4x vt after running nouveau is more broken than it was with the previous commit, file a bug commit 81b4732162915ab1ac0593e0ef21b56b089dafae Author: Stuart Bennett Date: Fri Feb 20 19:11:41 2009 +0000 New common struct for pll values Makes the compiler do our dirty accessing work for us commit adf2e350341b983d27123550041c3b1ddaac4526 Author: Stuart Bennett Date: Wed Feb 25 02:11:27 2009 +0000 Check whether NV_RAMDAC_580 has changed when setting PLLs commit b7f99aec7282ca7c81d19ff3ad7d9ff22275d476 Author: Maarten Maathuis Date: Tue Feb 24 19:13:23 2009 +0100 exa: support major version 3 commit d91fc78859b11d00c822e5cae70f0fc511b26701 Author: Ben Skeggs Date: Tue Feb 24 08:31:40 2009 +1000 kms: fix resize func Don't change virtualX/virtualY when we're not resizing the actual framebuffer, just change displayWidth to account for the adjusted scanout size. With driver pixmaps, we'll be able to do "proper" framebuffer resize. commit 535498bcfe79858e08ae1f01125025f56bcd504f Author: Ben Skeggs Date: Mon Feb 23 08:20:34 2009 +1000 clear the scanout buffer on statup to avoid seeing garbage on-screen commit 022767373474a0dacf50ee6fcd6401db15018aca Author: Ben Skeggs Date: Fri Feb 20 13:59:58 2009 +1000 nv50/exa: properly align offset for mem_tile ioctl I really really hate this ioctl().. commit e09f50e5f9126c682289b7ba790f16b93a80b876 Author: Stuart Bennett Date: Wed Feb 18 21:04:00 2009 +0000 bios/randr12: fix dual link TMDS (#20006) TMDS04 needs setting, just as for LVDS, and bit 31 of fp_control should also be set (although in this instance the scripts ensure it is set) Furthermore, stop dpms clobbering any changes made to fp_control by scripts Many thanks to bmaass for testing commit b968db77037790dd5be91d6fafa0552eb7e9520f Author: Stuart Bennett Date: Mon Feb 16 21:38:31 2009 +0000 Return of "bios: fix create_i2c_device for g80" commit 0a439ba05aa192e7433d430acd91b60719d20caf Author: Stuart Bennett Date: Wed Feb 11 20:52:43 2009 +0000 Parse DCB before running init commit 870b6f0d2df3e64af5ac921594b1742f82329c49 Author: Stuart Bennett Date: Tue Jan 20 05:29:38 2009 +0000 Split parsing and init into separate functions commit 0280a0c975830b5c4b2edf4fff8a79fb7d67b9df Author: Stuart Bennett Date: Wed Feb 11 18:53:56 2009 +0000 Attempt to remove pNv and bios_t use in parsing the DCB It's meant to parse a section of rom image into useful things, so use of pNv ought to be unusual. Access to things contained in pNv and bios_t makes it harder to prove parsing ordering requirements commit 9179c6667cf859248a525c8d01922b69ed45c17b Author: Stuart Bennett Date: Wed Feb 11 18:33:47 2009 +0000 Variety of DCB enhancements * ensure parsing of dcb_table.i2c_default_indices happens * only merge entries on dcb versions < 2.1, and note consequnces of merging * correct dcbent->index on post-merge compacted entries * drop pointless memcpy * return an error if no outputs found * define dcb structure in nouveau_bios.h (ought to rename pNv->dcb_table to pNv->dcb one day) commit 317ca477cdbb936f29360984bcee25a0ecda3aa3 Author: Stuart Bennett Date: Mon Feb 16 21:15:51 2009 +0000 Revert "bios: fix create_i2c_device for g80" This reverts commit ca72ca24784b9da09b6e3e0b39f3aa32b8f7b502. It'll be back in a minute. commit 7b25a3019beba6342505fa16327a5bcd43669f90 Author: Maarten Maathuis Date: Mon Feb 16 21:23:56 2009 +0100 nv04: unbreak copy commit 60c8bb1391a51188a4981b4936c190c149b79b7f Author: Ben Skeggs Date: Mon Feb 16 13:09:39 2009 +1000 default to autodetecting whether to enable the driver's kms paths commit a31b1d0118dc7b4d07a2c232fcd5aafbf94f69b9 Author: Ben Skeggs Date: Mon Feb 16 09:49:39 2009 +1000 exa: reimplement driver-controlled pixmaps commit d97e993072dc773ecfeb80b5e138b5e4598a1c3d Author: Ben Skeggs Date: Mon Feb 16 08:50:02 2009 +1000 exa: preparation for reintroducing driver-controlled pixmaps commit 1e00c7d1e6edb7f6b4e6d12ef227d27413948f8f Author: Maarten Maathuis Date: Sun Feb 15 18:52:59 2009 +0100 shadowfb: clip copied regions to frontbuffer size. - There have been reports of crashed when moving windows outside the visible screen. commit efe27964fa25f71dcbdc7a751210860369ea0e11 Author: Maarten Maathuis Date: Sun Feb 15 16:54:18 2009 +0100 nv50: correct a poorly written comment commit 2573c065423af47e14263479c66f2308259f29b8 Author: Ben Skeggs Date: Fri Feb 13 10:46:13 2009 +1000 exa: remove exaWaitSync() call in nouveau_exa_pixmap_map() unnecessary, nouveau_bo_map() will sync if required. commit 500053517cb5fe058468c8965f43e6c3209ba7b5 Author: Ben Skeggs Date: Thu Feb 12 09:04:43 2009 +1000 exa: don't need exaMarkSync on DFS, the operation will be done already commit a7e7c557dbf9b2fe54db401793608128de08bdf5 Author: Ben Skeggs Date: Thu Feb 12 09:01:49 2009 +1000 xv: remove notifier usage commit 8ecb8d5331bdb910beea416cdb0b662c624c5c96 Author: Ben Skeggs Date: Thu Feb 12 09:00:07 2009 +1000 exa: remove notifier waits in UTS/DFS nouveau_bo will handle CPU/GPU sync if necessary when bo_map() is called. commit cfb884b816eebbdaa2103dd233c6f975834e536d Author: Maarten Maathuis Date: Fri Feb 13 22:29:33 2009 +0100 bios: add some more valid regs commit ca72ca24784b9da09b6e3e0b39f3aa32b8f7b502 Author: Maarten Maathuis Date: Fri Feb 13 22:18:18 2009 +0100 bios: fix create_i2c_device for g80 commit bbd7041791eacd357afa775236d4123dd98ab9c9 Author: Maarten Maathuis Date: Fri Feb 13 20:30:24 2009 +0100 bios: implement opcode 0x76 (INIT_IO_CONDITION). commit 5dd2cbe454ee8560c814f3fd96d7c28e0fec1dc1 Author: Maarten Maathuis Date: Thu Feb 12 17:13:42 2009 +0100 exa: add nouveau_exa_pixmap_is_tiled commit 15ccf721791fa4f61784ad00449630c6d2496328 Author: Stuart Bennett Date: Sat Feb 7 16:40:46 2009 +0000 randr12: anti-crash measures for #19854 commit 17e9d4bb8c46d67e201b2a369eff7db805dff07b Author: Stuart Bennett Date: Fri Apr 4 19:01:20 2008 +0100 randr12: use bios PLL setting routines for modesetting Only used for setting modes currently, old code remains for restore commit e444e0e348b3aab59671ffdeb605f9a57c46bf70 Author: Stuart Bennett Date: Tue Jan 20 03:23:40 2009 +0000 Readability improvements for nv_hw.c and nvreg.h commit f5ea66c2ef2c726b6a0aff72843c379ab25dbaff Author: Stuart Bennett Date: Tue Feb 10 19:01:43 2009 +0000 Pull in extras from CRTC PLL code to bios routines * g7x magic bits * 0xc040 manipulation for vplls commit 416636509152cf12c801ac537cb8c1bd20c19b5e Author: Stuart Bennett Date: Tue Jan 20 02:11:08 2009 +0000 Pull out ramdac580 setting and powerctrl_1 shift code to separate functions And only twiddle powerctrl_1 for vplls on nv3x single stage pll chips commit 8b7041833c11f32feb7fa5edc21648cc9db1a333 Author: Stuart Bennett Date: Tue Feb 10 19:01:05 2009 +0000 Miscellaneous fixes to bios PLL code * bios variable was only used for chip_version. simplify. * set plls faster on single pll cards after nv15/16 * allow early return for single stage plls when already set * single stage pll mode is only for nv41+ * 80 cols fixes commit 01bb4c1576a45217953632c9f5612aea9173f95f Author: Stuart Bennett Date: Mon Feb 9 21:14:43 2009 +0000 Make PROM score badly, out of available bios images, if checksum bad Problem exposed on a Mac following 0387ac32 Having PROM first is good, if the image is fine. But if the read-only PROM has problems, not a good idea to use it if there are other options available Also avoid result contamination, if a read method has returned early and not overwritten previous image in *data commit 30848dd378d05917c646a24df404846e6f9b2352 Author: Stuart Bennett Date: Tue Jan 6 16:23:33 2009 +0000 randr12: bodge-in continuous timings when the scaler is in use (#19203) Similar to 3354e660b0744976871683ce226f17e873f26b50 in the intel driver, except I can't see much benefit in allowing bigger-than-native resolutions, so no sync range hacking A pity the xserver has no idea of scalers and so each driver ends up with a hack commit 0387ac32bef6c714f54917d5d36071ae1224458c Author: Stuart Bennett Date: Sun Feb 8 09:19:53 2009 +0000 Allow reading of PROM and PCI rom on PPC (for people using x86 cards) commit 6ad66c0b6165822dde167fd1700bd14727ce7087 Author: Stuart Bennett Date: Sun Jan 25 20:09:36 2009 +0000 bios/randr12: be strict about when to use modes from bios vs modes from ddc Again, the Inspiron 8100 in #14567 is an example of wackiness, having a non-0xf i2c_index, but using straps If the previous commit didn't break your DCB 2.0 EDID equipped laptop, this will commit b5391eb909f8b477c3c438f1136d788acfe6bfd8 Author: Stuart Bennett Date: Sun Jan 25 03:03:29 2009 +0000 Simplify FP strapping semantics and trust bios parsing of use_straps_for_mode In many ways a spiritual revert of 11de8d The compound fp.strapping member faithfully implemented what nvidia sticks in cr58 (for cr57 == 0xf), but this was never directly useful and had differing overloaded interpretations with bios version, causing confusion. Return to just using the result of get_fp_strap (g80 code of which unused and so dropped) As noted in the commit, there have been DCB 2.0 laptops (as in bug 14567) which don't set use_straps_for_mode when they should, so we set it for all DCB 1.4-2.0 cards. If EDID-ful DCB 1.4-2.0 laptops exist they will be broken, and will need fixing later (simplistic fix: use_straps_for_mode = (get_fp_strap() == 0xf) ) Will also break nv40 straps-based laptops whose tables used reserved values, but that's pretty broken anyway, and I've no evidence they exist commit 34c2b1539bb2d69dd3bd5911c4fac62e46385d20 Author: Stuart Bennett Date: Sat Jan 24 18:41:31 2009 +0000 bios/randr12: misc (mainly lvds related) clarifications and cleanups get_fp_strap() moved (& unused g80 bodge removed) in anticipation of next commit commit 98b8cada6c355d437925a92ef0413e96751ed567 Author: Maarten Maathuis Date: Sat Feb 7 21:02:31 2009 +0100 Always allocate 2 hw cursors. - This hopefully fixes the legacy codepath again. commit f1099810bb3cfe451877667a0224eb3d664e442f Author: Maarten Maathuis Date: Sat Feb 7 20:04:54 2009 +0100 Fix a few warnings. commit 691589d8c05b8b0354e359b4942711f6fffa9903 Author: Maarten Maathuis Date: Sat Feb 7 19:59:28 2009 +0100 Fix some cursor fallout, mostly in legacy code. commit 945f0cb644b6e4f34cc04927177fe53529aeb5cf Author: Ben Skeggs Date: Fri Feb 6 00:44:14 2009 +1000 kms: update drmmode_display commit ba1f897159d910a25560796d11c9d0357869e1c0 Author: Ben Skeggs Date: Thu Feb 5 23:15:24 2009 +1000 keep resources around after leavevt, far too problematic currently commit 4dfd0b1b21415c48c4b6e0e8d335f3fc70922d27 Author: Ben Skeggs Date: Wed Feb 4 15:35:53 2009 +1000 oops commit e02813aab0376271ee777a2b8dafc9381f96311a Author: Ben Skeggs Date: Wed Feb 4 14:50:35 2009 +1000 link against libdrm_nouveau (installed with libdrm) commit 2c06308a6c5878fca3ff4f2f9c969705d966607f Author: Ben Skeggs Date: Wed Feb 4 14:09:21 2009 +1000 require drm 0.0.12 commit 29aa1341fb28578968953f7e7dc3de0ec66f70f5 Author: Ben Skeggs Date: Mon Feb 2 11:13:55 2009 +1000 fix NoAccel from when map/unmap became stricter commit 62adc557560fa82c2086e32cd16bc51f67a28b48 Author: Ben Skeggs Date: Tue Feb 3 08:10:45 2009 +1000 Revert "Improve the NoAccel situation, but it's not working yet." This reverts commit 285027a180b676ac63f4c7e158e94ffbe22bf11d. Sorry, fixed this yesterday and forgot to push the commit. commit 285027a180b676ac63f4c7e158e94ffbe22bf11d Author: Maarten Maathuis Date: Mon Feb 2 11:15:02 2009 +0100 Improve the NoAccel situation, but it's not working yet. - nouveau_bo related functions will cause problems for fake bo's (since they don't have a bo_priv). - NoAccel still doesn't work for me (the scanout contains random crap). commit 5e63c7866ac93f39fde49af185387d2094110627 Author: Ben Skeggs Date: Mon Feb 2 13:46:01 2009 +1000 Revert "nv50: make entire offscreen area tiled, use extra blits to scanout buffer" This reverts commit 6c3f8da1bff3c94353748321b40a523add824327. EXA doesn't use UTS/DFS hooks when it's accessing the "front buffer" for software fallbacks, so sw rendering to it was garbled because it doesn't understand tiling. The Prepare/FinishAccess hooks could be used to point the pixmap at the linear scanout buffer instead for sw access, but on VT switch for some reason exa get called to try and do things, hit the PrepareAccess() hook and die horribly because in LeaveVT() the driver deallocates the buffers. The other alternative was to use libwfb to wrap the fb accesses and handle tiling, but exa isn't quite ready for that yet either - it's being worked on. Another point made about this patch was that we should figure out the display engine and get it to scanout the tiled buffer directly, not commit shoddy workarounds. Even for this "correct" solution, the two above-mentioned issues still apply. commit 6c3f8da1bff3c94353748321b40a523add824327 Author: Ben Skeggs Date: Mon Feb 2 08:52:18 2009 +1000 nv50: make entire offscreen area tiled, use extra blits to scanout buffer This fixes some pretty bad performance issues with window resize and desktop switching where ARGB windows are concerned. It also allows Xv to be used without a composite manager. The drawbacks are the use of a little more memory for the shadow scanout buffer, and a bit more GPU time is used for the extra blits. But it's worth it. If you want to get rid of this, figure out how to scanout tiled buffers :) commit 61791028ee9321748b635a85d4e53ed80d143df5 Author: Ben Skeggs Date: Sun Feb 1 18:58:27 2009 +1000 nv10: use the correct 3d object on NV1A commit dfd87ece014402339f82ecc26bc27b2e47e213df Author: Younes Manton Date: Sat Jan 31 16:52:46 2009 -0500 xv: Unmap filter table BO after init so it can be validated (nv30,40) commit b8de749bbaeacbbe677df1939f7fd39d9d3863a7 Author: Stuart Bennett Date: Sat Jan 24 05:40:02 2009 +0000 Avoid any risk of parsing oscillation on if_is_24bit Would depend on having a BMP laptop with EDID equipped panel and a bios that doesn't match current suspicions, but better safe commit 0a0bb720da63e4a323978e4a52a4d6e1e4f4ae27 Author: Stuart Bennett Date: Wed Jan 21 00:33:55 2009 +0000 Split up parsing the bit structure, complain when necessary tables are missing Added bios major version 0x60 (g80+) check since it now complains about missing the BIT "A" table on nv4x roms Also permits on-demand parsing of individual tables if needed in the future commit 2d86018d52c387d4f2370b7c1ff83798ad6e1cf7 Author: Stuart Bennett Date: Sun Jan 25 20:12:41 2009 +0000 Swap the order of calling parse_fp_mode_table and parse_lvds_manufacturer_table Last seen in this order pre 11de8d7a commit 8c6b3a800ae2df35b6475a46aebab32f0577261a Author: Stuart Bennett Date: Tue Jan 20 04:04:43 2009 +0000 Make calling of init bios functions common Bios structure parsing stage should no longer require hw access This involves serializing BIT hw-accessing functions after BIT structure parsing, but order is maintained so should cause no issues Also, set a digital_min_front_porch default on BIT PPC (G5s), as they have no BIT "display" table (might even fix some wonky display issues like #17571) commit 9b32034eb72e580d4cb5a5e2fa22a76eff0e7f26 Author: Stuart Bennett Date: Thu Jan 29 04:07:04 2009 +0000 Don't read obviously useless bios images, and drop 5x reading on PROM If some nv43 actually need the 5x bodge (no pramin image) we can add it back as a method of last resort PCIR check taken from mmiotrace of the blob's PROM behaviour commit 63aa210f7aee4674337fed3ebfebd198ff1e699b Author: Stuart Bennett Date: Wed Jan 28 16:08:42 2009 +0000 Implement bios I2C opcode 4E (untested) Courtesy an old trace by RAOF commit a81f1590d384bad214111139db9c988ff7676e83 Author: Stuart Bennett Date: Wed Jan 28 15:39:24 2009 +0000 Handle I2C device 0xff fallback for I2C bios opcodes Courtesy an old trace by RAOF Also, use i2c record entry length when available and make rundigitaloutscript function name legible commit 34e967e689a186cdde2f6c3ec222a6870b3584ea Author: Stuart Bennett Date: Wed Jan 28 15:48:27 2009 +0000 Fix pasta error in bios opcode 4D commit 786dd366474006b10c740c5012630ff5f1cd2a0f Author: Stuart Bennett Date: Thu Jan 29 17:56:40 2009 +0000 Fix nv04+ IFC upload and frag prog upload commit 3ab65cf6af0d3f892ade584c29f861f9f8a9d021 Author: Ben Skeggs Date: Thu Jan 29 16:51:53 2009 +1000 add vm_vram_base field to nouveau_device instead of hardcoding 512MiB commit d833c81fadf7dd63ab4ca94b953397fcbe0be581 Author: Ben Skeggs Date: Thu Jan 29 16:25:14 2009 +1000 nv50/xv: previous xv commit was bonged - fix that It actually still worked just fine, but it was wrong. It's possible we'll have more than 1 clipbox, in which case the check for enough space in the pushbuf for a single frame is insufficient. Check for enough space just before emitting quads, if there's not enough flush and reemit state - then go again. commit 0f741eb09c556f8d7893628964fedea862322771 Author: Ben Skeggs Date: Thu Jan 29 16:10:18 2009 +1000 exa: small cleanup commit c10c3c9bbabe8682fe1500098dc53f631690b182 Author: Ben Skeggs Date: Thu Jan 29 15:43:51 2009 +1000 exa: mass renaming and movement of nv04 solid/copy code to nv04_exa.c commit 81ace5dd1fa2c2760036fb1371cc61a383b2698e Author: Ben Skeggs Date: Thu Jan 29 15:29:37 2009 +1000 exa: remove driver pixmaps path that never worked here anyway Bits and pieces remain (disabled) in various modesetting bits for reference. Some of it may be useful when it reappears again. commit 4b1829e2c66f92a19a233afb749f3fb946930db5 Author: Ben Skeggs Date: Tue Oct 7 00:44:46 2008 +1100 exa: remove NVCopyROP table.. commit 410788dc896d99b658508e3a7ebcb4940a039f35 Author: Ben Skeggs Date: Thu Jan 29 14:32:13 2009 +1000 blow up horribly if GPU access to mapped buffer is attempted ...and fix the numerous cases where this was done. The current bufmgr couldn't care less, and synchronisation is done elsewhere. This won't be the case for much longer. commit 4c9346bd750797ee0f0485195f7ce8beb2114b04 Author: Ben Skeggs Date: Thu Jan 29 14:24:57 2009 +1000 bo_del->bo_ref, closer to ng api commit c533f86b512b9d84ec698163a8fbc54233648fbb Author: Ben Skeggs Date: Thu Jan 29 14:13:06 2009 +1000 exa: same for UTS state commit 02677c07f9af01fa3b1eb787d6d320aa43c9140b Author: Ben Skeggs Date: Thu Jan 29 14:10:51 2009 +1000 exa: ensure DFS state is updated across flushes commit 69d02bc73409c8010d19c9f87780b0c0e7621e43 Author: Ben Skeggs Date: Thu Jan 29 13:52:08 2009 +1000 nv50: remove some redundant init, this stuff is done as required now commit 60aea9057a78255a0ded1f64a9b9efd75017347f Author: Ben Skeggs Date: Thu Jan 29 13:50:28 2009 +1000 nv50: forgotten buffer access flags during init commit 5a382dddc948c49f3f5159c078875ee6cdf56db7 Author: Ben Skeggs Date: Thu Jan 29 13:04:04 2009 +1000 nv10/exa: resubmit state in composite as needed commit d4ff8db7b0fb34e0494042b128251ad78c19ad09 Author: Ben Skeggs Date: Thu Jan 29 12:58:30 2009 +1000 nv30/exa: resubmit state in composite as needed commit b71ebcb2c8a0c97837f3de09f034c0bbb35f562c Author: Ben Skeggs Date: Thu Jan 29 12:56:39 2009 +1000 nv40/exa: resubmit state in composite as necessary commit 6ddaddbb7b9442000f1e665bf61994b16d52cd25 Author: Ben Skeggs Date: Thu Jan 29 12:11:24 2009 +1000 exa: rework common pre-nv50 code in the same way nv50 code just was Still have card-specific composite hooks to go. commit f36fa31401b060b9785d1835845c8ce09f8fe6b1 Author: Ben Skeggs Date: Thu Jan 29 11:25:22 2009 +1000 nv50/xv: ensure entire frame will fit in pushbuf without causing a flush commit 1b48331f6bd077f39797bb2d25b62c3c9df5ccb3 Author: Ben Skeggs Date: Thu Jan 29 10:38:53 2009 +1000 nv50/exa: ensure buffer usage is tracked correctly commit 7e644265267b4e35a05328b1c4cb1f2ef5beea58 Author: Ben Skeggs Date: Thu Jan 29 10:13:57 2009 +1000 remove unconditional FIRE_RING() in DoneComposite() hooks Far, far too much flushing. Will completely destroy performance with kernel command submission. commit 34fc4461a6f612e4e00db483effe3a2b9760e70c Author: Ben Skeggs Date: Thu Jan 29 09:47:21 2009 +1000 hack a flush_notify() hook in to match ng preparation for rework of accel code so it'll be more suitable for ng-style command submission. commit d9da090cae1d2dfc539c9db4c923c0e665bce975 Author: Ben Skeggs Date: Thu Jan 29 09:38:39 2009 +1000 Drop GPU resources on LeaveVT, reaquire on EnterVT This allows GDM's switch-user functionality to work on some systems. commit 1eb8b8778037336e530e113b8bbd61d724b1cc52 Author: Ben Skeggs Date: Wed Jan 28 13:50:55 2009 +1000 Enable ShadowFB for DRM-less mode. commit 487463895390500fd4e899f4e3badbb44f2b5429 Author: Ben Skeggs Date: Wed Jan 28 13:41:44 2009 +1000 Allow NoAccel operation without the DRM module present. commit f78aeed720ef185ccdea2d62e02b2714f00ee49c Author: Ben Skeggs Date: Wed Jan 28 10:30:43 2009 +1000 if CARD_INIT ioctl fails, report it instead of continuing commit cf65b875ba3467060d8a3806914b75c710504b78 Author: Stuart Bennett Date: Wed Jan 21 05:22:34 2009 +0000 Fix stupidity introduced in 25de6b867f319099dac05ba84f170da0f0e6c803 Wow. (function executes before bios is parsed, hence version check never works) commit 55e9cdda6e555937e8f5f3998a2e603669b84df4 Author: Stuart Bennett Date: Tue Jan 20 05:09:22 2009 +0000 Split out a function for finding the panel power sequencer stuff and add a bios_t convenience member commit 1b3546b0687a1ae8080009f0c58b26074f08d3af Author: Stuart Bennett Date: Tue Jan 20 04:11:11 2009 +0000 Move the bios flat-panel pointers back into the bios struct Last there in 2007, removed in 82fdd3f76e20fc7dd10fcf00cf1c13520dc56364 :-) commit d29c4815b61635ed53ded94361ba52ee61ea5ac7 Author: Stuart Bennett Date: Tue Jan 20 03:46:05 2009 +0000 Remove a BITism from BMP parsing path, and move old style BMP init into common path commit 3e971f63b6b6859acc19a52a4003bb6041cc5374 Author: Stuart Bennett Date: Mon Jan 19 23:02:09 2009 +0000 randr12: lock independent crtc base registers separately (#19620) Thanks to Mjules for tireless testing, surprising nobody else noticed it earlier commit ffbca7272878d440a06a613df95ce5d7be46f288 Author: Stuart Bennett Date: Sun Jan 18 17:24:47 2009 +0000 randr12: code motion and allow ramdac580 setting on nv40 commit 75a037623adecbe460198066b5059c349de427aa Author: Stuart Bennett Date: Sun Jan 18 15:41:23 2009 +0000 randr12: better selection of nv4x single pll mode and some notes commit 767fcea420fc21c5b5ec6c9f2db56c1a667db306 Author: Stuart Bennett Date: Mon Jan 19 01:51:21 2009 +0000 randr12: no mmiotrace indication that the blob ever clears these bits some hardware drops them on readback, but I don't think that matters also make defined bits shifts comprehensible commit 985ac728276633d14fa5577eacbc2095582b2587 Author: Stuart Bennett Date: Sat Jan 17 23:21:19 2009 +0000 randr12: no mmiotrace evidence for nv47 using the special pll bits commit 3ef6b41a1c072d2f3545915180b522e43e0c8754 Author: Stuart Bennett Date: Sun Jan 18 16:13:57 2009 +0000 twoStagePLL is actually a description of cards using two PLL regs commit c7a423a24ad7da7b510007a0d5a779999bd8cf73 Author: Stuart Bennett Date: Sat Jan 17 04:34:48 2009 +0000 nv04 blitter: use correct number of dma params for real nv04 commit 25de6b867f319099dac05ba84f170da0f0e6c803 Author: Stuart Bennett Date: Fri Jan 16 20:22:16 2009 +0000 Complain more about weird bios images also use bios chip version to test for g80 commit 4d72981cc7d156708683aba51489d4691106438c Author: Stuart Bennett Date: Wed Jan 14 18:15:21 2009 +0000 randr12: avoid classic macro error Guess there's not many ppc nv11 users, as it's been here since Feb '08 commit 133c1a55134853161a25f358432fd05e736718b5 Author: Stuart Bennett Date: Tue Jan 6 17:47:07 2009 +0000 No need of separate allocation for bios image nor of manual allocations for short lived I2C devices commit 8a25049abd2b755187f47572f92b11e9072e522a Author: Stuart Bennett Date: Tue Jan 6 16:55:42 2009 +0000 Make turning on bios execution logging slightly easier and add a minor parsing check commit 54d43c4760b573b5d376859281268046b61fb2f4 Author: Maarten Maathuis Date: Fri Jan 9 20:02:44 2009 +0100 nv50: small fix - planemask is rarely used, so it's just a cleanup. commit 5c9f8d3ce8964ad974175f94b858f9efc11756bb Author: Maarten Maathuis Date: Fri Jan 9 17:48:07 2009 +0100 nv50: Add a fallback for non-repeating XRGB pixmaps. - Other card generations will most likely need this too. commit 0321e6741d9749f9f6b15ac2099139f24e88eef9 Author: Ben Skeggs Date: Thu Jan 8 14:31:39 2009 +1100 nv50: don't segfault if preinit fails before display setup done commit 7dc567d432fc6a3734bf64244e57bcc3612d5ec2 Author: Ben Skeggs Date: Mon Jan 5 10:51:03 2009 +1100 nv50: correct size/layout of uploaded data This should fix the minor corruption that is present while playing some videos. commit 159c18cea2ecb92da74f9a9fdff0a9f5ef03df53 Author: Maarten Maathuis Date: Sun Dec 28 17:56:55 2008 +0100 Make CHECK_TIMEOUT() a little more correct. - Decrease the maximum counter value by a factor 16. - Determine t_start at the start. commit 5d281a2439de1e8c1848b6b700f30476575966e0 Author: Stuart Bennett Date: Wed Dec 24 23:38:02 2008 +0000 nv04-nv4x: support RandR 1.3 panning commit 3c4705cb4472680b6cdc02fd5152d565d214226f Author: Stuart Bennett Date: Mon Dec 15 01:54:12 2008 +0000 Implement bios opcodes 4C and 4D commit 1fd60f202d41d6bb2028955d3bf9e6fc3921e3ff Author: Stuart Bennett Date: Mon Dec 15 01:19:26 2008 +0000 Group all DCB I2C info for a given bus in a structure Furthermore, use the port type field to determine how to drive a bus, rather than the chip(s) characteristically associated with that port type commit 31c9958779d95ae84993f4772607367927a0e313 Author: Maarten Maathuis Date: Fri Dec 19 19:59:53 2008 +0100 nv50: implement get_crtc - Won't help much right now (pre-KMS), but it doesn't hurt to prototype now. commit f7a757827c1d62ac8a7246fe3b64fea1891a7a16 Author: Maarten Maathuis Date: Thu Dec 18 19:57:50 2008 +0100 nv50: implement set_origin (mostly used for panning) commit 74b2e4e92822fb321a9304f0e077c18de57e585f Author: Maarten Maathuis Date: Wed Dec 17 22:42:20 2008 +0100 configure: Avoid compiling drm modesetting code by accident. commit d104f145260ff183b5f7e4c16cebc1680cf771b7 Author: Maarten Maathuis Date: Tue Dec 16 23:54:39 2008 +0100 nv50: Improve lut code. commit 20f93a94ae034ee7c744947f42a29a7c0b50ee9d Author: Stuart Bennett Date: Wed Nov 26 01:37:38 2008 +0000 randr12: pass cursor visibility changes through mode state structures commit 763e0f88c79105a726ea05219875a25fc0129e1f Author: Stuart Bennett Date: Wed Nov 12 20:32:47 2008 +0000 randr12: allow ddc while crtc is locked commit 9d8bd459485392ec21d90c405510f3f097a61921 Author: Stuart Bennett Date: Sat Nov 22 21:20:07 2008 +0000 Punt all bios structs and defines into a new header commit a34a2c07662b0175e03161cb48abaea9d814c1eb Author: Stuart Bennett Date: Thu Nov 20 17:35:59 2008 +0000 Do not attempt to parse FP mode tables for Mac laptops (#18636) The two varieties of these laptops I've had the misfortune to encounter use DDC, and the NV34M based one appears to not include a fp mode table at all commit 1aba513a0b5a00996f28462cd4118214dffd87e2 Author: Ben Skeggs Date: Fri Nov 21 13:16:38 2008 +1100 nv50: program physical addresses into CRTCs, not VM addresses. commit 65b956fb407818117ce17ced6bbe66c55b4acb7c Author: Stuart Bennett Date: Mon Nov 17 20:02:19 2008 +0000 randr12: fix stupidity from 539f4990 found by AVRS2 commit 1666e858dc027bc028083c15618da5cde5a1b6f1 Author: Maarten Maathuis Date: Sun Nov 9 23:10:15 2008 +0100 nv50: use bios provided load detect value commit a020a44a2c48ff20bca6188469cb9cbbb5bf6093 Author: Maarten Maathuis Date: Sun Nov 9 22:56:30 2008 +0100 bios: support g80 loadval table commit 220cbb6347cb0404bd24f457ac6cb5e39917cdbf Author: Maarten Maathuis Date: Sat Nov 8 18:01:18 2008 +0100 nv50_randr: plug a small memory leak commit cea05e14f94dcb842adbfcec515e17e9f5655089 Author: Stuart Bennett Date: Sun Oct 26 03:51:36 2008 +0000 randr12: make colour-map setting less complex commit 0e4b01a5e06d8b5323c010ce89723369f17b10b2 Author: Stuart Bennett Date: Sat Oct 25 02:11:37 2008 +0100 randr12: convenience functions for vga crtc state access commit fe9bfd9b1b5ce6fd0cd0360ec850ae48b4abac41 Author: Stuart Bennett Date: Fri Oct 24 21:02:00 2008 +0100 Tidy EnterVT, and don't call it from ScreenInit commit 3e1ccff8744d9cabef0cd3901e987deeeb38ec12 Author: Stuart Bennett Date: Fri Oct 24 02:49:19 2008 +0100 Condense crtc locking We unlock all crtcs whenever the driver is active, and relock them when returning to VT (which is what we were doing, but in a more complicated manner) commit 83b541e0a9c454059d0e55a932a2ecdbbf650d60 Author: Stuart Bennett Date: Mon Oct 27 19:20:22 2008 +0000 Common function for the bios condition table commit 36c6aa449063387b34c31015d618e53d4b6634e0 Author: Stuart Bennett Date: Mon Oct 27 18:55:28 2008 +0000 Allow more time in INIT_CONDITION_TIME (#18234) commit bf810b32bc959f3821bca18cf158f711dd314a26 Author: Stuart Bennett Date: Mon Oct 27 18:41:43 2008 +0000 More warnings for C51's magical unaligned regs commit d481b5e2e1dcb7ac5b5a7583bc6542b42567eac2 Author: Stuart Bennett Date: Sat Oct 25 17:48:35 2008 +0100 Rework bios parser error handling commit 387f30821ff7add22376de33a203744cdc719849 Author: Stuart Bennett Date: Sat Oct 25 00:38:29 2008 +0100 RivaTuner dumps call the `how much memory have I got?' reg NV_PFB_CSTATUS commit bb20175001748e5d2fab1b9cb2075bbe5d94e5ed Author: Stuart Bennett Date: Fri Oct 24 17:42:53 2008 +0100 pedantry fix for nv11 locking, and some minor cleanups commit 9aecc4226ca9067667004150f7d885b2247273b2 Author: Stuart Bennett Date: Thu Oct 23 23:17:15 2008 +0100 Add a function to lock/unlock all crtcs, use it in nv_bios code Also split initial head owner determination into separate function commit 48581da4d0e1663456ddcbf7a456029cf961d4cd Author: Stuart Bennett Date: Thu Oct 23 02:35:30 2008 +0100 Attempt to make the usage of cr44 rational instead of cargoculted and a couple of minor cleanups in nv_crtc commit 1c7bee95610a47175064b17afd6aa2a45e311b1a Author: Stuart Bennett Date: Thu Oct 23 02:46:03 2008 +0100 Robust nv11 head setting (from mmiotrace) commit cf5162b5ed99666d3dc8db8328115afd6fff6a8e Author: Stuart Bennett Date: Tue Oct 21 02:12:24 2008 +0100 randr12: update scrn field on server regen, and emit an error if rotated (updating the scrn is easier than removing and re-adding outputs) commit 13739cf36893e8ab6d3d4911c76a45f0b8bd5f4c Author: Stuart Bennett Date: Mon Oct 20 21:47:07 2008 +0100 randr12: don't change virtualX/virtualY all the things in the ddx that use virtual* (setting displayWidth, allocating the FB, EXA init etc) use the values present before this function is called these prior values are derived from any Virtual line in xorg.conf and are what we want to use setting virtual* to the crtc size here, rather than the desired Virtual size, breaks everything using them in ScreenInit on server regeneration as the rhd guys say: /* This is strange... if we set virtualX/virtualY like the intel driver * does, we limit ourself in the future to this maximum size. * The check for this is internally in RandR, no idea why the intel driver * actually works this way... * Even more curious: if we DON'T update virtual, everything seems to * work as expected... */ so I'll take that as precedent. commit 98a4dcb112221fa66d82b87ef9229f5c443daf90 Author: Stuart Bennett Date: Mon Oct 20 18:59:35 2008 +0100 Delete notifiers and grobjs in CloseScreen to avoid channel member becoming stale on server regeneration commit 12fce00b2ecf4c6be6cc86c8a7374878bb7dfc20 Author: Stuart Bennett Date: Wed Oct 22 02:47:45 2008 +0100 Remove all object with mmaps in CloseScreen, so that drmClose actually calls the drm release method (and so subsequently, we can be DRM master on the next drmOpen) commit 8e3f27a30078675f1a7974ba436a68a5b45e0924 Author: Stuart Bennett Date: Wed Oct 22 03:32:51 2008 +0100 No reason to call AccelCommonInit twice in ScreenInit, but calling it in EnterVT helps resume... commit f495fa9153ee57d3ee0dc735c3e9e836d84a2ccc Author: Stuart Bennett Date: Wed Oct 22 02:41:17 2008 +0100 nouveau_channel_free should remove mmaps made in nouveau_channel_alloc commit 1cedb8e49c832890efd12904e78dfd8ab5855691 Author: Stuart Bennett Date: Wed Oct 22 02:15:06 2008 +0100 Do frag prog allocation and shader upload in TCL init Similar in spirit to the nv50 inplementation. Removes many dependencies on state stored in static variables, which in turn makes reinitializing shaders on resume / server regeneration tractable. commit 9e2c08937b0d1bfed71997b2b16bded91830af71 Author: Stuart Bennett Date: Wed Oct 22 01:44:10 2008 +0100 Only hackup shaders once commit afc6668d2b4a1971c211c421b6a415fe74dbd2ea Author: Stuart Bennett Date: Sat Oct 18 02:23:18 2008 +0100 cr26 is just another view of 0x3c0 remove superfluous crtc unlock too commit 539f4990c8f1a32da57992dc863f277f8ede8194 Author: Stuart Bennett Date: Wed Oct 15 03:59:06 2008 +0100 Use symbolic define values where known commit 791666a76c68880136ae26d0477bf484cc667f72 Author: Stuart Bennett Date: Wed Oct 15 00:25:26 2008 +0100 Convert CIO, DIO and VIO use to use defines from nvreg for index and data reg offsets commit a1b7f8d9b20bff59956ea1dc2130e5590a60aa4c Author: Stuart Bennett Date: Wed Oct 15 00:12:11 2008 +0100 Rename relevant functions, sizes and offsets to PRM.IO from P.IO, in keeping with the nvidia scheme commit 267c0eef02f5e2a48217235d170a0530de6a94d3 Author: Stuart Bennett Date: Tue Oct 14 23:58:11 2008 +0100 Name crtc index regs according to rules.xml commit 9261c34e873356b02a0fda00e9911d9795d9f1f2 Author: Stuart Bennett Date: Tue Oct 21 17:46:37 2008 +0100 SaveGeneration isn't doing a lot add another close screen thing too commit c29c190036c721dac2e58e66d0c5a70a24377a1d Author: Stuart Bennett Date: Tue Oct 21 16:27:00 2008 +0100 Replace a few memsets with initializers commit 3b53f6ceb86458f9df9b7becc18a79e74b21c91f Author: Stuart Bennett Date: Sun Oct 12 15:52:43 2008 +0100 Eliminate separate NVRec ctor and dtor commit 1b18db28f124bd5021f61b72389e5c0ce003b212 Author: Stuart Bennett Date: Sat Oct 11 21:05:57 2008 +0100 randr12: remove pointless debug in nv_output and nv_crtc commit 240d51dc928cea38f6b9d842b59011ad7c5500c0 Author: Stuart Bennett Date: Sat Oct 11 18:40:35 2008 +0100 randr12: deBoolification and eliminate `override' arg to nv_crtc_load_state_ext commit b95c3e23f0eac7d12d5ee271af8ec5707ac4ef8e Author: Stuart Bennett Date: Sat Oct 11 18:29:40 2008 +0100 Make all CR 57/58 access use the proper functions and defines Use a define for usleep in bios too commit 9988ae594f6f03385b261b0af83b324981f11593 Author: Stuart Bennett Date: Sat Oct 11 17:56:23 2008 +0100 Redo bios logging commit 0e6a9cc61c88deaf0e0935d5a7d269621c3d6cd0 Author: Stuart Bennett Date: Sat Oct 11 18:04:58 2008 +0100 Improve some nv_bios messages, remove others commit b175bfcd6485d9dcddb66ab5f79104567d256336 Author: Stuart Bennett Date: Sat Oct 11 17:59:02 2008 +0100 Bios register list is easier to read when sorted numerically and remove NULL initialization for calloc'd struct commit e51b49c938483ccbd172ff07d0385a6fb474b57e Author: Stuart Bennett Date: Sat Oct 11 02:35:40 2008 +0100 randr12: panels with edid have only a constant mode prove me wrong. commit 765494ebf9b129bd613121cb714e928b09e19500 Author: Stuart Bennett Date: Sat Oct 11 02:16:50 2008 +0100 Remove unnecessary "Setting owner" message commit bf585ad38a80f7828b821936296316bcee4658f5 Author: Maarten Maathuis Date: Sat Oct 11 01:22:35 2008 +0200 The fifo channel should be removed along with closing of the fd, so only clear the client memory. commit 8b7e42461add708e75d3f7d675245f5bbf3652e8 Author: Maarten Maathuis Date: Fri Oct 10 23:37:55 2008 +0200 git-log is no longer valid for git 1.6, switch to git log. commit 933fd803f0aadc934f448937dbeb305256fe8893 Author: Maarten Maathuis Date: Fri Oct 10 23:14:57 2008 +0200 Some fixes that bring me closer to surviving to the 2nd X server generation. - Not quite done, i get a fifo dump when something tries to render. - Something is keeping an fd, which is preventing a full takedown, but this is not a valid reason for failing (kernel modesetting for example will never have full takedown). commit daee3c38a02f48f9094f712800174b88b065f0ff Author: Stuart Bennett Date: Thu Oct 9 17:09:58 2008 +0100 randr12: separate cursor pixmap location setting function commit caf2e920f18cad1c57e945a4e474e63a65ec6a43 Author: Stuart Bennett Date: Thu Oct 9 17:07:30 2008 +0100 Move cursor show/hide funcs to nv_hw, document nv40 bug, and set curctl2 before applying nv40 fix commit f76074c7041b1246efdf2c0a4b0c467e2fe0bef1 Author: Stuart Bennett Date: Thu Oct 9 17:24:23 2008 +0100 Use correct refclk for nv_get_clock, and use bool type as appropriate in arbitration commit bd5b8074b4a250610cf8c9e2f181c2946e902bf8 Author: Stuart Bennett Date: Thu Oct 9 15:25:16 2008 +0100 Tidy arbitration prototypes and split randr12 cursor pixmap setting from arbitration Also fix ages old warning in nv_hw commit 5dc41fdcf4ba76d7154d32f030d2e99756681e4a Author: Stuart Bennett Date: Fri Oct 10 01:11:46 2008 +0100 Merge nv4, nv10 and nForce UpdateArbitrationSettings functions commit 0ffd012c922d241aec22c8e44416171e39e6bf0c Author: Stuart Bennett Date: Fri Oct 10 00:57:45 2008 +0100 Add PCI slot reading defines, and use them for nForce code Also move nForce dimm checking code to nv_setup, so it is only tested once commit 520a76ef3df3cdc735691cfda329ceaae0ec3123 Author: Stuart Bennett Date: Thu Oct 9 20:22:34 2008 +0100 Some tidying of arbitration functions commit 3ceb2b60a09379ef51635f8309fdc82060681e8f Author: Stuart Bennett Date: Thu Oct 9 19:05:01 2008 +0100 Reindent arbitration stuff commit d7439fc50a924f6f1a6b5b59ba3ec076cf90c52e Author: Stuart Bennett Date: Wed Oct 8 23:45:13 2008 +0100 Wrap usleep when called in bios code commit 62cf9f371c420abe7a74ac4bb9fa2da081f1d29b Author: Stuart Bennett Date: Fri Oct 10 16:41:29 2008 +0100 randr12: don't use in use (by another vga output) crtc for load detect (avoids flicker) commit f1d0fd0595b40d3a7f555bada88f1f79b517d610 Author: Stuart Bennett Date: Tue Oct 7 21:39:10 2008 +0100 Better behaviour on allocator fail also fix randr12 code which doesn't know how to call calloc and be sure to use the number of actually inited crtcs commit 2b67015e5911cb7e321da72d7d3d5f0fefedd8e0 Author: Stuart Bennett Date: Tue Oct 7 02:35:44 2008 +0100 randr12: reorder nv_output functions roughly into order of use commit 9f4eef0165766be2e1aa5516eae409e94c09553b Author: Stuart Bennett Date: Thu Sep 18 18:32:36 2008 +0100 randr12: distinguish detected encoder from active encoder don't swap output props until a mode is set on new encoder either commit 549cda114ee378640dda89621b0ce9c937c473da Author: Stuart Bennett Date: Wed Oct 8 01:22:17 2008 +0100 Reduce includes, everything necessary is in nv_include.h commit 30eaa0f08250f72b0171a858f2694ca8a62c3ebd Author: Stuart Bennett Date: Sun Sep 21 00:52:56 2008 +0100 Oops. commit 2481e5646ab3ea5e18d3f5ee4042fa20a8dad3de Author: Stuart Bennett Date: Sun Sep 21 00:44:50 2008 +0100 Optimizing memory usage for unaccelerated case is not interesting commit 19f0ea63a505e6a840cf07bc554fd8f1787616b4 Author: Stuart Bennett Date: Sun Sep 21 00:43:57 2008 +0100 randr12: rename mon -> edid commit 0cb081758f52e73c3055758ed7aced12b93c2519 Author: Stuart Bennett Date: Sun Sep 21 00:31:40 2008 +0100 randr12: crtc destroy also alleviate world shortage of curly braces commit 37adca1dd68d5791b0371eed4b96f6613fc747c2 Author: Stuart Bennett Date: Sat Sep 20 23:57:06 2008 +0100 Need to increment dcb entry index when fabricating additional entries commit e6b6d8c9189f3b5ebbc77f55e318246be0fa1bd4 Author: Maarten Maathuis Date: Fri Sep 19 21:23:04 2008 +0200 Also remove man page entry. commit cb1e9c1ab288bcf380789f775533e4c8ff8705db Author: Maarten Maathuis Date: Fri Sep 19 21:14:09 2008 +0200 NV50: remove {Prepare,Finish}Access since i realise now it's not so useful - despite that the xserver code suggests that pixmaps can be offscreen on this call, that is not done as far as i can tell - not to mention that there is no way to know for sure if a pixmap is offscreen (exaPixmapIsOffscreen is not exported), making the offset useless - this will (obviously) become relevant as soon as driver managed pixmaps come into play, but that is for another day commit 3e397f575df6c3fee6eb9ee810fb3fc70d2c0cc8 Author: Maarten Maathuis Date: Fri Sep 19 20:41:59 2008 +0200 NV50: The TMDS dual link threshold is meaningless for LVDS commit 599d258948be0505f02947251ad6877e7168d9a8 Author: Stuart Bennett Date: Mon Aug 25 01:47:45 2008 +0100 randr12: multiple encoders per connector (DVI-I) that this doesn't break things in subtle and unexpected ways is too much to hope for. one not-subtle and expected way things will break is that xorg.confs with specific setups for DVI-A-n and DVI-D-n connections will need renaming (to DVI-I-n). as the last patch in the series, this also fixes an issue introduced with 144b04a2 (randr12: fix dpms, detect, destroy, ...), that for a screen connected to a dvi connector, both the analogue and digital variants were detected as connected commit 5e8ac848936a1b70babc417454599c0231343399 Author: Ben Skeggs Date: Wed Sep 17 22:12:07 2008 +1000 nv50: 0xa0 family uses class 0x8397 for 3D commit 9c36eefe991daf47d20badffb3009def99473bdd Author: Stuart Bennett Date: Sun Sep 14 23:01:49 2008 +0100 randr12: avoid weirdness when tv-out happens to share i2c_index with another output commit 144b04a258eaa8e3b63c48b5e574524b40a59ac7 Author: Stuart Bennett Date: Sun Aug 24 04:15:20 2008 +0100 randr12: fix dpms, detect, destroy, save and restore for multiple encoders per connector commit 2b30b8914a32049e87205cf896b2e89ab6649bca Author: Stuart Bennett Date: Sun Aug 24 04:26:19 2008 +0100 randr12: re-do detection of dvi-a vs vga commit 50bac3fcd24072b8926ba2dbebd571424fbb7d6d Author: Stuart Bennett Date: Sun Aug 24 03:56:16 2008 +0100 randr12: unify output funcs for analogue and tmds commit 69e30e6727895a8edeffc9a348b13a353cd0c6d0 Author: Stuart Bennett Date: Sun Aug 24 03:12:58 2008 +0100 randr12: unified entry path for dpms commit a794a0c864e5b651bea5e40a4e10978aee9da5b6 Author: Stuart Bennett Date: Sun Aug 24 04:45:48 2008 +0100 randr12: nouveau_output -> nouveau_connector commit 0a5119bd8a927da1f3f4ed6caa2e93acdae29c04 Author: Stuart Bennett Date: Sun Aug 24 02:45:41 2008 +0100 randr12: separate encoder struct commit 352b8fd98c519f85ade02aa679d342bc64faa508 Author: Stuart Bennett Date: Sun Sep 14 16:53:12 2008 +0100 Another DCB 1.4/1.5 TV (#17471) I think we've got enough for TVs to no longer be fatal commit e8ba4e0baa62f02ba85258847963512791d89385 Author: Stuart Bennett Date: Sun Sep 14 16:44:32 2008 +0100 Only use OF bios image on PPC commit 54b8a7ea43ec20c798dc93d881cdffa5cb1125a0 Author: Ben Skeggs Date: Thu Sep 11 03:29:46 2008 +1000 nv50/exa: work around corruption issues (see detailed commit msg) It's not possible for us to do this properly without using the exa pixmap hooks, they require a real memory manager, and is being worked on in the ng branches, which doesn't currently support nv5x at all. For a better solution until then: http://nouveau.freedesktop.org/wiki/NV50Support commit f8c0af3886142ea59936a77006ead0cd2c4ff795 Author: Stephane Marchesin Date: Fri Sep 5 23:08:14 2008 +0200 Partly revert ea152819f45b6cf92f6742ed3f9f639cdbbd53f0, alignment is needed. commit ea152819f45b6cf92f6742ed3f9f639cdbbd53f0 Author: Maarten Maathuis Date: Fri Sep 5 22:51:27 2008 +0200 exa: align offscreenBase to something sensible - Aligning virtualY makes no sense whatsoever. - displayWidth is the "pitch-width" of the framebuffer. commit 95c19b98b38310c543758fe4288a9e47b970fe67 Author: Stephane Marchesin Date: Thu Sep 4 07:51:03 2008 +0200 Add 8200 detection. commit 6dd8ad4ed3f89c6ed9e61708a587d417c8d984fe Author: Maarten Maathuis Date: Sat Aug 30 17:51:05 2008 +0200 nv50: solid fill shouldn't use a pattern rop + minor changes commit b2b726d59fd8af819a7e464824a49f6e6fc10b84 Author: Stuart Bennett Date: Sun Aug 24 00:18:40 2008 +0100 randr12: merge output detection functions commit a223e581b06ffb308aecc2365795951e2c021f29 Author: Stuart Bennett Date: Sun Aug 24 00:08:41 2008 +0100 randr12: remember the edid from detection for getting modes later also split native mode finding into separate function commit 16d9e89d9cfae1c21999d880c557ae283e14178e Author: Stuart Bennett Date: Sun Aug 24 19:56:24 2008 +0100 randr12: detypedef private structs and use a define to get to the privates commit 3b3f3cdbe0f69c57153e070f248ff001cd5a4a17 Author: Stuart Bennett Date: Sun Aug 24 00:31:35 2008 +0100 Remove unused code commit 1e2b87c459a3a0eacd630f1de8b567c36cc792bd Author: Stuart Bennett Date: Mon Aug 25 20:23:05 2008 +0100 randr12: make the nouveau experience less green commit f89af0e6bc5ac88d0755f9402b772ca823518298 Author: Maarten Maathuis Date: Sat Aug 23 03:44:28 2008 +0200 nv50: micro cleanup commit 94bf1060cc9d2f4c0a14bc036f8b76c4d9bfc7d7 Author: Maarten Maathuis Date: Sat Aug 23 03:39:39 2008 +0200 nv50: do ROPs properly this time - Table should work for pre-nv50 as well, i just don't have a card plugged in to be sure. commit 6bd14e4ffe1d5fd9420c4ebb46c9c0844d0547f9 Author: Maarten Maathuis Date: Fri Aug 22 17:56:31 2008 +0200 nv10: composite is an async operation by default, no need to call exaMarkSync(). commit 9f11d13e68bbf72be814b37fa3d03853eec981b9 Author: Maarten Maathuis Date: Fri Aug 22 17:53:11 2008 +0200 exa: FIRE_RING at the end of composite commit 137d099294617adead2cf3d5cc3372d18579eaef Author: Maarten Maathuis Date: Thu Aug 21 23:17:06 2008 +0200 nv50: move VERTEX_{START,END} to {Prepare,Done}Composite - If PrepareComposite returns TRUE, then everything upto DoneComposite is required. commit 34dc05fbc4835ec68de5a1f70cc094ff6efcf310 Author: Maarten Maathuis Date: Thu Aug 21 22:50:49 2008 +0200 nv50: minor tweaks to composite - Make the blend stuff more consistent with other composite implementations. - Verified with "rendercheck -f a8r8g8b8,x8r8g8b8,r5g6b5,a8 -t {blend,composite,cacomposite}" for all accelerated ops. commit eca997750b1cc2263f804afba242f16b6d960e02 Author: Maarten Maathuis Date: Thu Aug 21 20:01:49 2008 +0200 nv50: handle ROPs better - Handle ROP's more like pre-NV50 code. - Special case for 32bpp which seems to work. - This does NOT fix all rendering issues, just an improvement. commit e468df855abd8d8e4fecd2445c82bb8f824297fb Author: Maarten Maathuis Date: Wed Aug 20 19:14:54 2008 +0200 nv50: clip SIFC and add {Prepare,Finish}Access hooks. - when w*cpp is not aligned to a dword, then it's possible to end up with crap at the end of a line, so clip it. - {Prepare,Finish}Access hooks force tiled memory to be migrated upon cpu access. - Added an option to disable these hooks in case you hit a xserver bug that existed up until very recently. commit 0c0c1ab2ce786def653e8adb95c7c5a8ff9c7eca Author: Stuart Bennett Date: Tue Aug 19 00:02:00 2008 +0100 randr12: don't cache pll values (fixes newrestore removal regression) for 5ms, it's really not worth it commit 544fd3c502287754f2161c21514203ccaab8aed9 Author: Stuart Bennett Date: Mon Aug 18 21:50:37 2008 +0100 Remove some of the inaccuracies in the manpage commit e3d9cb926e56d28b7cadd0026ae76c076faced75 Author: Stuart Bennett Date: Mon Aug 18 21:40:36 2008 +0100 NV_ARCH_04 can have rotated output, it's just not accelerated commit 40e920fafb9f22da23ef11c941561bb14966dc47 Author: Stuart Bennett Date: Mon Aug 18 21:39:18 2008 +0100 Delete ShadowFB rotation And nothing of value was lost. commit 6352d7db24451b014b5f6b873881d103fc1eb316 Author: Stuart Bennett Date: Mon Aug 18 00:59:32 2008 +0100 Bye bye 8 bit depth commit 33d52e476b64cd91dc4b01c6826892f2da9499b0 Author: Stuart Bennett Date: Sun Aug 17 23:52:28 2008 +0100 CrtcNumber option is long gone commit a9393a87d36cc486114842275bb78e7e75de754e Author: Stuart Bennett Date: Sun Aug 17 23:17:01 2008 +0100 Micro-tidyups to nv_driver and nouveau_xv commit 8ed30d05afe4a5bb077c088c48c28741414c09d3 Author: Stuart Bennett Date: Sun Aug 17 16:57:17 2008 +0100 randr12: a few line length improvements commit 666ab70754035c569eaa2550ca77c92fe3eaaff3 Author: Stephane Marchesin Date: Sun Aug 17 22:44:11 2008 +0200 Kill some 8 bit code. commit bee8450931395b23040a4cb1ddcb09f8a476cb93 Author: Stephane Marchesin Date: Sun Aug 17 22:25:43 2008 +0200 Fix IFC for 16bpp. Also fix the color accuracy of 16bpp solid fills. commit 609b10ff00c9e8d51fd7c9a5fb62120516780aed Author: Stuart Bennett Date: Sun Aug 17 03:51:39 2008 +0100 0x48 exception does not apply on BIT cards commit a9e2d47e2cee7db447063d7c33f3e42a8d865c92 Author: Stuart Bennett Date: Sun Aug 17 02:48:33 2008 +0100 randr12: some code simplification, rearrangement and tidying We don't claim to support a bpp of 15 or 24, so some old calculations can be simplified commit 5715f95b37ad182377024f468982608b48eb3409 Author: Stuart Bennett Date: Sun Aug 17 02:27:42 2008 +0100 NewRestore: remove, due to lack of interest nobody wants to do text modes manually. for any future masochists, it's here in the history commit d2e924e847273c5b4d342d0ad611de7d106df429 Author: Stuart Bennett Date: Sun Aug 17 01:37:41 2008 +0100 randr12: remove another field member commit 55f490c8c29b103d7d8853e2126a8366304f4125 Author: Stuart Bennett Date: Sun Aug 17 01:26:20 2008 +0100 randr12: fpWidth and fpHeight no more commit 4cbbd44db614d250fdaaf648db2d70ec9bc2f6d9 Author: Stuart Bennett Date: Sun Aug 17 00:38:23 2008 +0100 randr12: improve aspect scaling code commit 8a364682fd67c10c153cb0778c914a4754e82ddd Author: Stuart Bennett Date: Sat Aug 16 23:15:29 2008 +0100 randr12: for native scaling, a clock check isn't enough 1280x1024 and 1280x960 can have the same clock commit 8793bb1d7b79632678d7ce9f1e94c79dfd55fa3c Author: Stuart Bennett Date: Fri Aug 15 23:02:48 2008 +0100 Apply minimum front porch only when necessary (#15949) Also, read minimum front porch from bios table commit 83bb26fd9a8bb283c406bc34d1d7ad0b53d7098a Author: Maarten Maathuis Date: Sat Aug 16 17:18:21 2008 +0200 NV50: disallow doublescan modes on TMDS/LVDS commit 7d5b345f69bf63d36207a7f6ac4d01001d62e79c Author: Maarten Maathuis Date: Sat Aug 16 15:33:13 2008 +0200 NV50: extra warning message commit 743c696c8b0e420a67ce1552ac0cec49c0fdc0f2 Author: Maarten Maathuis Date: Sat Aug 16 15:28:43 2008 +0200 NV50: a half decent attempt at doing something when LVDS has no DDC commit fcbaa10a945e04d77c6ea8f83b738fb6c9e47dd5 Author: Maarten Maathuis Date: Sat Aug 16 14:35:05 2008 +0200 Forgot something. commit 628acddedc7755a16471e9beee3d95d3b8f11150 Author: Maarten Maathuis Date: Sat Aug 16 14:24:18 2008 +0200 NV50: support extended i2c ports (4 and 5) commit c845f5ac0a54b17a9911155030234c229e80626c Author: Maarten Maathuis Date: Sat Aug 16 14:02:51 2008 +0200 nv50: fix some of the rendering bugs - It seems that 32bpp solid fill only works well for for the non-rop case. - The SRCCOPY_PREMULT comes from nv and seems to work well, in combination with the above fallback. - This does not affect the strange stripes with font rendering issue. commit 18288208bdb7f872f0a2e227d20b77c3397747c2 Author: Stuart Bennett Date: Fri Aug 15 01:40:01 2008 +0100 Redo parsing for panels with EDID, and fix nv3x in the process (#17138) breakage a possibility :) commit c9d4e86022bffd00d89076a921b734645145f7db Author: Stuart Bennett Date: Tue Aug 12 14:15:03 2008 +0100 Try harder to load a good vbios image commit ae594786ffc1cdca5bdd8c8638225819f851061b Author: Stuart Bennett Date: Wed Aug 6 00:31:39 2008 +0100 Deal with mobile cards that scribble over the fp strap at POST It's probably safe to assume a mobile card will have been POSTed at boot, so this should be fine. Hopefully there are no cards which have bit 2 set at 0x48 and now break... commit 776670613f79cce3891c65d2f688979767cd1e6d Author: Stephane Marchesin Date: Fri Aug 15 00:43:02 2008 +0200 Fix a 16bpp issue, also remove old code that mostly worked around core EXA issues in older xservers. commit 6854f819f6bb89d67bfb737fd24c3e8b16e67e46 Author: Maarten Maathuis Date: Tue Aug 5 13:08:22 2008 +0200 NV50: Disable messages from hide, show and load cursor, as they clutter the logs. commit 4b24be811b839f9f836b9f8574fc808d2182dd30 Author: Ben Skeggs Date: Mon Aug 4 16:09:28 2008 +1000 xv: fix thinko from when source was reformatted commit 30f54f2a4b81afde129170a26189cdb2bd3c7e9c Author: Younes Manton Date: Sun Aug 3 12:29:57 2008 -0400 g3dvl: Temporarily disable IDCT. commit 89d786435267af58bcecaff206a09b035e666df5 Author: Ben Skeggs Date: Tue Jul 29 23:38:45 2008 +1000 nv50: fix mystery typo commit c0b67f3f3490e826c86eedb32bbcf327592aaaf5 Author: Ben Skeggs Date: Tue Jul 29 01:26:20 2008 +1000 remove use of implicit variables from pushbuf macros This matches the gallium winsys now. At some point the ddx will get updates so the "common" code is once again in sync to make it easier to do mm changes to both the ddx and dri simultaneously. But, I want to get this part out of the way first as the changes might take a bit of work - and I don't want to have to deal with merge conflicts everywhere if someone changes the accel code before I'm done :) commit 80278c9f53f7c357e499bf2b3c5a1dff75fb9651 Author: Younes Manton Date: Sun Jul 27 16:48:58 2008 -0400 g3dvl: Basic XvMC initialization. commit 1f8e27fd1d92d1c07dd8387f1a5e751ab3fab54a Author: Maarten Maathuis Date: Sun Jul 27 00:09:02 2008 +0200 NV50: I was proven wrong quicker than i thought, reinstate a slightly prettier hack. commit 41d46f59eb055130d5d415f0573fbede957c66c3 Author: Maarten Maathuis Date: Sat Jul 26 21:53:26 2008 +0200 NV50: forgot something commit 1b905249c492af4485a9a2f4e7ae3ad5441c8eb5 Author: Maarten Maathuis Date: Sat Jul 26 21:50:34 2008 +0200 NV50: my best guess at the lvds bios table, time will tell if it's correct for more than a few cases commit f3ec6e0e2d84e172cb634fd1348a54aef7256e74 Author: Dave Airlie Date: Thu Jul 24 15:41:57 2008 +1000 nouveau: fix macro as pointed out my moondrake on irc commit 6652e9c85fe8e807ed3d8ff76ec18c250aef436f Author: Ben Skeggs Date: Thu Jul 24 10:13:05 2008 +1000 nv50: support YUY2 in textured video adaptor commit 3534f40b64496d9f6f95148ab81b9321057f7af1 Author: Ben Skeggs Date: Thu Jul 24 09:39:09 2008 +1000 nv50: remove 32bpp solid fill fallback It seems to work, but there's probably a good reason it's a fallback in nv, so may be reincarnated with a more specific fallback if needed. commit 87f7d1f7084032110c347cb73f63e9a929d8c00e Author: Ben Skeggs Date: Thu Jul 24 09:38:27 2008 +1000 Revert "NV50EXA: read the notes + cleanup + enabled 32bpp solid fill" This reverts commit 0b6249fed6909af30856e1afc1a0dd4cd98c0b9e. commit ba7c239e7a13c4726dab7c686ee1c7f34d03a593 Author: Maarten Maathuis Date: Thu Jul 24 01:30:16 2008 +0200 NV50EXA: serious brain fart of my part, sorry - prepare copy may set up a rop and will set operation appropriately. commit 0b6249fed6909af30856e1afc1a0dd4cd98c0b9e Author: Maarten Maathuis Date: Wed Jul 23 21:01:57 2008 +0200 NV50EXA: read the notes + cleanup + enabled 32bpp solid fill - I observe occasional corruption, some of this goes away when using a compositing manager. - The above statement contradicts my earlier statement in the previous commit message. - 32bpp solid fills seem to work fine, but i left the original fallback in case something pops up. - There is definately something wrong somewhere, i just don't know what. commit edbfbd09ac0a05c4125c3217f5d9c8f198d9345d Author: Maarten Maathuis Date: Wed Jul 23 13:34:28 2008 +0200 EXA: put NOUVEAU_FALLBACK in a do { } while (0), fixed opera corruption for me. - I don't understand why a single line define would need this, but i noticed that turning on the fallback info fixed rendering. commit 36d13082dd2c2ba5d490b3dbc6e82d9ccfed8669 Author: Maarten Maathuis Date: Sun Jul 20 15:44:47 2008 +0200 NV50_KMS: some basic scaling and dithering output property support commit 022a9ed5c2657466dd2471a1b29d5e8bc92ca57a Author: Ben Skeggs Date: Sat Jul 19 22:14:50 2008 +1000 nv50: no more sync in composite() :) 0x502d mthd 0x0110 some kind of 2D cache flush? commit 6d8096c72e1aa160cef6729443ed06305a8ae870 Author: Ben Skeggs Date: Fri Jul 18 13:57:13 2008 +1000 nv50: sync after composite for the moment This corrects some severe text rendering issues that get *very* bad with server 1.5. Will look into a proper fix soon. commit c68d8806b309ef4b48d7a98d6fc7aeccb8bb05ac Author: Ben Skeggs Date: Fri Jul 18 13:39:59 2008 +1000 nv50: punt vertex emission macro out to header commit 4ad74cb03070f5279e0b1de2ed326f1167400d60 Author: Ben Skeggs Date: Thu Jul 17 11:15:59 2008 +1000 exa: missed a reloc delta Can't actually hit this bug currently, but one day perhaps :) commit 98a9056224a86244f99ef7e844cda363e563a446 Author: Ben Skeggs Date: Thu Jul 17 11:15:08 2008 +1000 nv50: remove acquire/release surface stuff It's left over from code that never made it to git in the first place, long overdue removal. commit f0305a29c2b4010894362d17f21cdfec39cd7b92 Author: Ben Skeggs Date: Thu Jul 17 11:14:02 2008 +1000 exa: rename m2mf locals to prevent some confusion commit 140c36ed936f4f28842af88efdd8b824c01bb097 Author: Danny Date: Fri Jul 18 03:07:38 2008 +0100 randr12: fix dithering output property endian issue (#16624) tweaked and commented by Stuart Bennett commit b36802fe90165cf0fea61728b06605be5ac25d8d Author: Pawel Worach Date: Fri Jul 18 01:17:18 2008 +0200 Fix for #14858 - freebsd compile. Someone still needs to fix the kernel part though. commit 6f5e90ae739c64478ddf3e042e2bc9c4ff2b951c Author: Ben Skeggs Date: Sat Jul 12 02:24:54 2008 +1000 nv30: more header name changes... commit 4b8427af583a8f84a09e8bd8d6ad614575a4f9c7 Author: Ben Skeggs Date: Sat Jul 12 02:15:08 2008 +1000 nv30: more bustage from header update commit 1672a783c4af58c80ed549fb3dc63c07fc75a882 Author: Ben Skeggs Date: Sat Jul 12 02:03:58 2008 +1000 nv30: un-change something that somehow changed in an earlier commit. oops! commit dae59585abec4b514789a8e580d30757f10d0357 Author: Ben Skeggs Date: Tue Jul 8 12:28:18 2008 +1000 nv50: exa/xv share some stuff, punt it out to nv50_accel.[ch] commit 17fbd810748b61b298c1ea9729d94f7d1177253b Author: Ben Skeggs Date: Tue Jul 8 12:09:09 2008 +1000 nv50: Xv support The NV12 YCbCr->RGB shader is hand-written just like the composite shaders, hopefully correct! I'll probably put a disasm next to each opcode at some point so it doesn't look like just a bunch of magics. You'll need to use a composite manager if you want to watch videos, we can't render directly to the screen for the same reasons as mentioned in the composite commit. Though, a simple workaround is possible in the Xv case, so that'll probably come at some point. For now, PutImage() will fail with BadMatch. The Y and UV plane upload may not be 100% for what NV50 requires, I want to rework all that at some point anyway. For now, at least there's some form of accelerated video to work with. Enjoy :) commit ec452786d9aa3b6db41f1ab3c89aaa20a758f89e Author: Ben Skeggs Date: Sun Jul 6 20:38:44 2008 +1000 nv50: de-magic things before someone accuses me of being an NVIDIA employee commit ad56c5e27642674d8e435bbbe3d6030097a01ff9 Author: Ben Skeggs Date: Sun Jul 6 01:30:21 2008 +1000 nv50: exa composite commit 33fad279e935a5a134ee5cc1777b8ed7510101d0 Author: Ben Skeggs Date: Sun Jul 6 01:21:39 2008 +1000 nv50: tile offscreen pixmaps Until someone figures out how to make the display engine scan out from tiled surfaces things will be a bit painful. Future commits for exa composite and Xv will require the use of the 3D engine, which will *not* render to linear surfaces.. a composite manager will probably be a must for it to be usable. I really don't want the NOUVEAU_MEM_TILE ioctl in the end, but we'll have to deal with it until we can drop support for Date: Sun Jul 6 00:57:08 2008 +1000 exa: pass window coords to m2mf-based UTS/DFS commit b1f316977e2c79fdf5c83092e953bdfc988299e1 Author: Ben Skeggs Date: Mon Jul 7 01:03:02 2008 +1000 xv: remove some disturbing abuses of buffer related things Also brings to attention a point about the overlay when we use a real memory manager. We'll need to find a way for the overlay to signal it's finished with a buffer, or just resort to pinning pPriv->video_mem.. commit 0ce028b6aaa6c20a1578148add2a96b2d37d9108 Author: Maarten Maathuis Date: Sun Jul 6 13:45:32 2008 +0200 EXA: add a pixmapIsOffscreen hook. commit 86c70df254e63ebc5c405803d6faa9ae33df4995 Author: Maarten Maathuis Date: Sun Jul 6 12:52:16 2008 +0200 NV50_KMS: support gamma changes commit 6de89c8cb219cc82b46e0d0d723fa9d1cefe4ac8 Author: Maarten Maathuis Date: Sun Jul 6 12:29:13 2008 +0200 NV50: Unaccelerated rotation support. - This will need a PixmapIsOffscreen hook before it will be considered for acceleration. commit 788fefa2e78a4abf7bd5c396ab9639bc6ff78451 Author: Maarten Maathuis Date: Sun Jul 6 01:03:44 2008 +0200 NV50_KMS: Unaccelerated rotation support. - This will need a PixmapIsOffscreen hook for it to be ever considered for acceleration. commit 2bc1cb832e0ded6cd1411757bec2a4b03536b7ea Author: Maarten Maathuis Date: Sun Jul 6 01:02:45 2008 +0200 Revert "EXA: Add PixmapIsOffscreen hook for EXA versions that allow it." This reverts commit 5a5aee10f84fbea70eee69ece17ddf6e797497a6. This was never supposed to end up here as it's broken. commit 5a5aee10f84fbea70eee69ece17ddf6e797497a6 Author: Maarten Maathuis Date: Sat Jul 5 23:07:58 2008 +0200 EXA: Add PixmapIsOffscreen hook for EXA versions that allow it. - This should allow more flexibility for rotation shadow buffers. commit b9f2358ac35caedbba0339649ef13b03f209f2a7 Author: Ben Skeggs Date: Sun Jul 6 03:50:03 2008 +1000 xv: remove some defines that are in a header now commit 9f53b2a341a81e1bff87fee8bf5c2754cac17849 Author: Ben Skeggs Date: Sun Jul 6 02:28:26 2008 +1000 xv: remove drawable handling from hw-specific PutImage.. it's common... commit a50bba662ddfe49f1b0a7f8faa3668f5e810811f Author: Ben Skeggs Date: Sun Jul 6 01:57:17 2008 +1000 xv: misc cleanups commit 08e9489b79395b234282b0c03d94601ce57678b8 Author: Maarten Maathuis Date: Sat Jul 5 12:47:48 2008 +0200 NV50_KMS: minor change commit ea7e85b493ff0f684f9ccad92f84348cd835719b Author: Maarten Maathuis Date: Fri Jul 4 23:05:20 2008 +0200 Fix some compile warnings. commit 3298249d8267c27235653f17379f8c9f18e4f344 Author: Ben Skeggs Date: Thu Jul 3 23:54:13 2008 +1000 xv: reformat source so mere mortals can understand it commit a1e8ccdf85c5a0177df38a8a2d8c99d60890ec96 Author: Ben Skeggs Date: Thu Jul 3 17:07:45 2008 +1000 xv: nv_video.c to nouveau_xv.c commit 3e17781625c0ef0ec34ee23a6e999de7f1fe4524 Author: Maarten Maathuis Date: Thu Jul 3 08:30:43 2008 +0200 NV50_KMS: autodetect kernel modesetting when active commit 48c2116fb31872111239f5434215f30c8707091e Author: Maarten Maathuis Date: Wed Jul 2 19:04:58 2008 +0200 NV50_KMS: no int10 please commit 11102af2896b3fdf2364854b2d7939b2802c5b2a Author: Stuart Bennett Date: Fri Jun 27 16:21:19 2008 +0100 Backport console font save/restore from nouveau_ms commit ca2c55dfbf65ac268d43ba62db2399976eaf8f0a Author: Stuart Bennett Date: Thu Jun 26 14:44:45 2008 +0100 randr12: fix mode detection for when screen size changes also some mem leaks commit 9c6eb667aa48f87f6bbbdae10cc9f4d237bdb0c6 Author: Maarten Maathuis Date: Sat Jun 28 15:47:18 2008 +0200 NV04-NV4E: Save and restore FB_START commit 82fe9a21596ab80157df20b269ce8df41315de83 Author: Maarten Maathuis Date: Fri Jun 27 18:49:16 2008 +0200 NV50_KMS: switch to output dpms commit 13ce1f4c1d02e70333a192db2efefb3f6a6765e3 Author: Maarten Maathuis Date: Wed Jun 25 19:45:12 2008 +0200 Properly close drm when exiting + misc cleanup. commit 7cb0eed603ea0bd196a7471e43d60fa5e518c7fb Author: Maarten Maathuis Date: Wed Jun 25 19:07:58 2008 +0200 Fixup and add some license statements. - The changed statements are a response to nv commit 2fdcda8ea62eba1b7885f0a75249884715936247. commit 27c7c88431cf368c3d3a953daf03ce3f9f15bc3a Author: Ben Skeggs Date: Wed Jun 25 04:01:21 2008 +1000 change hack to work with latest drm changes.. commit 99a4b686d2b1f8e6768b8cd1cc3fcb6cea2bf6d3 Author: Maarten Maathuis Date: Tue Jun 24 00:02:25 2008 +0200 NV50: unbreak kms and implement a basic off mode/dpms commit 1a23dbd1878909709fc130e00f6171508dcd41bf Author: Ben Skeggs Date: Tue Jun 24 02:24:42 2008 +1000 nv50: stub out NV50SorSetClockMode for LVDS, it doesn't work there commit 2ccc80bd87a76a9f0498cfec531e8a46cbd2c384 Author: Ben Skeggs Date: Mon Jun 23 02:10:09 2008 +1000 nv50: bring in int10-constole-restore hack from nv driver Lack of console restore has been annoying me personally lately while working on 3D, I lack the time/modsetting skills to fix it properly at the moment, so this'll do. commit 73b4fcc20334ac6cd2076c658a4937f9a98ee06d Author: Ben Skeggs Date: Mon Jun 23 01:47:55 2008 +1000 fix non-kms build/run commit 75d8947d40e19c5fc039caf4289cf94fd1570eda Author: Maarten Maathuis Date: Sun Jun 22 16:34:22 2008 +0200 NV50: Some basic code to get kernel modesetting going. - This will get a cleanup later on. commit df52dc4664df11d57fcf8a6c9ae3f87a149e5392 Author: Stuart Bennett Date: Fri Jun 13 02:11:09 2008 +0100 No need for G80+ LVDS conf bits reports I've got a few already. commit 1813559a20f0786b4decdb645f7ba3f52bc30739 Author: Stuart Bennett Date: Fri Jun 13 01:58:41 2008 +0100 More DCB 1.5 TV variants (#16252 and #16342) commit 29c4a58bb2ba476f9558bda31f1082b4685555fc Author: Stuart Bennett Date: Fri Jun 13 01:40:31 2008 +0100 Be a little more discerning about the BIT bios signature Thank you ABIT commit e8c790721d99e171c57b8dd497f5b3e82126c78b Author: Stuart Bennett Date: Fri Jun 13 01:25:49 2008 +0100 LVDS_INIT should not always use head A While the script doesn't need the head variable set correctly, link_head_and_output still gets called and will therefore break panels expecting to be on head B Fixes Apple NV34 console restore commit fc137f23bed7405221b7f483d9151e296b99caf0 Author: Maarten Maathuis Date: Fri Jun 13 19:12:38 2008 +0200 NV50: lvds is probably still broken, but it's a step in the right direction - Just something i had lingering around. - Note that lvds still doesn't run by default, but you're more than welcome to fix it ;-) commit e034616ab2bbbc486f90c5f64e2bd2de194cf92e Author: Maarten Maathuis Date: Thu May 22 21:08:48 2008 +0200 NV50: A small extra piece of init that may prove useful to someone, somewhere, at some point for something. commit c21594cf452a1263682386d04718531d76a7a9b8 Author: Maarten Maathuis Date: Tue May 20 19:19:53 2008 +0200 NV50: Be consistent with rules-ng. commit 9c1d87fa9e6152bffc5c5cdf16b1931cc6e58399 Author: Maarten Maathuis Date: Sat May 10 21:58:00 2008 +0200 NV50: Some misc things. commit 5f08db9057f2970171186b20a25d346386dcb0f2 Author: Stuart Bennett Date: Thu May 8 21:36:05 2008 +0100 Cosmetic g80 laptop dcb parsing enhancement commit 6a460eae941f3e9a7a8a0297efbbd12dca71a9dd Author: Stuart Bennett Date: Thu May 8 14:17:38 2008 +0100 randr12: some reordering, tidying &c commit 7455bc89116bfc5e88fbd444d83c1415a6020a7f Author: Stuart Bennett Date: Tue Apr 29 19:42:54 2008 +0100 Enable RandR 1.2 code-path by default commit 98a751e773c098382e7675e41ee60ce3d9a67ce0 Author: Stuart Bennett Date: Wed May 7 21:25:03 2008 +0100 Don't call call_lvds_script with a null dcbent pointer Stumbled over by hiyuh :) commit 77b24bc93659471bb20254847da124fdaba13a54 Author: Stuart Bennett Date: Mon May 5 00:56:28 2008 +0100 randr12: tidy up some nv50 remnants in the pre nv50 code commit 8997f83cd2727b76240e9dc31ec7751f6d69cf6b Author: Maarten Maathuis Date: Tue May 6 19:46:52 2008 +0200 NV50: Some misc fixes. - Even though tv-out is mentioned, it by no means implies that is (nearly) functional. commit ae574ec7d930d8708e4dd9d1d47558666019afe5 Author: Maarten Maathuis Date: Mon May 5 11:02:07 2008 +0200 nv50_exa.c had no license statement. commit a7af057ff67cf5d7baf78d852dee5ac69b24e706 Author: Maarten Maathuis Date: Mon May 5 01:26:37 2008 +0200 NV50: Rework the modesetting code into a different model. - There is now interface independent code for most things. - This structure, although not exclusive, is only used for NV50 atm. - The change in approach is that the concept of a connector is added to the model (randr12 sucks in this aspect). - I'm hacking around randr trying to create a single output for each connector, the indices are the bus numbers. - Limitations: Hot swapping vga and dvi of same monitor will not make randr12 think it changed, so for the moment force a change. - Concept is largely inspired by the radeonhd driver. commit 5e1b5708d3a7e4298f80b1a1b8bb3fafae0c69bd Author: Stuart Bennett Date: Fri May 2 20:36:59 2008 +0100 xv: nv10 double-buffered overlay mode was getting set on nv04 commit 85536023ed7050632d121299ab99382e096b9984 Author: Stuart Bennett Date: Wed Apr 30 00:59:47 2008 +0100 Use the actual number of BIT table entries commit 78588c71ffd19e18602b95a55186bc53eebb51c3 Author: Stuart Bennett Date: Mon Apr 28 16:51:01 2008 +0100 randr12, xv: manual overlay clipping for randr12 (see #12825) There could be something to be said for doing this clipping when using the blitter and texture adapters too commit 6f7d00a0cb4ec85b058afb0150a122a124542b5f Author: Stuart Bennett Date: Tue Apr 29 22:53:40 2008 +0100 randr12: remove unneeded separate dcb_entry and "or" members Make off-chip outputs clearer too commit 52e58c7e799697989fcfbf95050ce10a4c3d1f8f Author: Stuart Bennett Date: Tue Apr 29 22:08:01 2008 +0100 Pass DCB entry structs in bios functions, rather than index commit 0c1da6907d8e29ed1c058f9655d436c228ea91b6 Author: Stuart Bennett Date: Tue Apr 29 21:53:22 2008 +0100 Pass output field, rather than dcb indices, for tmds access functions commit 2333bc907a4be3c7e36bdd02f27e22b63a7ee7c3 Author: Stuart Bennett Date: Tue Apr 29 21:58:17 2008 +0100 Add an index field to dcb entries, and carry pointer to dcb entry in output struct commit 21f062cad184f21d33d7f5b43f86937979291b58 Author: Stuart Bennett Date: Tue Apr 29 21:27:07 2008 +0100 randr12, xv: oops, transform_in_use doesn't exist on xserver 1.3 commit ee78dc0abef626e29f7617a4b324e847bab1abcc Author: Stuart Bennett Date: Mon Apr 28 02:12:17 2008 +0100 randr12: C51 I2C commit 9b70dfaf4f0317e622ca64fc0804f74a31158108 Author: Stuart Bennett Date: Tue Apr 29 18:46:24 2008 +0100 randr12: only set cr59 to 1 for tmds (fixes nv34 issue) commit c8cec9b2a0b18cd1159613d4dd218725695aef7c Author: Stuart Bennett Date: Mon Apr 28 17:00:27 2008 +0100 randr12, xv: no overlay when the crtc is transformed commit 3233ebba07e7adab347dc3c6f9d17f02e1a9d32b Author: Stuart Bennett Date: Sat Apr 26 02:08:24 2008 +0100 randr12: fix spread spectrum setting for lvds and turn it off during dpms off Assuming that the bios has set this up correctly for LVDS initially is probably safe commit 467f83aa43bffdf545b513fdb7b11b4fe2205b4f Author: Stuart Bennett Date: Sat Apr 26 19:59:58 2008 +0100 randr12: make nv50 code depend on Architecture commit 8b165722d9f9461353abf84b4136e33b816ac842 Author: Stuart Bennett Date: Sat Apr 26 01:21:50 2008 +0100 CR27 appears to contain the chip revision commit 59ff20738e88d6621f9beaea94810274029a21a3 Author: Maarten Maathuis Date: Sun Apr 27 19:52:41 2008 +0200 NV50: A little bit more information, no functional change. commit bb5a2a105f264502d0985ce70e76d5a3d3b6463c Author: Stuart Bennett Date: Fri Apr 25 22:09:46 2008 +0100 randr12: sel_clk binding fix commit 5a85626cccbba80ef3d6fb2fb90ae609b7abde15 Author: Stuart Bennett Date: Fri Apr 25 02:09:18 2008 +0100 randr12: unified mode validation doublescan/interlace limits applied too commit 38ad350118aa9592bdbcb530fe63b85983fb9f64 Author: Stuart Bennett Date: Fri Apr 25 00:03:41 2008 +0100 randr12: only set up one spread spectrum clock on pre nv40 avoids inadvertently getting wobbly crt pictures commit dfd8b42f91257f2cb0762b3d9b07612a7edac549 Author: Stuart Bennett Date: Thu Apr 24 22:23:50 2008 +0100 randr12: deny doublescan modes to digital outputs commit d150ce5c633c90a82411b4b8e44fa4b91647e6a8 Author: Stuart Bennett Date: Thu Apr 24 01:22:49 2008 +0100 randr12: off-chip dvi dpms and fp_control dpms fixed properly Also solves output exclusion problem: two crtcs claiming the same output through cr33 does not work commit dd152ce186fea953968805cf4a1b309a1fd3987b Author: Stuart Bennett Date: Thu Apr 24 00:24:35 2008 +0100 randr12: set CRTCX_LCD in nv_output This makes my nv28 external dvi work. commit b8d401b0a56d23db7199147e6a5dee1edccff4ff Author: Stuart Bennett Date: Thu Apr 24 00:01:50 2008 +0100 These made up defines are more misleading than helpful commit fa8c8437798cfc5494a639d649f0f91f0e7275ce Author: Stuart Bennett Date: Tue Apr 22 22:42:12 2008 +0100 randr12: remove FPP setting and other FSEL changes commit a083bb1a55d0983991c45d113eb7e9814369fff4 Author: Stuart Bennett Date: Tue Apr 22 23:25:40 2008 +0100 randr12: oops (fix to 9edf6d60) commit 16f420e339f0dd6d55d7b87763d97c2eb8e77e66 Author: Stuart Bennett Date: Tue Apr 22 21:34:52 2008 +0100 randr12: RAMDAC_OUTPUT is only for analogue outputs commit 52174047f3f817fa9ce3674440a13687b73ccea8 Author: Stuart Bennett Date: Tue Apr 22 21:29:48 2008 +0100 Revert "randr12: correct SEL_CLK register beheaviour for outputs with or=2" This reverts commit 77af887089be6fef7b793e3c3afdb98ac90a2e8c. External DVI (which is source of or == 2) do not use SEL_CLK commit 61e416153b24516951962aca407ceaa9b7885e22 Author: Maarten Maathuis Date: Sun Apr 13 02:40:55 2008 +0200 NV50: Another few regs. commit 5328370d2f7e10c61485572f53031deace69c515 Author: Maarten Maathuis Date: Sun Apr 13 02:16:27 2008 +0200 NV50: Some more regs. commit e5511a564564350bd8755b7f18a1448ea7c796de Author: Maarten Maathuis Date: Sun Apr 13 01:21:20 2008 +0200 NV50: I now know what UNK8A8 is, so update the value register as well. commit 2c9027679db1657e6fe02cf6674024ca97f4cd6e Author: Maarten Maathuis Date: Sat Apr 12 02:11:32 2008 +0200 NV50: Re-implement output status caching. commit d7681e8ad70c07ec963ac9425b868a2686d79769 Author: Stuart Bennett Date: Fri Apr 11 17:28:16 2008 +0100 randr12: separate pll and arbitration stages of calc_state_ext, and call from mode_set directly commit 0bf08d7699d7c3a1748060febded1c8b3950c9bd Author: Stuart Bennett Date: Fri Apr 11 16:20:21 2008 +0100 state->config is not used commit 08b8bd8a97b580a57d7bb75b3da7827d65c046f5 Author: Stuart Bennett Date: Fri Apr 4 18:59:29 2008 +0100 randr12: unite pre nv40 and nv40 pll restore commit 5b443084ec7b03230d0ec7490c5a3378a9f7187e Author: Stuart Bennett Date: Tue Apr 8 02:25:34 2008 +0100 Use the correct reference clock when reading (V)PLLs commit 0f533b8cc12f49f5d5ac017838f7330a4f8b47ea Author: Stuart Bennett Date: Tue Apr 8 02:25:22 2008 +0100 Various PLL code improvements commit 4e1caa6edfe9499e6c501e70a8fba14bae510462 Author: Maarten Maathuis Date: Wed Apr 9 18:55:06 2008 +0200 NV50: Some misc stuff. commit 099128175ad31956fd1c6622166b65f4ab1fe370 Author: Dave Airlie Date: Tue Apr 8 16:48:37 2008 +1000 nv50: fix distcheck since header removal commit 4af376fa6031bd41dc247e950319f3a151c49f22 Author: Stuart Bennett Date: Tue Apr 8 00:28:03 2008 +0100 MCP67 does not do the second stage gain tests commit dbca8b65d7b12a1dd2eb7aee3ac37ece0bd4ce65 Author: Stuart Bennett Date: Tue Apr 8 01:31:14 2008 +0100 PLL stuff commit 39b2e0b842f4a4e1c3de96c94e380aa9a0327c12 Author: Stuart Bennett Date: Sat Apr 5 05:20:54 2008 +0100 If no PLL coefficients compatible with the constraints exist, don't brick the hardware commit 0b54450e1db7c6411528bc4a3bac4d1a42510aca Author: Maarten Maathuis Date: Mon Apr 7 22:12:44 2008 +0200 NV50: Scaling works fine on VGA connectors, so support that as well. - The default is SCALE_PANEL instead of SCALE_ASPECT for obvious reasons. commit 891e72f4316c4e7e1b9d06f39e075b1a8a8a8c53 Author: Maarten Maathuis Date: Mon Apr 7 21:18:54 2008 +0200 NV50: Deobfuscate some more commands. commit 13c701f9d23a598c281ced726070a219e1b78607 Author: Maarten Maathuis Date: Mon Apr 7 19:29:55 2008 +0200 Make some CARD32 die. commit a3a0710604017f3ceb9c552552d71c3f5dcfab0f Author: Maarten Maathuis Date: Mon Apr 7 19:09:35 2008 +0200 NV50: Give a few registers an UNK label. commit be72a7c9104c1c1d6db960b1d80cc4d820d37440 Author: Maarten Maathuis Date: Mon Apr 7 18:35:18 2008 +0200 randr12: NV04/05/06 can't accelerate rotation, so it's better to disable it. commit 9cf76c91a661587d9c54845e6a06fb25cf9b55a2 Author: Maarten Maathuis Date: Sun Apr 6 23:36:15 2008 +0200 NV50: Some more stuff. commit c725e33078a2fed374fbb52175beba92b0b9fbe8 Author: Maarten Maathuis Date: Sun Apr 6 19:49:11 2008 +0200 NV50: minor rename to avoid confusion commit fcda539ce60ca02f2f4589157f8b8c522430571f Author: Maarten Maathuis Date: Sun Apr 6 15:16:40 2008 +0200 NV50: Deobfuscate another register (partially). commit fa93541b257a8055ea8b55c883475d2db717d971 Author: Maarten Maathuis Date: Sun Apr 6 15:05:33 2008 +0200 NV50: Fix another deadlock in the clock setting code. - Swapping my monitor from dvi to vga causes no mode (=clock) change, but still the supervisor expects a clock change. - This meant it got stuck in stage 2, with no clock that is supposed to change. commit c001fea3b0ae3921c063e7f44c298cafdfef51f6 Author: Maarten Maathuis Date: Sat Apr 5 23:33:22 2008 +0200 Forgot a few things. commit 17a8e1743478e5548a90caf8f84a387366020416 Author: Maarten Maathuis Date: Sat Apr 5 23:23:22 2008 +0200 NV50: rename randr-1.2 functions to be nv50_something_function commit a71ef4da76e33e84303a8b9181dbcfd655e78aa9 Author: Maarten Maathuis Date: Sat Apr 5 23:00:39 2008 +0200 NV50: Some more cleanup. commit aeab563cc89b2fc3cd6cb306aab880b6e28f2b64 Author: Maarten Maathuis Date: Sat Apr 5 22:52:58 2008 +0200 NV50: Some reordering. commit b899ab75781a3076898791381604be575c6d8a70 Author: Maarten Maathuis Date: Sat Apr 5 21:17:23 2008 +0200 Some minor corrections. commit b0ef158a7e281329825c7b6c10cab6097e627b54 Author: Maarten Maathuis Date: Sat Apr 5 21:06:03 2008 +0200 NV50: Document dvi hotplug detection. - This can only be used once modesetting is moved to the kernel. commit be54b9299b4a261fc707b74407cf4d847fcbb243 Author: Maarten Maathuis Date: Sat Apr 5 16:16:26 2008 +0200 NV50: Remove some questionable guesses. commit c06f202cfbee8568fb8358ea1caffec41c71e648 Author: Maarten Maathuis Date: Sat Apr 5 01:54:06 2008 +0200 nvbios: Drop a N2/M2 requirement on NV5x hardware, as it prevents getting a mode on 1024x768'ish and lower. - Limitations are very strict in nv5x bios tables and N2/M2 can drop below 2 (the blob does this too). commit 5ce26b9aec214dd99e5399fe0f864d8faad15d2c Author: Maarten Maathuis Date: Fri Apr 4 22:49:06 2008 +0200 nvbios: Add some valid register ranges for nv50. commit ce86484979d873325ec4c74ed84107be9ad9ba62 Author: Maarten Maathuis Date: Fri Apr 4 22:38:30 2008 +0200 NV50: Switch to common pll calculator function. commit 821ad3d643f9564d043c7f3909e0b8be28e94965 Author: Stuart Bennett Date: Wed Apr 2 16:58:45 2008 +0100 randr12: delete stuff commented out a week ago that no one's complained about commit e90e534728e9cbe65ee6c70faf596db449495665 Author: Maarten Maathuis Date: Fri Apr 4 17:13:25 2008 +0200 NV50: Minor comment updates. commit 08550984aba2bfa3eaeeddbbf6af25206819abe8 Author: Maarten Maathuis Date: Fri Apr 4 17:04:49 2008 +0200 NV50: Some more stuff. commit ef4339aacf72bf5422b22ab18b73416f2738b284 Author: Maarten Maathuis Date: Fri Apr 4 16:49:00 2008 +0200 NV50: Some more registers. commit 3183df1aa61f3c441a93e5a8b50db6628d804465 Author: Maarten Maathuis Date: Thu Apr 3 22:42:31 2008 +0200 NV50: Update my knowledge of interrupts. commit 04fd80d29913ed02524de177fa7c87b616147d15 Author: Stuart Bennett Date: Thu Apr 3 03:00:13 2008 +0100 Small declaration reordering commit 92934e4b7571a578386327ebdb59eb6d10992763 Author: Stuart Bennett Date: Thu Apr 3 01:03:38 2008 +0100 Move some variable declarations in the bios parser commit 927384005a01a606835452c9d1e26d7df98f81cb Author: Stuart Bennett Date: Thu Apr 3 00:11:31 2008 +0100 randr12: some fixes to dithering property commit 52c880c97acf29d5ed8dfeec5810fcc7d8bb7b35 Author: Stuart Bennett Date: Wed Apr 2 19:45:43 2008 +0100 randr12: better analogue clock limits (taken from pNv->{Min,Max}VClockFreqKHz) commit 29714e7b9ae952aecd036086c053ec030aad94c9 Author: Maarten Maathuis Date: Wed Apr 2 21:31:07 2008 +0200 NV50: Some minor changes to the display supervisor (mostly comment). commit 9ac32d3e2bf400f6a6220118b8008804cd11e435 Author: Stuart Bennett Date: Wed Apr 2 19:03:07 2008 +0100 Some bios parser PLL writing improvements commit 4a192ea6cf9df39d95368f46482c777524471118 Author: Maarten Maathuis Date: Wed Apr 2 18:21:01 2008 +0200 NV50: Add my name to some files. commit db6220b8611829a77d354de1e45f6fe29e118b2a Author: Stuart Bennett Date: Wed Apr 2 16:16:13 2008 +0100 randr12: since the crtc function records are now mutable, unify pre nv50 templates commit b9762ba272a3ee817278e3967794c55a4fe73961 Author: Stuart Bennett Date: Wed Apr 2 16:02:43 2008 +0100 randr12: don't provide rotation functions in NoAccel case commit a24ab3d1559d023270915f373527efb6eefacd8d Author: Stuart Bennett Date: Wed Apr 2 16:05:30 2008 +0100 Revert "randr12: Fail rotation in NoAccel case." This reverts commit b33317ed98957db42691f5f9c41c119c10c91be6. commit 33d4c2f2fe6c6c400ce945f4c7ecc09ee08123a5 Author: Stuart Bennett Date: Wed Apr 2 15:46:50 2008 +0100 Add quirks for Apple *book backlight commit 8a3f051dc9f007c3d801942d32899b8d6c09fd34 Author: Maarten Maathuis Date: Wed Apr 2 14:54:16 2008 +0200 NV50: Some more things. commit b33317ed98957db42691f5f9c41c119c10c91be6 Author: Maarten Maathuis Date: Wed Apr 2 09:28:45 2008 +0200 randr12: Fail rotation in NoAccel case. commit d017dfa93e7eff988339b8030af1a563347156bc Author: Stuart Bennett Date: Tue Apr 1 21:23:35 2008 +0100 NV30/35 setPLL bios support commit 32f550a534dc3e19f7cd3640549336846ad6052d Author: Maarten Maathuis Date: Tue Apr 1 22:33:15 2008 +0200 NV50: Fix a minor cursor issue. commit 27e819dbcd5ce36be71c7dd3be332f777a80caf4 Author: Maarten Maathuis Date: Tue Apr 1 22:20:04 2008 +0200 NV50: Add some debugging statements to important functions. commit 99857933e8edc3be2e4af0c8c7e3fe3b1e221de9 Author: Maarten Maathuis Date: Tue Apr 1 20:33:16 2008 +0200 NV50: Some i2c stuff. commit 9199307195c51b52979c483b3c0adf49f2301281 Author: Stuart Bennett Date: Tue Apr 1 05:16:29 2008 +0100 Use new PLL reading code Of course, having spent some time perfecting the reading of NVPLL and MPLL, it turns out to be totally unnecessary on >= nv30 :-/ commit a3f82d92ae6cbd779d341fe11687d12c5aac1762 Author: Stuart Bennett Date: Tue Apr 1 05:03:14 2008 +0100 Unified PLL reading commit 350fb202e113bc03a71fd7e451e2c26ec990a61a Author: Stuart Bennett Date: Tue Apr 1 05:29:05 2008 +0100 randr12: get_clock_from_crtc only necessary for TMDS commit f741bf7b724dd0698f71b28c461337526f20fe31 Author: Stuart Bennett Date: Tue Apr 1 00:23:06 2008 +0100 Better PLL limits for some nv3x commit 94ca1951feda10b9d6ad828816a459af750de286 Author: Stuart Bennett Date: Tue Apr 1 01:00:16 2008 +0100 randr12: deal with nv30 and nv35 PLLs individually commit 626d8d62eef205dc542e3a7cd82beb329a23cdaf Author: Maarten Maathuis Date: Mon Mar 31 19:27:28 2008 +0200 Init global gamma on all crtc's, even if they are currently not in use. commit f54cea5662fdfc17762711a88892a27aed62f74c Author: Maarten Maathuis Date: Mon Mar 31 19:17:50 2008 +0200 NV50: Some clock related cleanups + minor changes. commit 7393d8fc76f7bbb8aa156587d81ee1a01c17470e Author: Maarten Maathuis Date: Mon Mar 31 14:10:42 2008 +0200 NV50: Some misc cleanup. commit 9edf6d60b2b6698e88edc7798285bd843bfce0f4 Author: Stuart Bennett Date: Sun Mar 30 21:48:13 2008 +0100 randr12: different handling for sel_clk for pre and post nv40 This won't set the spread spectrum bits for pre nv40 from null initial state, but that's not a major concern right now commit 84ab4be08947ef35900da6b84702bc9acb4121bb Author: Stuart Bennett Date: Sat Mar 29 21:26:37 2008 +0000 Minor tidyup to output merging commit 1fe1d8161059afcc6f6ba152b9331e1576ef1f93 Author: Maarten Maathuis Date: Sun Mar 30 22:42:47 2008 +0200 Kill a useless register offset. commit 75680d723144270c12a6d500d8e2c2c421e4ebc1 Author: Maarten Maathuis Date: Sun Mar 30 15:18:09 2008 +0200 NV50: remove unneeded function commit 263ec94ec0f553f5ab6a22d3fd335bebff2c029b Author: Maarten Maathuis Date: Sun Mar 30 12:21:29 2008 +0200 NV50: Some minor cursor cleanups. commit 86722ad60fb939743f5ab73413f721cd26bf2c3c Author: Maarten Maathuis Date: Sun Mar 30 03:37:16 2008 +0200 NV50: Deobfuscate some of the modesetting, a few things were hidden away in innocent looking variables. - Some mode variables were overridden and didn't represent their name anymore. commit 633a8f4f0a8ff3bcb5e6afa9bbcf3f6ed44ef905 Author: Stuart Bennett Date: Sat Mar 29 19:01:30 2008 +0000 randr12: make sel_clk behaviour match comment (which seems to be correct) If nv40 breaks, this whole thing will need another look commit 7a8bbb7f0890ef99de539f0f7acccd469f33dce9 Author: Stuart Bennett Date: Sat Mar 29 00:03:27 2008 +0000 Fix Apple backlight code, broken in pci-rework conversion commit 4d0974c48eff8cd51af66f8fded4fad50044958a Author: Stuart Bennett Date: Fri Mar 28 01:10:31 2008 +0000 Consistency fix + constify commit acd007843f00cb99cf26c4a5f885e365c3a8065b Author: Maarten Maathuis Date: Sat Mar 29 21:47:04 2008 +0100 It seems wise to NVSync for all hardware on NVLeaveVT. commit ea27bc38938277599228ba403a082963bf89d702 Author: Maarten Maathuis Date: Fri Mar 28 19:56:36 2008 +0100 NV50: Better safe than sorry. commit d4ca83e2d1f1432dc7de290087f03a6ff3553d98 Author: Stuart Bennett Date: Thu Mar 27 23:55:30 2008 +0000 randr12: shrink pitch alignment stuff and move commit 43ff98cd89e3dc43c281e41f3a36a76bcd3e5a65 Author: Stuart Bennett Date: Wed Mar 26 18:35:14 2008 +0000 randr12: tidy-up 3/3 - TMDS04 twiddling Code commented for easy reinstatement should problems arise commit 9491ee3f3fbb8b50244444424ef6148217ace944 Author: Stuart Bennett Date: Wed Mar 26 18:34:28 2008 +0000 randr12: tidy-up 2/3 - DPMS CR57/58 twiddling Code commented for easy reinstatement should problems arise commit 2e001c140eacc5d5f02435b9c81b13e5d40db71f Author: Stuart Bennett Date: Wed Mar 26 18:33:59 2008 +0000 randr12: tidy-up 1/3 - FP_DEBUG_0 twiddling Code commented for easy reinstatement should problems arise commit ec9fa3c958d6763ff96d8b884ed36c80d911475a Author: Stuart Bennett Date: Thu Mar 27 19:24:04 2008 +0000 randr12: allow doublescan and low clock modes 320x240 ftw. Also improved mode rejection error messages commit 048f31014092c1dccb1944d2b1a84c7a301be48e Author: Stuart Bennett Date: Wed Mar 26 18:58:47 2008 +0000 Minor fix to lvds script caching commit commit 3feaa48b53f51c094718708e52f08b546b0b0e27 Author: Maarten Maathuis Date: Wed Mar 26 20:01:19 2008 +0100 NV50: Implement per CRTC gamma correction. - This remains untested, so if you're in the mood to test ;-) commit 77af887089be6fef7b793e3c3afdb98ac90a2e8c Author: Maarten Maathuis Date: Wed Mar 26 10:02:46 2008 +0100 randr12: correct SEL_CLK register beheaviour for outputs with or=2 commit cb5d4cdb3dc83f9dbd53eae9097c0df458313fff Author: Stuart Bennett Date: Wed Mar 26 02:27:33 2008 +0000 Cache running of LVDS scripts, rather than blocking LVDS_RESET Fixes a regression on some nv40 where LVDS_RESET is needed to fix some bad behaviour in the off/on scripts commit 6924d1ac900524d0978a02f8f8509faab1809b62 Author: Maarten Maathuis Date: Thu Mar 20 20:20:16 2008 +0100 NV50: Although not essential, it's nicer to save a register as uint32_t. commit 1042c2bed3aee8561411fba85438c3fe5ee2cdea Author: Maarten Maathuis Date: Thu Mar 20 20:10:13 2008 +0100 NV50: Some more stuff. commit b58e5e99aa06e1851ce255211d524a88f1fb297a Author: Maarten Maathuis Date: Thu Mar 20 19:59:46 2008 +0100 NV50: Educated guesses at some of the control registers. commit ef25cb9224d37c7937e67824a262937a747c91cc Author: Maarten Maathuis Date: Thu Mar 20 18:49:58 2008 +0100 NV50: Forgot some more stuff. commit 64b3d1ab1a4226fa688722dabc40fe05a0e30d52 Author: Maarten Maathuis Date: Thu Mar 20 18:35:20 2008 +0100 NV50: Forgot something. commit 81929c1810fe4825ff9bd5d4bc84996c35c8ceb7 Author: Maarten Maathuis Date: Thu Mar 20 17:43:30 2008 +0100 NV50: More dehexing. commit ee1ac0646c7c2f018abdfd4f58d49d51f5340784 Author: Maarten Maathuis Date: Thu Mar 20 17:19:37 2008 +0100 NV50: Some more dehexing. commit ca1b8bbebd4b786f0fe8531ba7145aa932e5abcc Author: Maarten Maathuis Date: Thu Mar 20 14:18:18 2008 +0100 NV50: Some more register guesses. commit aa99fb07cd438f436fdfa4e5dff6d87d27950358 Author: Stuart Bennett Date: Wed Mar 19 18:16:03 2008 +0000 randr12: do DPMS off better Half the time that DPMS off is done, there is no crtc bound, which meant outputs never got turned off. It seems xf86DisableUnusedFunctions is always run *before* setting up the new outputs (when using xrandr): if this is not the case, this commit may not be quite right. commit 063b393ac12bec286e0b28c2b18a98cedd3422c1 Author: Stuart Bennett Date: Wed Mar 19 02:56:31 2008 +0000 Optimizations on LVDS script code commit c5203647ddf262978e7d6a4912661a9cc448da66 Author: Stuart Bennett Date: Wed Mar 19 23:12:59 2008 +0000 randr12: unbreak LVDS and primary I2C for < NV50 NV50 check disallowed pre-NV50 cards using I2C on first head, and made garbage get written to CR0 on LVDS This should work for both pre-nv50 and nv50. commit ebc75dc9e8394ee1d13a853341ba9995e9d9d04f Author: Maarten Maathuis Date: Wed Mar 19 21:31:10 2008 +0100 NV50: fix i2c for real commit c6e3a6f57a7ae67c187aff0ad87153e988961784 Author: Maarten Maathuis Date: Wed Mar 19 08:57:33 2008 +0100 NV50: Fix a typo and hopefully fix i2c. commit a989b4caac077f65034fb328a80ab4ae758c1162 Author: Maarten Maathuis Date: Mon Mar 17 23:40:16 2008 +0100 NV50: Fix major thinko in "NV50: kill output_resource and use or directly." commit cd5aaeaa319e2b681c7c6ccc135d76b7c027bd0d Author: Maarten Maathuis Date: Mon Mar 17 22:05:12 2008 +0100 NV50: Handle some things that weren't fixed during rebase. commit f73c2361a7bba5aa9abb4fe65697bfcb2a407e99 Author: Maarten Maathuis Date: Sun Mar 16 16:09:11 2008 +0100 NV50: kill output_resource and use or directly. commit de0fc0ece55997f8b2ad86070cb940e2afd2d7e8 Author: Maarten Maathuis Date: Sun Mar 16 12:46:40 2008 +0100 NV50: Mostly resorting regs. - Also a dithering register define and rename cursor related reg. commit 849bab73da8da8ad8b2987f80fcf90bf86299171 Author: Maarten Maathuis Date: Sun Mar 16 12:33:19 2008 +0100 NV50: Some more educated guesses at register names. commit 0244dc1dd0698be161d7fd629efa10dcb3df106a Author: Maarten Maathuis Date: Sun Mar 16 01:09:48 2008 +0100 NV50: Another subtle difference. commit 5e2d220edf65357f4d7bd8ce97bd829086e0781c Author: Maarten Maathuis Date: Sun Mar 16 01:05:03 2008 +0100 NV50: Fix a potentional bug. commit cef158cee51ecc53c2f5a9910a88c9e802d49980 Author: Maarten Maathuis Date: Sun Mar 16 00:40:59 2008 +0100 NV50: Share output properties. commit 31e7a740a1cddc5edfdede05187e6bd9a6f1b993 Author: Maarten Maathuis Date: Sun Mar 16 00:27:41 2008 +0100 randr12: Implement dithering output property. commit 05f0464669eef0a3caff2466eeffd9843c18a7b7 Author: Maarten Maathuis Date: Sat Mar 15 19:02:55 2008 +0100 NV50: Merge output creation and i2c init. commit 285a13ab41e869544681260b1f2415143456bdc9 Author: Maarten Maathuis Date: Sat Mar 15 18:20:34 2008 +0100 NV50: Merge crtc creation. commit c5dac45a199b7f4fa3692727aa6af1cd9a6b8d35 Author: Stuart Bennett Date: Mon Mar 17 23:20:39 2008 +0000 randr12 offbyone debug commitnoise semantic version control messages ftw? commit 4cd5e430d164cb5a834e4946d5e5dc79061cadfb Author: Stuart Bennett Date: Mon Mar 17 17:21:28 2008 +0000 randr12: remove NVGetOutputFromCRTC This function had a major problem for the long term: assuming a maximum of 1 output per CRTC, which is simply not valid commit 27c21c0574bac47bbb311094c32f17e7ac321ba5 Author: Stuart Bennett Date: Mon Mar 17 17:09:23 2008 +0000 randr12: split out fp-only registers commit c09d190ffe2bab1e1df52d8b83009c10fafbc2bc Author: Stuart Bennett Date: Mon Mar 17 03:03:14 2008 +0000 randr12: better handling for output types in nv_crtc commit 78ded96a4e8f88dba038e5ef0c452b7c7bf9a2dc Author: Stuart Bennett Date: Mon Mar 17 17:16:27 2008 +0000 randr12: remove duplicated regs commit f7013760f9e9ec91bc3bd3739b6cce9018e34bcb Author: Stuart Bennett Date: Mon Mar 17 00:59:31 2008 +0000 randr12: fix noscale scaling mode Also, a bit of consistency missed in the earlier commit commit a9c01eff4bcf3af52faf73269f63a5fd46b3b3b3 Author: Stuart Bennett Date: Sun Mar 16 14:27:14 2008 +0000 Misc startup info mostly duplicated the state storage stuff commit a02f82e9ce79ae24a4f2eba71a83e51f3b6d9e52 Author: Stuart Bennett Date: Sun Mar 16 00:51:09 2008 +0000 randr12: make output parsing consistent commit f04c44eff67adb9099eca7b298b10639dc0b1759 Author: Stuart Bennett Date: Sat Mar 15 01:36:13 2008 +0000 G80 I2C parsing Changed to on-demand parsing commit 718e42478c02c7497cd3917b8ea78ed692f30f3f Author: Stuart Bennett Date: Fri Mar 14 21:22:48 2008 +0000 randr12: make nv_crtc_calc_state_ext definition smaller commit 772bf76b3697d1d1725017787378802c2940093e Author: Stuart Bennett Date: Tue Mar 11 03:39:43 2008 +0000 randr12: merge common PLL paths commit 1326e0176582fd21e16359764e2792cd125548e6 Author: Stuart Bennett Date: Tue Mar 11 02:19:10 2008 +0000 randr12: make plls belong to their CRTCs commit 97b074889feef7b4a3b6401825a46d53321d1c7e Author: Stuart Bennett Date: Wed Jan 30 14:38:59 2008 +0000 Use PMC defines commit ee11c6abe875a758bdfa4469ae6326ac25732178 Author: Maarten Maathuis Date: Fri Mar 14 11:11:07 2008 +0100 randr12: Let an unneeded quirk die. commit 8851d9f3ef4a8cb9b35e1cb8ed80b3ff213eeee0 Author: Stuart Bennett Date: Wed Mar 12 16:29:17 2008 +0000 randr12: sel_clk values are really an FP thing, so move calculation to nv_output commit 63527f978d923317a97dec060be6df16c7baf17d Author: Stuart Bennett Date: Thu Mar 13 20:26:07 2008 +0000 randr12: tidy up output restore commit 769436b3840e10da00b51b94d72d0b2ef510fecc Author: Stuart Bennett Date: Thu Mar 13 19:52:52 2008 +0000 randr12: common tmds access functions commit c455ca0d3df3bb2322154ded40fbe6b86c6a8acd Author: Stuart Bennett Date: Wed Mar 12 03:23:21 2008 +0000 Improve bios' handling of ramdac_580 commit bd5ad7c4e1f824d57517da540658c97b5283d5d0 Author: Maarten Maathuis Date: Thu Mar 13 20:49:53 2008 +0100 NV50: Accept G9X cards. commit 0318b31e19da12ba0d4dc456ad08d6b059d08d1e Author: Maarten Maathuis Date: Thu Mar 13 16:57:24 2008 +0100 NV50: Add back output_resource. commit a4397563c6845668ad1f4b2352b90c872957f8bc Author: Maarten Maathuis Date: Wed Mar 12 23:16:53 2008 +0100 NV50: Unbreak "NV50: Kill the connection status caching (which was broken btw)." commit 63ffb8dce809267706eb621f03da3c3501935bbd Author: Maarten Maathuis Date: Tue Mar 11 23:15:11 2008 +0100 NV50: Merge the two output private structs. commit b4c3bee2f8cc824cd52aca61121634c55d5f5a60 Author: Maarten Maathuis Date: Tue Mar 11 23:09:19 2008 +0100 NV50: rename scale to scaling_mode commit b0d2f93d3adbb798f5d9bfa2d188b666e4c5fc16 Author: Maarten Maathuis Date: Tue Mar 11 23:06:16 2008 +0100 NV50: Rename nativeMode commit e5b8efad35df21d35a3893a6c8b10e1f02272544 Author: Maarten Maathuis Date: Tue Mar 11 23:00:19 2008 +0100 NV50: Rename or to output_resource. commit 19ca2db7683b8cdcfb74f6cc14c9cb6c3876d2c7 Author: Maarten Maathuis Date: Tue Mar 11 22:43:33 2008 +0100 NV50: kill set_pclk commit eef3a665c01c530238c3dc02324573d6bcf6c3f2 Author: Maarten Maathuis Date: Tue Mar 11 22:24:46 2008 +0100 NV50: Remove the remnants of cached_status. commit dc0bb590a40f3d8b18d2136ed906e8dac10ec598 Author: Maarten Maathuis Date: Tue Mar 11 22:22:12 2008 +0100 NV50: kill partner entry commit f66463713a71b0e3090f33c68186884594255cc0 Author: Maarten Maathuis Date: Tue Mar 11 22:12:57 2008 +0100 NV50: fix warning commit cb50cd3276825569a6da1f25a2d89bfd417b5034 Author: Maarten Maathuis Date: Tue Mar 11 21:33:29 2008 +0100 NV50: Kill the connection status caching (which was broken btw). commit 6e2af71c73263c3cf2d61f66c02363decd354da5 Author: Maarten Maathuis Date: Tue Mar 11 21:15:21 2008 +0100 NV50: change i2c to pDDCBus commit d07b3063953c0b17585249dfbc2938a433bea88f Author: Maarten Maathuis Date: Tue Mar 11 19:50:25 2008 +0100 NV50: Switch to other scaling defines. commit 4ddb92b8e936985b5b1429a0a21890879635bcde Author: Maarten Maathuis Date: Tue Mar 11 19:29:11 2008 +0100 NV50: Switch to the same output type as the rest of the code. commit e605fbfc659d3fe1bd71d478c21429b563fbfd80 Author: Stuart Bennett Date: Thu Mar 13 15:21:49 2008 +0000 randr12: nothing uses output_resource. kill it commit 53925cfc3540b89dedd317bbae4318cf53daada1 Author: Stuart Bennett Date: Thu Mar 13 15:31:00 2008 +0000 randr12: fix the setting of NV_RAMDAC_OUTPUT And turn on/off the DAC for DPMS commit 493c79405be23a543cd21c2583c466342399509d Author: Stuart Bennett Date: Thu Mar 13 03:53:18 2008 +0000 Simplify TMDS writes a little commit 4cf1bd9ef016a2c9fe7784fdc83f559bec464f9e Author: Stuart Bennett Date: Tue Mar 11 17:20:28 2008 +0000 randr12: don't allow scripts to break overlay commit 95f2b8439f433afb5d637a3580f933e2cd44488a Author: Danny Tholen Date: Tue Mar 11 17:14:54 2008 +0000 Fix video overlays to treat double-scan correctly when using randr12 commit 460cb260c30467799fa31aef11946d1fe2dd6523 Author: Stuart Bennett Date: Mon Mar 10 23:47:43 2008 +0000 Correct RAMIN offset and some bits missed in previous nv_setup tidying commit e8a5d4638e74b5957fc12b05865f49dd995d0435 Author: Stuart Bennett Date: Mon Mar 10 21:46:38 2008 +0000 randr12: changing tmds2 for dvi-d seemingly unnecessary commit 30ddbe9c2b82bc19d1480a1b38df6b5ca0dd057b Author: Stuart Bennett Date: Mon Mar 10 23:49:08 2008 +0000 randr12: unbreak sel_clk changes commit 03f38725304842b053b7976db5df97e61159d07d Author: Stuart Bennett Date: Mon Mar 10 19:50:55 2008 +0000 randr12: allow spread spectrum bits to be updated on pre nv40 commit 323b7ef9c1c26996b84fd1f67297b2958f68fcc9 Author: Stuart Bennett Date: Mon Mar 10 01:18:56 2008 +0000 randr12: quirk for 17" powerbook, and better sel_clk handling We set sel_clk *before* running the output script, so make sure the set pll->head binding is not altered commit 58f9079cda17bb6a76ba16c14ddc56bd4ac640fc Author: Stuart Bennett Date: Sun Mar 9 16:08:46 2008 +0000 nv_type.h mandates XF86DRI being declared commit 0dbffc868a7b60aa99ca550d33b8488ac9de8d00 Author: Stuart Bennett Date: Sun Mar 9 03:59:57 2008 +0000 Fix up a bunch of prototypes, remove unused wrappers commit e5ded02925e7d39c67e69d0389778ac795bfe743 Author: Stuart Bennett Date: Sun Mar 9 01:31:47 2008 +0000 Move setting of alphaCursor to nv_setup, and restyle useful portions of nv_setup commit 0b8629a9a29203553397eb764b9b9c87d38d4b9f Author: Stuart Bennett Date: Sat Mar 8 22:05:52 2008 +0000 Kill NVFBLayout Using pScrn->currentMode is wrong for randr12, but it's no worse than what it was commit 29cfb08c1b75e050aa58fa6019f7d9be063f8555 Author: Stuart Bennett Date: Sat Mar 8 21:02:35 2008 +0000 Warning fixes And remove a few unused members from nv_type.h commit b87059fcccfac693df0b2dc5ba85cb358ad1eba6 Author: Stuart Bennett Date: Sat Mar 8 20:53:20 2008 +0000 Drop the NV*VGA defines and adjust users commit a636b02eba03454b8b757f69e6a62aae2c3fd571 Author: Maarten Maathuis Date: Sat Mar 8 21:18:34 2008 +0100 randr12: Disable a quirk that has adverse sideeffects on NV36M. - NV31M owners, please test if you have: - LVDS on CRTC 1 and or = 3. - VGA on CRTC 0 and or = 1. - Testing requires enabling both lvds and vga. commit f4228861abec9df310efb863833c82022136e464 Author: Maarten Maathuis Date: Sat Mar 8 18:23:58 2008 +0100 Merge CRTC private structs. commit b3d0d0c01664e874f3b69b36383ad1a7845d7d91 Author: Maarten Maathuis Date: Sat Mar 8 18:10:53 2008 +0100 Death to some unnecesary stuff. commit 03a7a1d7065b55f16385fd16e7a2eff938d59cea Author: Stuart Bennett Date: Sat Mar 8 01:56:36 2008 +0000 Various minor tidyups commit 624148ca7067f748c142db3cd4d31314aa31ee0f Author: Maarten Maathuis Date: Fri Mar 7 20:59:30 2008 +0100 NV50: Convert back to absolute registers. - Someone with a known to work setup should test this, as i have no NV5x card. commit 10bdffb65e2d8f59399556fe3224cbf8e8a171a9 Author: Stuart Bennett Date: Fri Mar 7 19:08:50 2008 +0000 PLL limit table v0x11 commit 2e1af24826e7db0e3f53440a2c5912789ade6c97 Author: Stuart Bennett Date: Fri Mar 7 18:43:16 2008 +0000 Make bios init code work on 6600 by changing pll setting stuff a bit I suspect we're going to need some card specific checks in here. ugh. commit 5fd2dd7b4c6e15d83cb7e7daafb6ee801fa823e8 Author: Maarten Maathuis Date: Fri Mar 7 07:52:09 2008 +0100 It seems libpciaccess release became version 0.10 not version 0.10.0 commit 3e4db03a39770e5fa94ca094deb690cba8175196 Author: Maarten Maathuis Date: Fri Mar 7 07:36:16 2008 +0100 randr12: Forgot to clean up when switching output resources. commit 8a5c6e8b4d00871b17b7d564d765ea677596f79a Author: Jaime Velasco Juan Date: Sat Feb 16 15:01:23 2008 +0000 Do not access beyond source pixmap in NVAccelUploadIFC commit 7afb739418fbac5058d13d05188a69b142529fb4 Author: Stephane Marchesin Date: Thu Mar 6 23:40:08 2008 +0100 Oops. commit 0da8c84cceb178b04ab535edb4e3f0ced204d00a Author: Stuart Bennett Date: Thu Mar 6 22:35:30 2008 +0000 randr12: workaround for xserver randr bug, where the hwcursor always gets displayed after a mode change commit c424144e854563709a01ed2d30a0482edc57fbf3 Author: Stephane Marchesin Date: Thu Mar 6 23:15:31 2008 +0100 Fix my nv10 cursor. commit 633047c65708f1a39e371c2c5da5c111027af1af Author: Maarten Maathuis Date: Thu Mar 6 23:05:43 2008 +0100 randr12: A major rework of output resource conflict handling. - This mostly affects laptops, such as some geforce5 and the famous 7300go laptops. - Test this if you know to have a strange vga/dvi port of your laptop. commit c5230961d181f15cd965c4569813219d9292681a Author: Maarten Maathuis Date: Thu Mar 6 19:29:50 2008 +0100 randr12: Readd some useful information about how an output is routed. commit 97ac866a4e433c70d0de7a1e8fb66a3994194ffd Author: Maarten Maathuis Date: Thu Mar 6 19:16:36 2008 +0100 randr12: Kill almost all usage of ErrorF + some misc cleanup. commit ea8fba29bcfe8158c9bf17754a20684430027aee Author: Stuart Bennett Date: Wed Mar 5 18:53:54 2008 +0000 randr12: don't reset panel unnecessarily for mere backlight control commit 22ec35504fbef83ba5790c87d27cd13e936fccb0 Author: Stuart Bennett Date: Wed Mar 5 14:40:08 2008 +0000 randr12: remove switchable_crtc stuff commit 3b0a1a11f662bfa705806f4afc5898338234ca65 Author: Stuart Bennett Date: Wed Mar 5 14:35:41 2008 +0000 randr12: if no ddc, return XF86OutputStatusUnknown, for !twoHeads and nv11 commit 424500cf828903e3449d4bca22a083087258cc99 Author: Stuart Bennett Date: Wed Mar 5 02:15:28 2008 +0000 randr12: do not change CR43 from its initial value commit a764d3ca2741243f49f34e9a4930a59272927902 Author: Maarten Maathuis Date: Wed Mar 5 09:44:46 2008 +0100 Give some defines more consistent names. commit 234ce16558e59dff302f13ea3d8eb48f46eedf0d Author: Stuart Bennett Date: Wed Mar 5 01:25:20 2008 +0000 Use the BMP structure's I2C info, instead of DCB 1.2's, as marcheu's bios is broken commit bb5429f08b3ffd16d6786bd65d6a4c8db1210ade Author: Stuart Bennett Date: Wed Mar 5 00:38:15 2008 +0000 Add another DCB 1.4 entry commit 5998ba0a35bc1c897916f66b0bcfb9a3e0a7c54d Author: Stuart Bennett Date: Wed Mar 5 00:34:16 2008 +0000 Don't zero out i2c_read and i2c_write pNv is calloc'd, so zero inited, and explicit zeroing overwrites the stuff parsed in parse_bmp_structure. Duh. commit 2d74bcb4602bb0cdae18ed1ffdd17520a3b57a78 Author: Maarten Maathuis Date: Tue Mar 4 21:18:49 2008 +0100 Put braces around a bitmask. commit c7ab8e84bf8ad8ee6106b21a1c07b6d8470e7f11 Author: Stuart Bennett Date: Tue Mar 4 13:34:16 2008 +0000 Add an LVDS output setup quirk for Powerbooks Again, as a result of much testing by moondrake and sbriglie. Hopefully it even works this time :) commit fd9b37b31896e1731bdd56ec847c86c0502ba0f8 Author: Maarten Maathuis Date: Mon Mar 3 19:04:09 2008 +0100 randr12: Only change vpll value when needed. commit 89882b416de3528cf504c989cc147a86d3572053 Author: Maarten Maathuis Date: Sun Mar 2 20:25:45 2008 +0100 randr12: Keep the gamma values when setting a new mode, instead of always resetting to default. commit e8c363b7ca4a416be37a1ea1c97bbd99b21d5be4 Author: Stuart Bennett Date: Sat Mar 1 15:05:09 2008 +0000 Improve link_head_and_output Thanks to moondrake and sbriglie for their work on this commit 4a16414c77ad77e7612f62f4ca1859e0d6a24cc2 Author: Patrice Mandin Date: Fri Feb 29 22:17:30 2008 +0100 nv30: Remove fix that is useless now, and maybe broken in some cases commit 5cb164876b824e8bf52aa44ccf4a797bab310602 Author: Stuart Bennett Date: Thu Feb 28 00:43:17 2008 +0000 Less magical way of setting dual link on EDID equipped panels Eldritch coupling ftl commit 1127974ed8517f28ef9c451d81bf1c61a2b0e6ae Author: Maarten Maathuis Date: Wed Feb 27 23:45:34 2008 +0100 NV40EXA: Support extend/repeat type pad. - Note that all xservers, up to about a minute ago, did not try to accelerate repeat type reflect or pad. commit 6980d0e24a9dae52903e6971c5c8a18240a7dbc1 Author: Stuart Bennett Date: Wed Feb 27 12:55:54 2008 +0000 Add default dual link transition frequency For card bios versions before the relevant field was added Should fix Apple laptops. commit 27e2e55698ab05bf3469e0f68474d4c3f021ca31 Author: Stuart Bennett Date: Tue Feb 26 18:07:39 2008 +0000 Deal with pre-nv40 laptops with EDID commit 41992eb90828976105cbc8bba87fe7d079d7c06a Author: Patrice Mandin Date: Fri Feb 22 17:29:12 2008 +0100 Revert dummy commit commit 073d852f36df4a18563ea892e89eca269efd55ef Author: Patrice Mandin Date: Fri Feb 22 17:27:51 2008 +0100 Dummy commit commit 5db7920763aee3a1b124139273566f7add5e27df Author: Stuart Bennett Date: Sun Feb 10 23:14:52 2008 +0000 Use some of nv_hw's functions in nv_bios.c commit fa8891e78f37edc02537704172156ba77371a307 Author: Stuart Bennett Date: Wed Feb 20 00:50:48 2008 +0000 Unbreak console restore again, and use a less ambiguous function name for head locking commit 38d42a7857480a930e2025e4f63aa7f5defca5c5 Author: Stuart Bennett Date: Tue Feb 19 23:59:12 2008 +0000 randr12: rename NV*VGA functions for api consistency Also nuke NVCrtcSetOwner wrapper commit c77a54768c3fed5939755f23c5c067bb86f49805 Author: Ben Skeggs Date: Thu Feb 21 00:55:39 2008 +1100 xv: don't crash on init commit cf963a128374bf7c2070e8a380e236b5e083adc1 Author: Maarten Maathuis Date: Wed Feb 20 09:36:42 2008 +0100 randr12: Only NV11 needs byteswapping + NV11 uses premultiplied cursors i think. commit 87f1676a243cddcaece9eeb0487a85b7e74b0f13 Author: Maarten Maathuis Date: Wed Feb 20 00:14:12 2008 +0100 NV30/40TEX: Create two adapters, one with fancy filtering, the default without. - Also enable sync to vblank by default, strange that it was off. - Remove the GET_TEXTURE(D)_PRIVATE macros, as one of them pointed to the blitter and one is now ambigious. commit 7ee1bb47d86396cc1a0f7879a98d04588cb31eee Author: Stuart Bennett Date: Thu Feb 14 23:16:01 2008 +0000 randr12: make more hw funcs generic commit 11de8d7a6f9a2dfd5a4f93f031865e284268a0f3 Author: Stuart Bennett Date: Tue Feb 19 21:44:56 2008 +0000 Use fp strapping to determine whether straps are used for flat panel modes commit c1ac6b977a4756e2dbfdb75ab5b53c7c10e76cf4 Author: Stuart Bennett Date: Tue Feb 19 14:53:41 2008 +0000 Rehabilitate bios opcode 6d commit afb42307cb2810ca2d759df62240fbf1f0cc7f7c Author: Stuart Bennett Date: Tue Feb 19 14:23:06 2008 +0000 Spruce up NV04 bios parsing a little commit dfabaab48034bf36c19510fe5de0f1bdaa2157ef Author: Stuart Bennett Date: Tue Feb 19 00:37:27 2008 +0000 More DCB v1.5 entries Courtesy HenneNWH's NV11 commit 2a4373d4f3b092600651b7dc8e2f9f9b520c7e0d Author: Stuart Bennett Date: Mon Feb 18 17:32:43 2008 +0000 Treat 0x4 and 0x8 bits in LVDS DCB v2.0 configuration as meaning the same thing commit daa557c0dadb3ad5caf39a4e90d3ebd16b12fc96 Author: Danny Tholen Date: Mon Feb 18 05:00:03 2008 +0100 Fix PPC DFS/UTS by using PCIgart. commit f8f469286fb3acc1ee694c61fe21e42123a5456a Author: Ben Skeggs Date: Sat Feb 16 03:41:38 2008 +1100 dri: fix broken display in some cases commit a293f32b2172837b6e2bcc3f5771c5219fccfb14 Author: Stuart Bennett Date: Wed Feb 13 00:52:34 2008 +0000 Fix bios pll setting regression Oops. commit 7121fe9dfb1c9162c8be808e09ed6b4b3ce3999e Author: Stuart Bennett Date: Tue Feb 12 18:20:43 2008 +0000 Use a loop to read RAMIN bios image, rather than memcpy commit 3ad7c35740905ad267faf8e248075640d5ee9cea Author: Stuart Bennett Date: Tue Feb 12 17:23:38 2008 +0000 randr12: reorder some variable declarations in nv_crtc and nv_output commit ab40a46430f369a7bd9cef8db4e86414125c8437 Author: Stuart Bennett Date: Tue Feb 12 15:19:58 2008 +0000 randr12: use integer math for scaling No floats in modesetting path commit 4a44468c29c37b5ad4828439f37d023865a9d457 Author: Stuart Bennett Date: Tue Feb 12 15:03:46 2008 +0000 randr12: tidy up some mode retrieval stuff commit 50d77c4199a3a5d2f3ead8327341e91ac2ec5684 Author: Stuart Bennett Date: Mon Feb 11 16:27:27 2008 +0000 Trim useless nv_type members Also, crtc_active isn't used on randr12 path commit 0c1e48a2192555856894d7e2b3025cd342c2f448 Author: Stuart Bennett Date: Mon Feb 11 01:42:04 2008 +0000 Remove some DDX cruft commit 5a8e246fcab3e349f48d0ce0c4da812a411767f2 Author: Stuart Bennett Date: Mon Feb 11 00:34:27 2008 +0000 Use mmio access wrappers and reorder some variable declarations in nv_bios.c commit 2ffcd89bfb0383fb32e8ec41f1cd472764b9b99d Author: Stuart Bennett Date: Mon Feb 11 00:03:50 2008 +0000 randr12: Use absolute regs for 8 bit regs commit c9b1f020d1c5be069dae19f99b3c26bb126052ae Author: Stuart Bennett Date: Fri Feb 8 19:44:37 2008 +0000 Move non-crtc specific hw funcs from nv_crtc to nv_hw commit 6cb8fb6cc63bf55f18b4dde53c393336e817474e Author: Stuart Bennett Date: Thu Feb 7 02:04:20 2008 +0000 Ordering mechanism for BIT table parsing, and (hopefully) automagic laptop detection commit 4f690235d70ae249323439380a69d8309a8c9981 Author: Stephane Marchesin Date: Wed Feb 6 22:18:46 2008 +0100 Replace a const with its name. commit 75c5912fffde88bfe2ddd158a446588b76ef44d9 Author: Maarten Maathuis Date: Wed Feb 6 19:06:14 2008 +0100 Fix bad debugging in NVWritePVIO(). commit 50da8b8f5b5feb6787ed50f221529730d25b5467 Author: Stephane Marchesin Date: Wed Feb 6 17:44:52 2008 +0100 Fix UV swapping on PPC. commit 4ff11d13be6e8050e0b726dc7af8e4bc11bd9d0d Author: Stuart Bennett Date: Mon Feb 4 22:34:21 2008 +0000 Missed out "DEBUG" part of the name in the define commit 181ee3bcecfc778c9f671853a696ab3224ac4747 Author: Stuart Bennett Date: Mon Feb 4 22:31:02 2008 +0000 Load correct PLL limits for single stage PLL cards with blank PLL tables commit cbcb1070db6fbb4d13ddcc35739d2d3e49f3766d Author: Maarten Maathuis Date: Mon Feb 4 07:47:06 2008 +0100 Once again kill usage of an exa private function. - Must have creeped back in during all the texture adapter changes recently. commit f14d27d638e75faa5bbda903f65a4d5479222ead Author: Stephane Marchesin Date: Sun Feb 3 17:15:50 2008 +0100 Remove include guards & add copyright. commit 7522640ee8d342c5ebb62989b051f73e230f5ce7 Author: Stephane Marchesin Date: Sun Feb 3 17:01:50 2008 +0100 Last round of fixes for nv30/40 bicubic Xv. commit 78553ab9a0309c7d27632fe7184f3233cfde6610 Author: Stephane Marchesin Date: Sun Feb 3 06:07:35 2008 +0100 Fix tearing. commit 7240f861a98c5f8d9779a4f3a743b748af775337 Author: Stephane Marchesin Date: Sun Feb 3 05:15:41 2008 +0100 Understood and fixed some NV30 FP_CONTROL bits. commit bb2a7bd3461eec37f179748a9bdb9375b1c3da04 Author: Stephane Marchesin Date: Sat Feb 2 05:54:47 2008 +0100 Fixes to nv30/nv40 textured video. commit c10d30dfefe93a9911d89eaffe3d29d3cff66a96 Author: Stephane Marchesin Date: Thu Jan 31 06:15:02 2008 +0100 Misc textured video fixes. commit cfdfd5a99bb7ac959a1188994db4c75a97de2e34 Author: Stephane Marchesin Date: Thu Jan 31 06:00:59 2008 +0100 Of course, add the nv30 video texture file. commit 970a8e474c666d6e33351f7ca6a3a5273024baf4 Author: Stephane Marchesin Date: Thu Jan 31 05:59:08 2008 +0100 nv30 video texture. Doesn't work with bicubic yet, only bilinear. commit c1eba822f1579637f59933b04e31591e86b975fc Author: Stephane Marchesin Date: Wed Jan 30 02:38:14 2008 +0100 Remove (void)ing that's not necessary any more. commit 7356ad90b387d01c2bf25aa653c41ca9365c5c20 Author: Stephane Marchesin Date: Wed Jan 30 02:30:39 2008 +0100 Remove unneeded stuff. commit e06dfd2964f9bd7f0855a101f5e6971020dfa6be Author: Stephane Marchesin Date: Wed Jan 30 02:19:08 2008 +0100 Separate the shaders from the rest of the code. commit a69c50780cacf0d0f2948208cfa7e0558a8c3644 Author: Stephane Marchesin Date: Wed Jan 30 02:18:26 2008 +0100 Macros for the PME range. commit 47c8ed472f37d68f3cc241a58ee5b7b8643e537d Author: Stephane Marchesin Date: Wed Jan 30 02:17:22 2008 +0100 Add PME range. commit 63f47c9bf59ccb9f1b6adbefd55deaec1435faf7 Author: Stephane Marchesin Date: Tue Jan 29 21:25:28 2008 +0100 Small cleanups. commit c98e9fa5c572deeafd7f605bb29d6c83cd38de9d Author: Stephane Marchesin Date: Tue Jan 29 21:24:39 2008 +0100 nv40 video texture: first pass at bicubic video. commit 10967a4dac8c3eaf828359dcba7a6e1272561aa3 Author: Stephane Marchesin Date: Mon Jan 28 04:52:01 2008 +0100 Update to newer nouveau_class.h commit 82728b3df45e8a5c0a45462d2ce847a41fd31f07 Author: Stephane Marchesin Date: Sat Jan 26 19:02:50 2008 +0100 Update to latest nouveau_class.h commit 9d9a5acae1deae8c76b512362634066e0c32a817 Author: Jaime Velasco Juan Date: Sun Feb 3 15:45:32 2008 +0100 Don't FIRE_RING() when in NoAccel mode. commit 11c1ee1cb0ee9c8096ea371d95d188c538ac3fb2 Author: Maarten Maathuis Date: Sun Feb 3 15:43:35 2008 +0100 Some minor reindenting. commit 0db347294e09d3d17200ca130e719df2d22f69b6 Author: Ben Skeggs Date: Mon Feb 4 01:19:23 2008 +1100 exa: those limits were a bit conservative on some hw. AFAIK nv2x up should be able to handle 4096x4096 textures and render targets. commit eb72e67641215b710868da7bb66b466f6ccbbe25 Author: Ben Skeggs Date: Mon Feb 4 01:07:07 2008 +1100 exa: more accurate coordinate limits commit 8645d2d9554ee46397240fbd9904fd4f905aefb2 Author: Maarten Maathuis Date: Sun Feb 3 14:54:41 2008 +0100 Fix NVExaPixmapMap() for NOUVEAU_EXA_PIXMAPS case. commit dd81efd0cc64a070f7489decbac345cc1b4fa9ce Author: Maarten Maathuis Date: Sun Feb 3 12:03:43 2008 +0100 Fix undefined symbol. commit 2a1116cbf61e84b16366076366f4bbd5f550fb9f Author: Maarten Maathuis Date: Sat Feb 2 20:34:57 2008 +0100 Remove a few leftovers to actually make the last commits work. commit 714bea6449aab47a9f2211718183ee84a3c70129 Author: Maarten Maathuis Date: Sat Feb 2 19:53:32 2008 +0100 Kill NVShowHideCursor and use a wrapper. commit 741acded643945c5a2da7bef088ed1ff7f5fa85e Author: Maarten Maathuis Date: Sat Feb 2 19:26:13 2008 +0100 Remove nvRead/WriteVGA in favor of nvRead/WriteCurVGA wrappers. commit d429cabd9ae9865a45cc88f43ab6d9d61b3fcf36 Author: Maarten Maathuis Date: Sat Feb 2 19:17:32 2008 +0100 Kill NVLockUnlock and make it redirect to NVLockUnlockHead. commit dc2aee0ef69c85aaffdc3c1da5a228642d049a30 Author: Maarten Maathuis Date: Sat Feb 2 15:12:00 2008 +0100 More wrapper death. commit a57fd67a2a6ae66af218fedd704a04d855260a2f Author: Maarten Maathuis Date: Sat Feb 2 15:06:02 2008 +0100 Let some wrappers die. commit b9a4eb6f6ea4f8f0747baa50037e33a0584cfd29 Author: Maarten Maathuis Date: Sat Feb 2 12:47:32 2008 +0100 Undo last commit and move it to drm. commit 288b56545a8da1e7b5aa64b1093316ca2f28f868 Author: Maarten Maathuis Date: Sat Feb 2 12:28:44 2008 +0100 NV40: Fix longstanding issue with nouveau crashing after using blob. - Took me a while to track down, but for me this is definately it. - In my case i got the X cross and then it would freeze and i would get a fifo dump. - Don't be shy, let me know if this works for you too. commit 0ec1b10a82c411181ff7a8643bb2390cfe08e4e4 Author: Stephane Marchesin Date: Sat Feb 2 04:04:58 2008 +0100 Don't allocate the whole AGP gart as a scratch buffer, since we still need to allocate the fifo afterwards. commit 5b79b0a9e54fe99eaae5b411f46a601b6944b773 Author: Maarten Maathuis Date: Fri Feb 1 23:34:32 2008 +0100 Don't use functions that are not supposed to be used in randr12 mode. - Also add NVLockUnlockHead() and NVSetOwner() functions. commit cedb604ee79cd73a9ec3940c7b056109811ba670 Author: Maarten Maathuis Date: Fri Feb 1 22:41:09 2008 +0100 Remove usage of "illegal" wrappers in code that also used for randr12 mode. - I've got something prettier in mind to clean this up, which will likely follow. commit 1a5247856929877442e1ec00f190c6d497ca64fe Author: Maarten Maathuis Date: Fri Feb 1 19:14:38 2008 +0100 randr12: Remove a hack, confirmed on 7600GS that it is unneeded. - This was one of the cards that did need it in the past. commit b6972e7bec0455250851c06d142336cb53be1a74 Author: Maarten Maathuis Date: Fri Feb 1 14:47:32 2008 +0100 randr12: Some minor fixes. commit 988dce0f452f6b80b2d02e1a0f78f826674cc3c0 Author: Arthur Huillet Date: Fri Feb 1 10:04:32 2008 +0100 NV10 EXA: limit regcomb state re-emission, fix logic for A8 + A8 yielding a 3% perf improvement :p commit a84852c2e0b19cf848495dc7e4bde4426b7bd199 Author: Maarten Maathuis Date: Wed Jan 30 22:57:09 2008 +0100 (hopefully) Fix build on powerpc. commit e8a975e6a8afe5ae9c77d20f4d59d3d10221f7d9 Author: Arthur Huillet Date: Wed Jan 30 18:37:39 2008 +0100 Xv: NV30 overlay can not scale down by more than 0.5x commit adc26892f6e711f08a5ed189a643e3fe9646e15c Author: Stuart Bennett Date: Wed Jan 30 17:43:16 2008 +0000 Fail gracefully for too-big resolutions / colour depths commit 09c9d7c3c50b630e1509f787ff946cc0656f7cba Author: Maarten Maathuis Date: Wed Jan 30 18:50:37 2008 +0100 randr12: Misc change. commit 6a46bf59f15d68404b536d436bf70337cd88e33d Author: Maarten Maathuis Date: Wed Jan 30 18:35:18 2008 +0100 Check if the framebuffer can fit into the offscreen memory. commit 9607d7828b16b0cb4a428bc29e2ce7c9bfd95371 Author: Arthur Huillet Date: Wed Jan 30 18:24:44 2008 +0100 Xv: NV04 overlay can not scale down at all, as confirmed by DirectFB commit 7edfb473533ce41db9e2b3709d32bb8ca7da85a4 Author: Stuart Bennett Date: Wed Jan 30 14:44:14 2008 +0000 PBUS define additions commit 6e090591bd2dab051362d8528a3bc76f30418d94 Author: Stuart Bennett Date: Wed Jan 30 14:35:25 2008 +0000 PCRTC define additions commit e51799382e40c033b2d6d09dd65dd7f7c1e5e4d6 Author: Stuart Bennett Date: Wed Jan 30 15:03:06 2008 +0000 Missed these in the ->absolute conversion commit ee0d557a26d326af27445bd0b283a5c6ead7c1cd Author: Arthur Huillet Date: Tue Jan 29 18:46:16 2008 +0100 Xv: detection of composite for the overlay commit 3a5f92d48e32d251e41bab561e52082033d26d9d Author: Stuart Bennett Date: Wed Jan 30 01:31:43 2008 +0000 Make bios port io use PVIO as appropriate, and have harsh validity checks commit 92c0d9630843957212d8ce296fea6bca8d802069 Author: Stuart Bennett Date: Wed Jan 30 00:36:59 2008 +0000 Make PLL setting quieter commit f58d174bd50943c3dfb2d6c909d0a98dbbd35dae Author: Stuart Bennett Date: Tue Jan 29 23:10:27 2008 +0000 Move some regs from nv_bios.c to nvreg.h And use more symbolic names in nv_bios commit d0022c35f39fde74ee5f3978ea78e053988fb608 Author: Stuart Bennett Date: Tue Jan 29 22:41:40 2008 +0000 Tighten bios reg checks a little commit b1b1d76eb187f4ab3020bbd69c2b1cc9b39d0d83 Author: Stuart Bennett Date: Wed Jan 30 00:30:46 2008 +0000 randr12: make nv4x plls less special commit 8f05d66bad8e74129cffa2918f9ecf6824c9f0b9 Author: Stuart Bennett Date: Tue Jan 29 22:33:34 2008 +0000 Don't attempt to parse BIT D and L tables on non-mobile cards commit 8e834ece6592df13bd3eb7e9f28c01b4eb0c9791 Author: Stuart Bennett Date: Tue Jan 29 18:57:28 2008 +0000 Add some mobile pci-ids, and reorder numerically commit 0b586ae0a2998339a9d5d3590e91dfa62af9ab6a Author: Maarten Maathuis Date: Tue Jan 29 19:04:25 2008 +0100 randr12: Remove excessive writing of VTOwner. commit c522ebb293a1c37142e29bf02bb82524e99336b0 Author: Stuart Bennett Date: Tue Jan 29 17:30:32 2008 +0000 Make sure nv04 has some defaults (as the bios parsing is non-existant) commit 62b6c5fe490578990c249042657f20bb0cf49a01 Author: Stuart Bennett Date: Sun Jan 27 22:11:31 2008 +0000 Use absolute regs in the DDX Due to having to make a few defines for regs that were hardcoded, there could be breakage (nv04 overlay, this means you) Hopefully not. commit f5c9f9910a46cfa41d817ef7ca345bfea278b358 Author: Stuart Bennett Date: Tue Jan 29 14:14:26 2008 +0000 Reorganise pll limit retrieval commit 26ff67f03be38925905a572dab3ec61653cd8286 Author: Maarten Maathuis Date: Tue Jan 29 10:53:14 2008 +0100 NV30EXA: Always init texture origin, please report if your viewport setup needs to be different. commit 38df9a95740e934b9691dff1ed1b597cd2254cfa Author: Maarten Maathuis Date: Mon Jan 28 20:55:47 2008 +0100 Forgot to be paranoid. commit 2ea0314859569c3ae4356272a35f0b316abf4df7 Author: Maarten Maathuis Date: Mon Jan 28 20:51:20 2008 +0100 Small improvement to nouveau_dma_wait, at least makes it show up in profiling in a clear way. - This may also slightly reduce the cost of a very short wait, but not by much. commit dd483e226519bc4d2c088e97490039613014dfac Author: Stuart Bennett Date: Sat Jan 26 20:22:08 2008 +0000 randr12: 2nd attempt on nv11 console restore commit 5b0fa02101c82a83e11f7d279d366689d54bfacb Author: Stuart Bennett Date: Sat Jan 26 18:09:10 2008 +0000 Use NV_{WR,RD}08 to avoid double logging io And one less bios FIXME commit a099bbff8bb3766201a7deb9c4a718fff7edbe51 Author: Stuart Bennett Date: Mon Jan 21 23:54:51 2008 +0000 randr12: remove unused PLL code commit 0eb428e5a8b60e52d18b3bdffed46ae3f07b7bc0 Author: Stuart Bennett Date: Fri Jan 25 16:05:59 2008 +0000 randr12: attempt to fix brokenness of head setting / getting on nv11 commit eea2fd41ebc17f72b43c776a0391df0733b8d6e4 Author: Stuart Bennett Date: Sat Jan 26 14:20:01 2008 +0000 randr12: don't do load detection on nv11 commit a2c0facefbc878815e00c734464b3c87b5cce842 Author: Stuart Bennett Date: Sat Jan 26 01:46:59 2008 +0000 Assume 18 bit laptop panels by default, add a message that may trigger on 24 bit panels Revert "Invert 18/24 bit interface flag, so that the default value (0) does not imply dithering" This reverts commit 5b9dc7ad6eb2f16c4ca8824c2a19c85bbe1f126b. commit ec548d20239a49f8e9eb0399317d4c68df24f4a3 Author: Stuart Bennett Date: Sat Jan 26 01:36:41 2008 +0000 Detect mobile BMP biosen I'd really love to know how where this info is in BIT commit 9f932eb684814e2a04c83d5aee172b9e020d82a3 Author: Maarten Maathuis Date: Fri Jan 25 23:31:58 2008 +0100 NV30EXA: Fix viewport setup + switch to triangle based composite. commit afca5f2665a62ef2d025c15f07fe1cdc2b40d8d5 Author: Stuart Bennett Date: Fri Jan 25 01:18:50 2008 +0000 randr12: fix / annotate a couple of ddc thinkos catch a longstanding source of error too commit 3e6ea79c3292c3ed5bd676653c4c40532772ae5f Author: Stuart Bennett Date: Fri Jan 25 00:33:07 2008 +0000 Implement opcodes 0x66, 0x67, and 0x68 Courtesy jwstolk's trace Names taken from nv11 biosmod scps commit cdae2e26cc432ba572f92522f1b3454264d38f43 Author: Maarten Maathuis Date: Fri Jan 25 00:10:08 2008 +0100 randr12: Rework native modes for TMDS. - Choose a preferred ddc mode when available, otherwise the one with the highest refresh. - Fall back on cvt modes, only when needed. commit 46636052498d1e33985e3d98a6ce9462639bd4ff Author: Stuart Bennett Date: Wed Jan 23 23:02:46 2008 +0000 oops commit e067a0eee42324ec7c01e4d84a33554054817dd9 Author: Stephane Marchesin Date: Wed Jan 23 23:40:51 2008 +0100 Use proper version. commit 324c19acf6b506aae47e3699dd0fcefb72473590 Author: Stuart Bennett Date: Wed Jan 23 01:13:58 2008 +0000 Fix C51 refclk commit 178b8bbf0e09c190fef8b2f85acddd3172ace629 Author: Stuart Bennett Date: Wed Jan 23 20:59:50 2008 +0000 randr12: calculate (and set, for nv40) sel_clk before calculating plls commit 8067bd08d9a928c97b83f2b6ebff996b320c5813 Author: Maarten Maathuis Date: Wed Jan 23 19:43:42 2008 +0100 Fix big bug in commit "Mostly log message changes". - Please don't hide such important changes in a commit like that ;-) commit c5329a42c509efe9336573ff7e32978082ba9355 Author: Stuart Bennett Date: Wed Jan 23 16:37:31 2008 +0000 Redo sel_clk setting and update its documentation My apologies if this breaks stuff. commit f07ab92e7bb419df5473e1ed843a79ef4ff08f30 Author: Stuart Bennett Date: Wed Jan 23 02:09:56 2008 +0000 Fail on LVDS DCB entry parsing issues commit 12efa8cdfe68c312458368ab876030b02919a922 Author: Stuart Bennett Date: Wed Jan 23 00:09:11 2008 +0000 Mostly log message changes commit 0faa15d9b84b2cad23424dfc1679f119c5b45108 Author: Ben Skeggs Date: Wed Jan 23 23:45:37 2008 +1100 not an appropriate place for this type of thing.. commit 9e982df106028edd0f7ce0feedbe8e082f29f2ac Author: Maarten Maathuis Date: Wed Jan 23 11:42:55 2008 +0100 randr12: Increase cvt mode to 72 Hz. - I've had occasions were i did slightly notice something at 60 Hz, and no problems at a higher setting. - I must admit i was a little bit tired at the time, but i figure it won't hurt (much). commit 71435dde5b2fd1c197ef5dc31b22ba40abcbca7e Author: Maarten Maathuis Date: Wed Jan 23 11:20:47 2008 +0100 NV40EXA: Use the same approach as the texture adapter for rendering. - Verified to work for abitrary rotation. - This should eliminate diagional tearing altogether. commit d9149bddc758cc0644630b26fe10fc563ba38ce9 Author: Maarten Maathuis Date: Wed Jan 23 10:28:25 2008 +0100 NV40TEX: Switch to a big triangle and clip it to a quad. - On some systems (NV43, NV46 are known) an artifact shows when 2 triangles are combines and the size is larger than roughly 512x512. - The trick is draw a single triangle and use scissors to turn it into a quad. - Someone once asked me if i ever made drawings, well i did in this case and i've included it for future reference. commit e578d6e0a8c0fb8877d8b4b6ba1046dccf28ee6d Author: Stuart Bennett Date: Tue Jan 22 18:33:42 2008 +0000 Fix LVDS with DCB 2.0 Also use the X_ERROR facility for errors, not ErrorF commit fd3195f503420591b522249bb423c817db0709e7 Author: Maarten Maathuis Date: Tue Jan 22 19:00:49 2008 +0100 Xv: Remove illegal usage of private exa symbols. commit 3a995b06ddb507655279565e992604bd40036b19 Author: Maarten Maathuis Date: Tue Jan 22 15:53:38 2008 +0100 NV40TEX: Use width, not (x2, y2). commit abaa8e822be49b9d2129d31c4996dfcf8034ea2a Author: Arthur Huillet Date: Tue Jan 22 11:42:19 2008 +0100 Xv: NV12 overlay copy - removed wrong byteswapping on PPC, reported by moondrake commit 782237e4e942f2e8a9ed3dd111d60c665459963c Author: Stuart Bennett Date: Mon Jan 21 23:44:47 2008 +0000 randr12: some tidyup commit 91ca67056cb236e5770d4fb39dd7fbb9818ff093 Author: Stuart Bennett Date: Mon Jan 21 22:35:58 2008 +0000 randr12: more beautiful dithering commit 1d5dc47324ddd1939db166af60df7a3a0e055810 Author: Stephane Marchesin Date: Mon Jan 21 22:19:24 2008 +0100 oops :) commit 7080f93a83e0d680f53a7962df300d527edd121a Author: Stephane Marchesin Date: Mon Jan 21 21:43:11 2008 +0100 Quickly hacked support for NV6x. commit 2d399af61424cc4b4e0080ea016423f1b22c02f3 Author: Stuart Bennett Date: Mon Jan 21 20:16:56 2008 +0000 randr12: fix dual head restore commit 8be20d6fc21a3869786e8c19656bf8b6569fee6e Author: Stuart Bennett Date: Mon Jan 21 18:51:52 2008 +0000 randr12: save and restore palette commit d32f310afa05ad85d6675348400880506d98ac1e Author: Stuart Bennett Date: Mon Jan 21 15:03:59 2008 +0000 Make LVDS bios script logs easier to understand and fix a backwards comparison commit 7c7f0194678c7bd7c5ce791c07b38ac8eeeef608 Author: Stuart Bennett Date: Mon Jan 21 14:14:07 2008 +0000 randr12: avoid SIGFPE commit b9a3aab7a7f6c5c4a5c440e46bbca7d76fd8df68 Author: Stuart Bennett Date: Mon Jan 21 14:09:46 2008 +0000 debug_modes breaks build on old xservers commit d2e078b4ebf11b286e152e0ea10b17c41bf61b67 Author: Stuart Bennett Date: Mon Jan 21 14:06:42 2008 +0000 randr12: use correct clock for LVDS modesetting part 2 commit 52154e97b5a40b014fbee747fc542f765b4390bc Author: Stuart Bennett Date: Mon Jan 21 13:46:15 2008 +0000 randr12: use correct clock for LVDS modesetting commit d54a9f4b76f3a8c29c5fce6dfe7cc3fbc20f3952 Author: Stuart Bennett Date: Mon Jan 21 12:27:36 2008 +0000 Don't log strange characters commit 07e01061e9b90348ea38b8889ff9e8daf207b820 Author: Stuart Bennett Date: Sun Jan 20 21:53:30 2008 +0000 Use more imaginative log levels than X_INFO commit 18017632cbc96f36bbc72b454bd5b48070985a6f Author: Stuart Bennett Date: Sun Jan 20 20:17:28 2008 +0000 Use stdbool.h types in nv_bios.c It makes vim highlighting work better and reduces shift key wear. Coincidentally it's what the drm uses too. bool, true and false are defined in IEEE 1003.1 (2003) and POSIX since C99 (as is stdint.h, which we use already) commit e1714a4f4329728cf897f8953acc480b47a4e5d7 Author: root Date: Sun Jan 20 18:38:11 2008 +0000 randr12: fix early cards commit 271844d3a761af65c9625d1564e1c08a9f64d159 Author: Maarten Maathuis Date: Sun Jan 20 19:06:49 2008 +0100 NV40TEX: Don't sync when compositing, will have bad sideeffects if the compositing manager tries it too. commit c338a14ea688953b03f274d0e436b579d0411f18 Author: Maarten Maathuis Date: Sun Jan 20 17:28:13 2008 +0100 Some misc cleanup. commit 2cd6e157cebac663f1b3c88e3653a4c2c9971ff1 Author: Maarten Maathuis Date: Sun Jan 20 17:11:27 2008 +0100 randr12: Fix a major screwup i made during a cleanup. commit c3127a0c9cf4599c40b27e24a411a7fe4969152a Author: Maarten Maathuis Date: Sun Jan 20 17:00:58 2008 +0100 NV40TEX: Implement sync to vblank. - I don't know why this didn't work the first time i tried, maybe i missed it due to another bug (that also caused tearing). - This should also work reasonably well for composited situations, but ofcource we can't guarantee that. commit 512f4ba33528dafb505bc2db5f9bb4d1b92c3a7b Author: Stuart Bennett Date: Sun Jan 20 14:47:52 2008 +0000 randr12: init some more Xv state commit 3f6a681a38fccbd53dd10aa42cc8d1b9bfe0eb71 Author: Stuart Bennett Date: Sat Jan 19 14:02:43 2008 +0000 minor debug correction commit efd3cd086036cd5f8817aee771ee630066a92830 Author: Stuart Bennett Date: Sun Jan 20 01:56:00 2008 +0000 INIT_8E opcode again, from pq's trace commit f0bb436796a2d4dc693ec92b73c7abb27d428cda Author: Stuart Bennett Date: Sat Jan 19 01:37:34 2008 +0000 INIT_IO opcode Based on pq's g8x trace commit c1b69fdaa089898821338b14c1f72eda354c2caa Author: Maarten Maathuis Date: Sat Jan 19 19:24:04 2008 +0100 randr12: hide cursor before locking + misc cleanup. commit dfa8901e847e1fbcbcb6de0c0726f53531b15b34 Author: Maarten Maathuis Date: Sat Jan 19 16:39:26 2008 +0100 randr12: Remove unneeded vgahw stuff. commit 47452756724007318eb384912c40302b15523998 Author: Maarten Maathuis Date: Sat Jan 19 16:29:57 2008 +0100 randr12: Move away from some of the nv_hw wrappers. commit 9e3a2d7c8c36d4dc43396be6b742b6137dfef455 Author: Maarten Maathuis Date: Sat Jan 19 15:59:48 2008 +0100 randr12: Remove usage of nvRead/WriteVGA0/1. commit 936e9fe8adb2660cf75959265971c60f378cd7d6 Author: Maarten Maathuis Date: Sat Jan 19 11:28:41 2008 +0100 randr12: Some cleanup. - framebuffer consoles can use most of the normal stuff, so change it back. - some cursor deobfuscation commit a9bae6ba734882308ac29a9fe2403eaa027bd518 Author: Stuart Bennett Date: Fri Jan 18 20:49:58 2008 +0000 More detailed modesetting debug (both randr12 and oldstyle) commit a28216639c3cf01d8f7cc85030d69fd58be86ed9 Author: Stuart Bennett Date: Fri Jan 18 18:10:40 2008 +0000 Remove no longer needed panel quirk commit 59fec415ef32c291363408d5c8a24a2041450434 Author: Stuart Bennett Date: Fri Jan 18 17:02:32 2008 +0000 Use bios PLL functions on nv4x And a minor completeness correction commit 7efaf3d97a51d2447310954c9224fd7ec888caf9 Author: Maarten Maathuis Date: Fri Jan 18 23:45:51 2008 +0100 randr12: Refine CR4B, anyone know what this does? - There is more to this register. commit 41646042ab9d9d0c3bc8a76b25a4bff45f039922 Author: Stuart Bennett Date: Fri Jan 18 16:50:50 2008 +0000 Rerefactor getting pll limits for nv4x commit 174d8f7e015250af4c0b27e044f5088f5465d851 Author: Stuart Bennett Date: Fri Jan 18 14:24:48 2008 +0000 Use pll limits infrastructure on single stage plls And add default PLL limits on old cards commit b3ca42d8589bed843ce5e772a1807c4c95377b92 Author: Stuart Bennett Date: Fri Jan 18 01:47:05 2008 +0000 Don't speculate on the unknown limit field, and call the others log2p, not p commit d9db305e2d4bfb017a8542a7407ad4df27c86121 Author: Stuart Bennett Date: Fri Jan 18 01:18:42 2008 +0000 Better setPLL_single commit 2a94184112cf06225672ef34836e19723761140a Author: Stuart Bennett Date: Fri Jan 18 14:33:01 2008 +0000 Bios parsing safety checks commit 6251f2fa774b913f5622ff9d07f56b2a5b9d1888 Author: Maarten Maathuis Date: Fri Jan 18 12:17:50 2008 +0100 Some misc fixes. commit b21789f93c7e7df9db320dea093deab0f1056955 Author: Maarten Maathuis Date: Fri Jan 18 09:23:39 2008 +0100 randr12: Actually using SavedReg does tend to help ;-) commit f15ea75b88b68fadb64fdeef75a23329e2a3f903 Author: Maarten Maathuis Date: Fri Jan 18 09:13:24 2008 +0100 randr12: Fix a huge gaping hole in NewRestore. - Restore CR5758 in a better place and actually restore something proper (use SavedReg instead of ModeReg). - Minor other fix. commit cd427da27d69db000f07ec50d27ca56ded97994e Author: Stuart Bennett Date: Thu Jan 17 23:37:23 2008 +0000 Invent a DVI-A output for the DVI-D output, on DCB1.4/1.5 commit fbcb57827a1c4ac4b3c7ce66ca935f6b095f020d Author: Stuart Bennett Date: Thu Jan 17 22:49:37 2008 +0000 And another DCB 1.4 entry commit a355e5b0dcd5f5c78da20bd07f581b5841b3a2ba Author: Maarten Maathuis Date: Thu Jan 17 22:25:12 2008 +0100 randr12: Forgot to clear a few state variables on restore. commit ba0d0e8571b657b5196d0508347f7641cd7f04cb Author: Stuart Bennett Date: Thu Jan 17 20:48:16 2008 +0000 Add me commit 9cfc736ea4b089c74daaf1b0fac6393fec459bc0 Author: Stuart Bennett Date: Thu Jan 17 20:29:30 2008 +0000 That warning wasn't there a moment ago commit 7eded6883404ce0cff83051497518a99c1d8a832 Author: Stuart Bennett Date: Thu Jan 17 17:07:24 2008 +0000 Fix for situations with fixed second stage gain and hook code in to init scripts And make sure bad PLL values are easily seen commit 075a14ac2525b364edc583caac50e03d171f67a7 Author: Stuart Bennett Date: Thu Jan 17 19:59:55 2008 +0000 PLL limits reg off-by-four is dealt with elsewhere Also some more imaginative pll limit member naming and minor get_pll_limits debugging corrections commit a3ef2cb34ad9de4567d30625a3bf87720a5ed8da Author: Stuart Bennett Date: Thu Jan 17 17:30:19 2008 +0000 setPLL for nv40 lowreg PLLs commit c3bef786b5291a638791b8a5125b3ff60cf9d1b1 Author: Stuart Bennett Date: Thu Jan 17 17:30:36 2008 +0000 setPLL for nv40 highreg PLLs commit 996b93cdc73e3d6e581a766cbbf4a29bb34b8eb2 Author: Maarten Maathuis Date: Thu Jan 17 18:27:51 2008 +0100 randr12: Some misc fixes. commit aa561c487754210ca22a1fc1d17c54d8e199e7a1 Author: Maarten Maathuis Date: Wed Jan 16 22:42:18 2008 +0100 Some misc fixes, mostly related to setting the right crtc for overlay (randr12). commit 276d4e35673bb71410c882badf03550bcee48571 Author: Maarten Maathuis Date: Wed Jan 16 08:03:51 2008 +0100 randr12: Fix mode privates again, hopefully ;-) commit f89243e4c2ba33a822b15de9136736f44b4c1579 Author: Stuart Bennett Date: Wed Jan 16 00:25:08 2008 +0000 Minor reg adjustment commit df0f66750d1d893b2d91b0cfc91ecd4f0a1ba80e Author: Stuart Bennett Date: Tue Jan 15 16:30:00 2008 +0000 Refactor pll table parsing And correct table reg matching on version 0x21 tables, which is off-by-4 commit 3171b470f00a11d3528067c7d91e751257aa603c Author: Stuart Bennett Date: Tue Jan 15 14:59:49 2008 +0000 Use pll_lims in getMNP_double Also move quirks elsewhere, and optimize commit 7bc921485c63232fecb59e488ef203166c48c6e1 Author: Stuart Bennett Date: Tue Jan 15 15:14:46 2008 +0000 Store PLL limit frequencies in kHz, since that's what we use them in commit 51a739771b59a4725e75660b2c8edb54aa763ba5 Author: Stuart Bennett Date: Tue Jan 15 01:32:25 2008 +0000 Two stage PLL limits parsing corrections And some corrections to getMNP_double commit 7013116596ce8b065df265f16b3fdb9ac9e3df37 Author: Stuart Bennett Date: Tue Jan 15 09:53:58 2008 +0000 randr12: Oh no! More pNv->twoHeads commit c7081039bf27aad12e17063d1a9becf160e7ee49 Author: Maarten Maathuis Date: Tue Jan 15 21:05:08 2008 +0100 randr12: PrivFlags are not so private, switch to a real mode Private. - This hopefully fixes the obscure issues people have had these last few days. commit cd14cd8c520361a15f5f8d255171c85810d83033 Author: Stephane Marchesin Date: Tue Jan 15 20:44:48 2008 +0100 Order the reg ranges, add some. commit 17fa42166fb4e8102cbe880be6021f1145268d16 Author: Patrice Mandin Date: Tue Jan 15 18:45:30 2008 +0100 nv30: set VIEWPORT_TX_ORIGIN to 0 for all cards, except real nv30 commit 777a3df246feb364d440282db0864fb9b0908872 Author: Maarten Maathuis Date: Tue Jan 15 17:52:19 2008 +0100 NV30EXA: Chipset should be masked by 0xFFF0, switch to NVArch while i'm at it. commit b55608bac3f4f909f1ef8380a1ac69ca2f262ea2 Author: Maarten Maathuis Date: Tue Jan 15 08:10:46 2008 +0100 randr12: Reenable cvtmode. commit 0db297bb6199878c0f77935acc447c568a87c900 Author: Maarten Maathuis Date: Mon Jan 14 22:54:42 2008 +0100 randr12: Undo some changes of the past + always set vpll on modeset. commit 2879f4518e6830cf0b490cde5b4daca3e931383d Author: Patrice Mandin Date: Mon Jan 14 23:26:14 2008 +0100 nv30: Only change VIEWPOR_TX_ORIGIN on real nv30 commit 405fd62ee8b56e3b1d6cc78df7ecfa654cd54dec Author: Maarten Maathuis Date: Mon Jan 14 20:17:05 2008 +0100 randr12: "NewRestore" Always reset some state regs after restore. commit 8093b83c3d1393ba225f9def1ce055b04cba5a8f Author: Maarten Maathuis Date: Mon Jan 14 19:29:28 2008 +0100 randr12: "NewRestore" proper depth vs bpp awareness. commit 8733ea89d9acece8721a2ae2d62a68916746c374 Author: Stuart Bennett Date: Mon Jan 14 18:21:47 2008 +0000 randr12: yet more pre nv10 fixes commit c0d1117782673771b0490fe4d19abd83c6620033 Author: Stuart Bennett Date: Mon Jan 14 11:54:28 2008 +0000 Possible fix for C51's misaligned regs commit 6ac824446d65a28519f378b3c01b1a6683a14d1b Author: Stuart Bennett Date: Sun Jan 13 21:36:53 2008 +0000 randr12: better load detection (enabled) commit ef28e91b24ee34911b3238e681064a95be7afd3a Author: Maarten Maathuis Date: Mon Jan 14 00:48:25 2008 +0100 randr12: We didn't copy the Flags to the adjusted mode, very bad. commit d41d5ae34a7d7f4658a1d86635fb8c59b80a1355 Author: Stuart Bennett Date: Sun Jan 13 21:35:33 2008 +0000 Be more flexible on init table length commit 4744e5410c27d8bd3c2f92bee4554801639dba29 Author: Stuart Bennett Date: Sun Jan 13 19:37:28 2008 +0000 More DCB 1.4/1.5 support commit c043b3fa7cf6297e010dfa6fcff24f263b8a8fd8 Author: Maarten Maathuis Date: Sun Jan 13 17:09:04 2008 +0100 randr12: Minor fix. commit 3f7f0cab91416f6f4f4378ee6bdabeb9e75cf230 Author: Maarten Maathuis Date: Sun Jan 13 16:05:22 2008 +0100 randr12: Some "NewRestore" fixes for framebuffer modes. - This is mostly it for framebuffer modes. commit d8e7c5068835004741b74577344bd4defad4d139 Author: Maarten Maathuis Date: Sun Jan 13 15:05:15 2008 +0100 nvbios: Fix a bmp bug for malc0. commit 5c01f96caa2b3b7223383f37d6903fbcaf3643cd Author: Maarten Maathuis Date: Sun Jan 13 14:12:00 2008 +0100 randr12: Some "NewRestore" fixes. - Improvements to restoring framebuffer modes, still a few minor bugs to fix. - VGA modes work partially, i doubt this will make mainline though, since it's fragile. - This is a work in progress, only for testing. - Added some other functions to NOUVEAU_MODESET_TRACE. commit 364497a4234410adea25e4e51e0bdb17ccd3ba4a Author: Stuart Bennett Date: Sat Jan 12 00:39:59 2008 +0000 randr12: more fixes aimed at nv0x commit ac546e77fe71ffbbc76d9c48c5ab0b6faac832d7 Author: Stuart Bennett Date: Fri Jan 11 22:05:11 2008 +0000 Remove some nv_bios TODOs and shut up some warnings commit fc04d71de6ec36158040617fb973218a8bdd0903 Author: Maarten Maathuis Date: Fri Jan 11 23:23:43 2008 +0100 randr12: Add new experimental restore mode. - Option "NewRestore" - Only tested on my 16bpp 1280x1024 vesafb console. - It may work on text consoles. - This should eventually replace the somewhat frail restore system that we currently have. commit 361bbe074a0d674012615b05fd3da81e8e1ce34e Author: Maarten Maathuis Date: Fri Jan 11 22:30:14 2008 +0100 randr12: Intermediate commit. commit 3b6e551e1afefe86338ab830505dc08412b2e80b Author: Maarten Maathuis Date: Fri Jan 11 18:59:53 2008 +0100 randr12: Intermediate commit. commit 5a989b23322e6ba1abe6456246300067c3bf42cb Author: Stuart Bennett Date: Fri Jan 11 21:33:47 2008 +0000 Tidy up and correct DCB merging commit ec7889a5a0787929c8c8ae08aaf729929c483035 Author: Stuart Bennett Date: Thu Jan 10 23:44:59 2008 +0000 Fix bios opcode 0x56 and add reg alignment check commit 9b356d08f9169e35bdbff079c3351c475e53ec9b Author: Stuart Bennett Date: Fri Jan 11 16:34:28 2008 +0000 randr12: undo overzealous code disablement commit 44295b59f57be8956a5226415b5fdfbf49e175c1 Author: Stuart Bennett Date: Fri Jan 11 12:28:16 2008 +0000 randr12: twoHeads and other fixes for pre nv10 (nv_crtc.c) commit 80fa1e1aef1b093b0310c51817ee9685e4d9d251 Author: Stuart Bennett Date: Fri Jan 11 11:16:21 2008 +0000 randr12: some tidyup to output save/restore functions, and some twoHeads fixes commit 04f64725b5784ecfd7a5c3218d4710c2ad0f7f0f Author: Stuart Bennett Date: Fri Jan 11 11:20:45 2008 +0000 randr12: tidy up dpms functions also, don't set cr57/58 in output_prepare as the dpms funcs do it, and it shouldn't be done on early cards anyway commit cc6794abb637e5ac8c98d7c6385bd36aa43d1ebc Author: Stuart Bennett Date: Thu Jan 10 20:25:50 2008 +0000 randr12: use clocks in kHz throughout commit 8337b77b40da9c3bba106837b4553433fa4e8a76 Author: Stuart Bennett Date: Thu Jan 10 19:09:16 2008 +0000 The bios transition freq is in 10s kHz - so x10 commit d65f59144f8a79116bca2f09de41d5786a7a4f84 Author: Maarten Maathuis Date: Thu Jan 10 18:50:47 2008 +0100 randr12: Some minor things for supporting vga modes (in the future). commit 0e646b0332b52e23ef13301765f7f1e8f881e165 Author: Maarten Maathuis Date: Thu Jan 10 17:41:39 2008 +0100 randr12: Intermediate commit. commit a5122460cfa07d45cf91ae112db9170fecee6966 Author: Stuart Bennett Date: Thu Jan 10 16:21:49 2008 +0000 Remove weirdo special case handling on bios reg writes I don't think these ever get used, and the code only seems to be on gf6 anyway commit 31b1a894079ca3983d17ac7a81d6ecd420f7d377 Author: Stuart Bennett Date: Thu Jan 10 14:14:24 2008 +0000 randr12: dtrt wrt dual link on lvds when !straps commit e02d2cc8b77443fde4e267ce4d9691ed680eef01 Author: Stuart Bennett Date: Thu Jan 10 12:03:43 2008 +0000 randr12: improve setting of fp_control commit d8eb924a43576c0e360965a43f5363d0ba2aecd0 Author: Arthur Huillet Date: Thu Jan 10 12:03:30 2008 +0100 Xv: cleanup. commit 1f727083cfafa9097ed98266420a2fd16905ae10 Author: Stuart Bennett Date: Thu Jan 10 00:12:52 2008 +0000 randr12: enable LVDS and refactor output creation Heavily based on initial patch by seventhguardian commit c08c6de0f452c7f5cd1bac8bf974aaac872c8e2c Author: Stuart Bennett Date: Wed Jan 9 16:18:30 2008 +0000 deifdefication - we requre xserver 1.3, so randr 1.2 is guaranteed commit 1556144a1af3c89eaa14cbfe8bdc9dc966fef8be Author: Stuart Bennett Date: Wed Jan 9 15:47:50 2008 +0000 randr12: optimize away excessive LVDS_RESETing commit 55e6750038edd7010ae8304fe3c3b4ac9e7b963c Author: Maarten Maathuis Date: Wed Jan 9 22:08:49 2008 +0100 randr12: Fix minor bug, related to output resource conflicts. commit c1fe3766bd181d9ed273850e6c0d1939c0efc8aa Author: Maarten Maathuis Date: Wed Jan 9 20:20:03 2008 +0100 randr12: Reset crtc when changing output routes. commit 01b9a081c288c69fa0bbc0d3829a0026796e731a Author: Maarten Maathuis Date: Wed Jan 9 19:30:17 2008 +0100 randr12: Don't change vpll's twice on restore. commit 3643b2635dcaba3e6ec969a3cd6eda43623c8992 Author: Stuart Bennett Date: Wed Jan 9 15:12:30 2008 +0000 Detect an LVDS panel if there's a hardcoded EDID commit 64d8032c419ef8cf14cdf3f83228d3e0f5714909 Author: Stuart Bennett Date: Wed Jan 9 15:11:24 2008 +0000 If no PROM, and no PRAMIN, use the PCI rom image commit 99a64d31979a8c83ac9d52fabe3114c576c94bba Author: Stuart Bennett Date: Tue Jan 8 22:58:37 2008 +0000 fp bios edid oops commit commit b470cf257433dad174d62cdbd4331ada2809334e Author: Maarten Maathuis Date: Tue Jan 8 23:54:51 2008 +0100 randr12: More fixes for strange output routes. commit cfbdbd6ac846af79d9ddf2b4597736cba74d5916 Author: Stuart Bennett Date: Tue Jan 8 20:57:10 2008 +0000 randr12: try to use bios fp edid, if nothing else works commit d4e4892244c90b481bfd8c6d28d2390fe696e160 Author: Stuart Bennett Date: Tue Jan 8 20:07:10 2008 +0000 Read EDID from BIOS if appropriate commit 6fab536aa13b8639d9b419a37fccfb30a4313b77 Author: Stuart Bennett Date: Tue Jan 8 16:18:09 2008 +0000 Darktama's C51 is a mobile card commit 921f2e226ccbe7468cc8e51919872c3e8cf28c4e Author: Stuart Bennett Date: Tue Jan 8 15:37:51 2008 +0000 BIT cards use the init scripts to do the power sequencing commit 33ea2cdef8c46ee9837b6fc9809df82d4bdca339 Author: Maarten Maathuis Date: Tue Jan 8 22:36:12 2008 +0100 randr12: Small fix for NV3x, more will be needed. commit 175b91d48644bdbfc4e48f4c2fe6c9cf936802b5 Author: Maarten Maathuis Date: Tue Jan 8 20:23:38 2008 +0100 randr12: Fix reverse pll reading code for NV30. commit 4add8cfb68404e9e2764451c4e48ab4d0cf04482 Author: Maarten Maathuis Date: Tue Jan 8 19:07:50 2008 +0100 randr12: Some minor things for NV30. commit 74b03f7d4f5506222b6a95ccf8b5c9e0ff69e4dc Author: Stuart Bennett Date: Tue Jan 8 13:52:00 2008 +0000 Assorted small bios/randr12 bits and pieces Make bios execution a bit faster Better self documenting code for DCB dual link criterion Tidy up some ineffectual LVDS mode code commit 76f3c47736661df86490b0d133ac82c371cab73d Author: Maarten Maathuis Date: Mon Jan 7 23:38:08 2008 +0100 randr12: Handle NV30 vpll's correctly. - This only concerns the real NV30, not the other NV3x cards. commit 1a25def0a64ac6437c6ba5f51ddb8743d4a88d00 Author: Maarten Maathuis Date: Mon Jan 7 19:06:16 2008 +0100 randr12: Clear dpms cache when needed. commit 3f0008128e2afd2b1a1b595829c6324e46a4bf1d Author: Arthur Huillet Date: Mon Jan 7 19:03:53 2008 +0100 Xv: overlay BW workaround applied to NV40 as well commit d5dabd8c316371605d81be55a5c6c82e6351b591 Author: Arthur Huillet Date: Mon Jan 7 19:01:07 2008 +0100 Xv: removed useless #includes commit 510f3575df87733857dbb5bfe398ce04aebadfd4 Author: Arthur Huillet Date: Mon Jan 7 17:13:43 2008 +0100 Xv: added NV04 overlay brightness attribute. Original patch by Andrew Randrianasulu commit a71de657e1e2718800ef1c319dab5dafcc9ea0cd Author: Ben Skeggs Date: Tue Jan 8 02:18:59 2008 +1100 avoid symbol clash with 3d driver. commit 0463dc0682fb192ce82037601289f75913f65e3c Author: Ben Skeggs Date: Tue Jan 8 02:16:26 2008 +1100 nv50: support hostdata UTS commit 9fb186c57bdad07281f1a0bdebac98a4b18dc6e3 Author: Ben Skeggs Date: Mon Jan 7 18:33:03 2008 +1100 nv50: small fix commit b679d6a8539403f075a57d882bb4d0eb33b180d9 Author: Stephane Marchesin Date: Mon Jan 7 02:39:19 2008 +0100 nv40 video texture: sometimes less is more. commit b9a364a985bb23ee30dc094ba13e19ea2f4f6bdf Author: Maarten Maathuis Date: Sun Jan 6 20:44:56 2008 +0100 NV40EXA: Remove stair shaped tearing i get. commit 80ac301acaf8dba6a93f5b04b97f8dca2748b92c Author: Pierre Ossman Date: Sun Jan 6 20:04:10 2008 +0100 We do not get a valid CRTC configuration structure if we're not using RandR 1.2, so make sure we can handle the old mode with some form of grace. Signed-off-by: Pierre Ossman commit f1aaf3fe616f5a0633e685867cf33b37f2c3f07b Author: Stephane Marchesin Date: Sun Jan 6 19:14:03 2008 +0100 nv40 video texture: bilinear filtering for UV. commit 57fc0631428f29af0d24036c939826349e3018b5 Author: Arthur Huillet Date: Sun Jan 6 17:41:50 2008 +0100 Xv: overlay auto CRTC switch with randr12, blitter fallback Now switching the overlay to the right CRTC when displaying video with the overlay and dual head, with a nice fallback to the blitter when the window is on both CRTCs. Fixed a bug preventing the overlay from working on CRTC1. commit b6ba53ee1cbda5cb91e43ae6b84e1737ebc367f4 Author: Jeremy Kolb Date: Sun Jan 6 12:58:45 2008 -0500 port "G80: Reduce load detection false positives." from xf86-video-nv commit d483ecd851bb84014f1fa86f0ada4540b3ad801e commit b4fa9b060308090f4bab3f8716f7e2ecaf234be7 Author: Jeremy Kolb Date: Sun Jan 6 12:51:55 2008 -0500 Return NULL not FALSE. commit 47dde8283bcc409037682098cad8f0a0c3f9e3b2 Author: Pierre Ossman Date: Sun Jan 6 17:48:48 2008 +0100 Xv: don't wait for vblank on CRTC0 _and_ CRTC1 commit c8a9b4d0c2145d13c74a00cb24e1310e247a2718 Author: Pierre Ossman Date: Sun Jan 6 17:45:37 2008 +0100 wait for correct crtc vsync Make sure we wait for the CRTC that will actually display the video frame we're blitting. commit 25fac91dfc7072405243d2891f9ec1f0cef49a3d Author: Stephane Marchesin Date: Sun Jan 6 16:20:43 2008 +0100 Switch to latest nouveau_class.h commit bc82548514daab356fe0e0ee942ff75018fbc383 Author: Stephane Marchesin Date: Sun Jan 6 16:19:50 2008 +0100 Use clamp to edge to avoid the thin black lines. commit acaf2501d17030097761b3f8d369f14874261f6d Author: Maarten Maathuis Date: Sun Jan 6 13:17:49 2008 +0100 randr12: Some fixes for NV31M. commit 7b1521c263511016538286806f54221721c60608 Author: Maarten Maathuis Date: Sat Jan 5 19:43:08 2008 +0100 randr12: NV11 and NV20 stop at CR52. commit 9441ca0fd579cb648577f107777236d22a2b1ead Author: Maarten Maathuis Date: Sat Jan 5 19:32:32 2008 +0100 randr12: NV11 and NV20 don't have CR57 and CR58. commit 8f520754459c363313353605207f7598e259ea77 Author: Maarten Maathuis Date: Sat Jan 5 18:54:14 2008 +0100 Add a missing function to NOUVEAU_MODESET_TRACE. commit d5bf6a0149dc80d5d76ab8857415d20b42188656 Author: Stuart Bennett Date: Sat Jan 5 17:22:33 2008 +0000 randr12: fix PLL breaking typo commit 21f02f5f248bce5f49e0fcee5594c83155b532b5 Author: Stuart Bennett Date: Sat Jan 5 03:10:21 2008 +0000 Need to restore EXTDEV before fp table parsing and a nice hwsq message commit 4e4819f6722a120d3a22eb9829fe73780a0c1087 Author: Maarten Maathuis Date: Sat Jan 5 18:30:08 2008 +0100 randr12: Minor cleanup. commit 758e1cf14d61725d69ca75b7268f22e11a32a5ba Author: Maarten Maathuis Date: Sat Jan 5 18:27:10 2008 +0100 randr12: Fix a thinko, generate data before restoring, not at the beginning. commit f315ce85fa33894767892772c1e7a0966150ba6b Author: Maarten Maathuis Date: Sat Jan 5 14:05:55 2008 +0100 randr12: Some NV40 quirks. commit 08b1a2622708be9f714c27fd31372e28277d7c5b Author: Maarten Maathuis Date: Sat Jan 5 13:03:40 2008 +0100 randr12: Small quirk for NV11. commit 73101dbcfac68688914e2a3f46008ddd69d0dc62 Author: Stuart Bennett Date: Sat Jan 5 02:46:52 2008 +0000 Load NV17 power sequencing microcode commit 2ec6cf4a6e59b861c1672471872fc4ca75cfce27 Author: Maarten Maathuis Date: Sat Jan 5 01:22:42 2008 +0100 randr12: Cache dpms calls to avoid unnecesary blinking and such. commit 4f586ac169e7acd0e0bfa4139bd74e718d7598e2 Author: Arthur Huillet Date: Sat Jan 5 01:38:52 2008 +0200 Xv: linearly interpolate U and V samples when converting from YV12 to YUY2 Original patch by ahuillet, pq did one last fix. commit 5f1a721070c20a4287d17a8797ef1aabe19a579e Author: Stuart Bennett Date: Fri Jan 4 17:59:54 2008 +0000 More DCB 1.4/1.5 fixes commit 95485646eb61aaa84a8d3b6550552ab417be8e16 Author: Maarten Maathuis Date: Fri Jan 4 18:33:31 2008 +0100 randr12: Forgot to switch to vpll1_a, etc in one place. commit c43bb4990f44d50d91785f8c9860e27c3357c0a3 Author: Stuart Bennett Date: Fri Jan 4 01:14:40 2008 +0000 randr12: fix BIT bios LVDS dpms commit 5d9e42bbb5878f52cf7fd6d96532253d868b2a27 Author: Stuart Bennett Date: Fri Jan 4 13:26:38 2008 +0000 Better guesses at DCB 1.4/1.5 commit 73da4362cd7e2918bd066528a9feb157019edb5e Author: Maarten Maathuis Date: Fri Jan 4 11:54:27 2008 +0100 randr12: Remove unnecesary usleep. - I once did this thinking it may solve a bug, but it turned out a palette issue. commit c35f532fdee6141e871560f8a400040c2eb82891 Author: Maarten Maathuis Date: Fri Jan 4 11:43:16 2008 +0100 NV40: Improve VCO2 detection in nvGetClocks() commit 9369c03788d7410150044d2e3a83f0bcb876af42 Author: Maarten Maathuis Date: Fri Jan 4 11:39:37 2008 +0100 randr12: Improve speed of mode switches. - Moved pre-NV40 to vpll1_a, vpll1_b, etc variables. - Only change vpll when needed. commit ec0fe5294fdee7a79e9bfaf21ea42cfd3f52ec75 Author: Stuart Bennett Date: Fri Jan 4 02:31:21 2008 +0000 Infra for regs stored over suspend and a sort-of implementation of INIT_COMPUTE_MEM commit 786e133577edcf91b519dd8dede24250ec6fdcdf Author: Stuart Bennett Date: Thu Jan 3 02:21:35 2008 +0000 Better bios register read function prototype and a ReadEXTDEV purge commit 951f95ba553f301de2a540ef67cf04152cf72344 Author: Stuart Bennett Date: Thu Jan 3 00:52:12 2008 +0000 Refactor NVParseBios commit 8b82f24e8a526c0483120f9979a3b9370da3b297 Author: Stuart Bennett Date: Thu Jan 3 00:32:24 2008 +0000 Revert "randr12: LVDS screens use center mode." This reverts commit 1142b15c56a0b9dab8b929fc196a825815457374. They don't, necessarily commit 876d7b11c754dd66738bcc26a07e0d707b81a99f Author: Maarten Maathuis Date: Thu Jan 3 22:45:00 2008 +0100 NV40: Handle broken VCO2 values. commit 50eb355e44017a51636c1e7b8c140bc3b48813af Author: Maarten Maathuis Date: Thu Jan 3 22:36:04 2008 +0100 NV40: A better attempt at YUV->RGB conversion constants + remove vblank sync. - The vblank sync didn't work (made things worse actually), someone needs to reverse engineer the proper way for the 3d engine. commit 22cdfec9b0858c186ab37ff649248a2a825eb513 Author: Maarten Maathuis Date: Thu Jan 3 12:48:43 2008 +0100 NV40: Avoid a SIGFPE in nvGetClocks() when VCO2 is off. commit 5015e2cefcf2069ee0054c433c7ae1763d2f95eb Author: Maarten Maathuis Date: Thu Jan 3 12:37:10 2008 +0100 NV40: Actually add the attribute. commit 5b60344486c8ddeba28204dbea6f1e11704cf951 Author: Stephane Marchesin Date: Thu Jan 3 05:56:23 2008 +0100 Add a vsync attribute to nv40 textured video. It doesn't seem to work so well for me (6200), I suspect because my card is too slow anyway. Possible solutions include reducing the shader instruction # and forcing drawing from top to bottom. commit f7a356250a9a0cb214dbb1871696506c04fab946 Author: Maarten Maathuis Date: Wed Jan 2 12:15:21 2008 +0100 randr12: Hopefully these were all the function declerations that need updating. - Build didn't even show any errors, so that's why i missed them. commit aa608573918ed34968054fb5a93b11fc5c8aa1a8 Author: Maarten Maathuis Date: Wed Jan 2 00:19:12 2008 +0100 Dump some CARD8 and CARD32 in favour of uintX_t. commit b44af66323b622411d5ffa4a78a210abefdb1e2f Author: Maarten Maathuis Date: Tue Jan 1 22:38:34 2008 +0100 randr12: Small fix for NV4x cards with strange output routes. commit 6b204d5ef3ff61236ef86eadcc7e137a722aef72 Author: Maarten Maathuis Date: Tue Jan 1 21:51:31 2008 +0100 randr12: Improve output routing. commit 64546788e50ae3482698f9505869e06f727c0e50 Author: Maarten Maathuis Date: Tue Jan 1 21:07:36 2008 +0100 randr12: Really hopefully fix output resource conflict detection now. commit b71a52ae9689026e7d96d2c2752eec0c9854b0c3 Author: Maarten Maathuis Date: Tue Jan 1 20:38:24 2008 +0100 randr12: Hopefully fix output resource conflict detection. commit 9ac2765ff13f82746991c85649f45c13475e851d Author: Maarten Maathuis Date: Tue Jan 1 19:41:07 2008 +0100 Forgot the NOUVEAU_EXA_PIXMAPS case. commit 53565fc3e854abc0b5e7614da251024a60ddfd9e Author: Maarten Maathuis Date: Tue Jan 1 19:36:28 2008 +0100 Stricter alignment requirements for offscreenBase, to avoid framebuffer corruption. commit c9cedb7712719e3dee450245ebeb7db18cd40770 Author: Maarten Maathuis Date: Tue Jan 1 17:36:20 2008 +0100 randr12: Time to let some routing insanity die. - I hope nvidia is just crazy sometimes when setting CRTC1 on both output resources. - Or is it some override used on load detect? commit 9f1494ebf1ec1957f362366ab4abfc31c2227092 Author: Maarten Maathuis Date: Tue Jan 1 17:28:41 2008 +0100 randr12: Always set bit 26 in FP_DEBUG_0 if already present. commit a83c71244b8dceb2cac968195777636bd5c5f639 Author: Maarten Maathuis Date: Tue Jan 1 17:01:19 2008 +0100 randr12: Minor tweak to flatpanel regs. commit afe174cd57173c22011718d3290db5d939076ce6 Author: Maarten Maathuis Date: Tue Jan 1 14:25:54 2008 +0100 Remove AM_MAINTAINER_MODE from configure.ac commit ef1a613e0f1a1fffb54a50fd14c10069ed9eac4b Author: Maarten Maathuis Date: Mon Dec 31 20:24:41 2007 +0100 randr12: Fix a bug in an earlier commit. - This was local, but i wanted to keep some things seperate. commit 01313e3dca07615fa3b2a2b09f6d45489cc8d796 Author: Maarten Maathuis Date: Mon Dec 31 20:15:03 2007 +0100 randr12: Add a quirk for 1280x800 panel on 7300go. commit 78bf63088d5805762460801c59f0f93b43ec96a7 Author: Maarten Maathuis Date: Mon Dec 31 19:34:33 2007 +0100 randr12: Duplicate native modes, to avoid hitting an invalid pointer. commit 83aad1ad6e8a5e48ee91346b4c7037ddc8456a73 Author: Maarten Maathuis Date: Mon Dec 31 18:57:49 2007 +0100 randr12: Set the adjusted mode in output code. commit 23d9d05a68cf2eac51b500d48d31bae3b484bbe8 Author: Maarten Maathuis Date: Mon Dec 31 14:20:41 2007 +0100 randr12: Deal with output resources in a better way. commit a4d973214158efa90a1a23da879630d2b53ad313 Author: Maarten Maathuis Date: Mon Dec 31 13:18:16 2007 +0100 randr12: Disable crt load detect again, until i know how to use it properly. commit 59346e15688186b4c00ee5348413ae8312ac9a30 Author: Maarten Maathuis Date: Sun Dec 30 19:11:48 2007 +0100 Revert "randr12: Another quirk for the 7300GO cards." This reverts commit 2f2921e6c33a0482f1f30e4d69820dc82690310a. It was unneeded after all. commit 2f2921e6c33a0482f1f30e4d69820dc82690310a Author: Maarten Maathuis Date: Sun Dec 30 17:07:13 2007 +0100 randr12: Another quirk for the 7300GO cards. commit 642baacdab215f6ad7173757b8d7e00f716d6dbe Author: Maarten Maathuis Date: Sun Dec 30 16:44:23 2007 +0100 randr12: Fix quad view on some 7300GO cards. commit df36ea6d9cd2a22b51a0386bbfe4f6760ed98d97 Author: Maarten Maathuis Date: Sun Dec 30 15:01:47 2007 +0100 Add some headerfiles to Makefile.am commit 29851581b2420570efd4fca2d4f6a19113ea6947 Author: Maarten Maathuis Date: Sun Dec 30 13:35:47 2007 +0100 randr12: Only load palette's when appropriate. commit c3359789d8f288b403aedbcdfa8795391fc13deb Author: Maarten Maathuis Date: Sun Dec 30 13:26:24 2007 +0100 NV40: Some fixes and safeties. commit a7c922b58af72e3a48b92056c2fcd71c22477c2f Author: Maarten Maathuis Date: Sun Dec 30 11:36:10 2007 +0100 NV40: Fix some comments and a damage reporting bug. commit b6cd9964f9c20c40eda4283a93e447601beddb96 Author: Maarten Maathuis Date: Sun Dec 30 02:31:38 2007 +0100 NV40: Fix the texturing adapter when not rendering offscreen. - Now clip restrictions are taken into consideration. - No streching when clipping the border of a screen anymore. commit 4efdd1b560228aae7f6f5d6ed549461f8fdf0d00 Author: Maarten Maathuis Date: Sat Dec 29 22:34:32 2007 +0100 randr12: Minor cleanup. commit 5af6cd8dea2fa51b362201961191a17b0813fa30 Author: Maarten Maathuis Date: Sat Dec 29 21:46:18 2007 +0100 randr12: Micro cleanup. commit 4f91dd1ae08d348b2977b8ede0908ddd2add1cb4 Author: Maarten Maathuis Date: Sat Dec 29 20:15:25 2007 +0100 NVBIOS: Fix duallink detection. commit 559a640a542a89238afba02a78cf6399b8edc2fc Author: Maarten Maathuis Date: Sat Dec 29 19:34:12 2007 +0100 randr12: Do not remove bits in DITHER register. commit 4b980011742a6fa0bdeb312a7b367d6a56675fcb Author: Maarten Maathuis Date: Sat Dec 29 15:09:08 2007 +0100 NV40: Preliminary Xv Texture Adaptor. - Only supports YV12. - No attributes. - Only the Y component gets bilinear filtering. - You're welcome to improve it ;-) commit a4c045aa14b471fcfe29cdbec0cd846b2c5be2a6 Author: Peter Winters Date: Sat Dec 29 12:15:40 2007 +0100 Xv: nforce2 overlay can do yv12 commit 1142b15c56a0b9dab8b929fc196a825815457374 Author: Maarten Maathuis Date: Fri Dec 28 21:11:49 2007 +0100 randr12: LVDS screens use center mode. commit 8215e970445d99312c8fbbc31944466f70f3e186 Author: Andrew Randrianasulu Date: Fri Dec 28 20:59:17 2007 +0100 Fix IFC on nv4/5 by using the proper object. commit c6ae3fe9f077c38f616fd3ad07275dcf8cb65bbc Author: Stuart Bennett Date: Fri Dec 28 05:45:10 2007 +0000 Make sure the CRTC regs are unlocked when doing bios init Also make the single stage PLL setter less exploitable by the whims of the hardware commit bb467ad4baa30fc46a05bbce11d6aa4e3dac89a9 Author: Stuart Bennett Date: Fri Dec 28 08:23:17 2007 +0000 Fake a DCB entry for cards from the pre-DCB era Also, drop DCB parsing to after the init parsing again; having an INIT_TMDS in the init scripts would be silly (the original reason for bumping DCB parsing up) commit cdfe4fef9bd7d0a69d9ba19a79779152baef5489 Author: Stuart Bennett Date: Fri Dec 28 07:36:58 2007 +0000 Madness. Bios parsing for NV05 commit d4e12684617d07dc859e774f3eff9b944bc4c89e Author: Maarten Maathuis Date: Thu Dec 27 20:01:14 2007 +0100 randr12: Minor change. commit ab9dc943dd5036545e3396868c0332e9b727f31f Author: Maarten Maathuis Date: Thu Dec 27 19:50:27 2007 +0100 randr12: Small change. commit 66d343ad594f1019eb8f4d23308eb97dd1bbd94d Author: Maarten Maathuis Date: Thu Dec 27 19:25:00 2007 +0100 randr12: minor change commit cf5072e0c1d9dbee4f22ef190082aa1db78dbb0d Author: Maarten Maathuis Date: Thu Dec 27 18:37:30 2007 +0100 randr12: Undo unnecesary change. commit a7c643601073de5a63f718ddcdc9eb9f4873f2bf Author: Maarten Maathuis Date: Thu Dec 27 17:12:17 2007 +0100 randr12: Some fixes for LVDS and an odd 7300GO. commit b17f8ca13604f6b085b474219843d740b31918e8 Author: Stuart Bennett Date: Wed Dec 26 20:59:36 2007 +0000 Fix the setPLL optional code to actually compile commit 05b929ccd9c7cd50f60b84bf987fc5220ee83008 Author: Stuart Bennett Date: Wed Dec 26 21:31:16 2007 +0000 Fix up getting modes for both TMDS and LVDS commit ba92eb062aaf8b53c7f5c1858eb876d3e2f9af3e Author: Maarten Maathuis Date: Wed Dec 26 21:21:15 2007 +0100 randr12: Remove this, since it's not essential and can cause problems. commit 150d3362c5e0a300c35f1cb0c7da0c98cdd6b4de Author: Maarten Maathuis Date: Wed Dec 26 20:28:43 2007 +0100 randr12: Some minor fixed for dvi and lvds. commit 076f86dd67d6e69bd7d2a68f372cbbbb35785a3c Author: Maarten Maathuis Date: Wed Dec 26 14:51:49 2007 +0100 randr12: Some assorted fixes for dual link outputs. commit 15489f15e8130ffa74bee7c52086857554a69a6b Author: Stuart Bennett Date: Tue Dec 25 23:50:10 2007 +0000 On some chips we shouldn't look for a 27MHz crystal commit 8fa59a6231e293a8b669517bf11d35dcc15f34ff Author: Maarten Maathuis Date: Tue Dec 25 19:43:47 2007 +0100 randr12: Some minor changes. commit 80bdd0e9f4bd664e217722a57a8db79d56968194 Author: Maarten Maathuis Date: Tue Dec 25 11:58:09 2007 +0100 randr12: Restrict TMDS register backup to digital outputs. - The NV11 locks up when accessing these and it has no digital outputs, so ;-) commit 5574e96ae3e4608b95b5dd5f2dd5676386bb4ffe Author: Stuart Bennett Date: Mon Dec 24 22:33:21 2007 +0000 Better (not complete) support for DCB1.1/1.2 commit 2aa6a2347fa283dbd9b10258053602bd37880c26 Author: Stuart Bennett Date: Mon Dec 24 21:00:31 2007 +0000 "type1" bios scripts commit e0c5f65c0091b0f0ac7715fbf399a1f6fea60dc6 Author: Stuart Bennett Date: Mon Dec 24 18:13:47 2007 +0000 Rehabilitate BMP parsing commit 2789da6b34c9495a88d349b73cb838f4626fb152 Author: Stuart Bennett Date: Mon Dec 24 22:51:51 2007 +0000 Fix BMP length for version 5.16 commit 93448b40627d35fd89d8fd5629dae5f487082f43 Author: Stuart Bennett Date: Mon Dec 24 15:23:41 2007 +0000 randr12: use new PLL code on < NV40 commit 3d90e13c26e389f43253a5d2721ce93a628f156d Author: Stuart Bennett Date: Mon Dec 24 05:31:37 2007 +0000 setPLL routines for single and two stage plls plus some parsing fixes commit eabe1e02504467c7425e62673a68f4dc7dd83aab Author: Stuart Bennett Date: Mon Dec 24 02:29:54 2007 +0000 Two stage nv31 PLL mnp calculator and bios limits parsing commit c8b50bc7dc146e01ceb67ee3633b5c8958345fcd Author: Stuart Bennett Date: Sun Dec 23 03:09:26 2007 +0000 Single stage PLL MNP calculator commit 935f809f4bc9dab37e80c59007141d7b9ad673a8 Author: Maarten Maathuis Date: Sun Dec 23 22:05:10 2007 +0100 Reading into the -1 index of array is a bad idea, this should fix subchannel binding issues. commit f357ba26b7f560cdec03f70a2c3b79b65d70172b Author: Maarten Maathuis Date: Sun Dec 23 15:48:24 2007 +0100 randr12: Add modesetting debug option (showing most register writes). - Contribution of ahuillet. commit 95387b9779173cc3e51a7fffc60975010253b391 Author: Maarten Maathuis Date: Sun Dec 23 15:35:24 2007 +0100 NV40EXA: Suport as many of the repeat types as possible + random cleanup(randr12). commit 8e80f7504f872166a811b6ce20663aaf97fd7181 Author: Arthur Huillet Date: Sun Dec 23 13:49:24 2007 +0100 Revert a manifestation of my stupidity. commit 86a3a5fd40005a4860d11f0046444ba232db0d1e Author: Arthur Huillet Date: Sun Dec 23 13:47:08 2007 +0100 Xv: added an attribute to change the CRTC the overlay is on - useful with dualhead commit 129f04612cdbad756dbe213f77d2f12482b62c47 Author: Arthur Huillet Date: Sat Dec 22 23:32:36 2007 +0100 aunedsoau~ commit 26953280895698a94c1f886cf7c0d2f389167b1c Author: Maarten Maathuis Date: Sun Dec 23 11:46:17 2007 +0100 randr12: Extend dvi clock setting to nv3x also + cleanup. commit 063d1bd50b164e841e3a725b75ac243827aede50 Author: Maarten Maathuis Date: Sun Dec 23 10:46:09 2007 +0100 randr12: Actually load the default palette on modeset. commit 810901abb50a54b8f1eb73029f5348805a53531d Author: Maarten Maathuis Date: Sun Dec 23 10:32:18 2007 +0100 randr12: Simplify code a bit by using the more sane code for NV4x also. commit eb8441824ea2a7dc9a1d7a86a4305fae48a26a0c Author: Maarten Maathuis Date: Sun Dec 23 01:02:18 2007 +0100 Minor cleanup. commit 9eef67abaf8beb9ed93eb5b6ecdf7255f5b06e4c Author: Maarten Maathuis Date: Sun Dec 23 00:18:13 2007 +0100 randr12: Always enable MPLL and NVPLL on pre-NV41 cards. commit fa82eb23904bc1a70209778d2aafcbef6f27cfa1 Author: Maarten Maathuis Date: Sun Dec 23 00:07:01 2007 +0100 randr12: Put all NV2x (and lower) cards into restricted mode. commit 33d7313d7dca4501b7ac2e078a87f3a10ab1b501 Author: Maarten Maathuis Date: Sat Dec 22 23:55:19 2007 +0100 randr12: Correct CRTC selection for pre-NV40 cards. commit d6243fe33223d2934c1a819c58bb58b9ebe15c25 Author: Maarten Maathuis Date: Sat Dec 22 23:39:51 2007 +0100 randr12: Older cards do have switchable CRTC's, i was again wrong. commit a96553544ae76239e394ab34b33814a57252d31c Author: Maarten Maathuis Date: Sat Dec 22 23:23:32 2007 +0100 randr12: Minor cleanup to clock writing for pre-NV40 cards. commit 9b63f42bc7da9b45ecbbd32ef81cae55d2a57220 Author: Arthur Huillet Date: Sat Dec 22 18:44:36 2007 +0100 NV10EXA: disabled A8+A8 hack on PPC machines. commit 308fec0111d182fb17536ff2746e079c1af32d5a Author: Ben Skeggs Date: Sat Dec 22 23:18:57 2007 +1100 nv30: Don't touch 0x1a4 commit 62916c7c8c6b467436e4628c7d08a4e0de1f21f3 Author: Maarten Maathuis Date: Sat Dec 22 12:02:31 2007 +0100 randr12: Undo a previous mistake for NV1x/NV2x. commit 6f9eb17637e2c3b8d49a07332f06a0102d2fe016 Author: Stuart Bennett Date: Fri Dec 21 20:18:57 2007 +0000 Beginnings of PLL limits for BMP bioses And the correct way to use the debug_modes member (still disabled for now) commit 73bc1db51e9431c5d1861d8a753aa8dd9abe9882 Author: Stuart Bennett Date: Sat Dec 22 02:57:40 2007 +0000 On demand PLL limit parsing for NV40 Also some nv_bios message formatting consistancy pedantry commit 57b5dbfac4ff65258e94a17717815156a54cc273 Author: Maarten Maathuis Date: Sat Dec 22 01:29:38 2007 +0100 NV40EXA: Fix borders of images that recieved arbitrary rotation. - It was getting padded up to the edge of the smallest square that could fit the rotated image. - Please try this on older cards as well. commit 39ef0262be49feaed2ba1c6caeab5134181ef0b9 Author: Maarten Maathuis Date: Sat Dec 22 01:26:44 2007 +0100 randr12: Some minor changes. commit 371b6e52bef743f14003e3783ea3dbc624050594 Author: Maarten Maathuis Date: Fri Dec 21 18:02:33 2007 +0100 randr12: Restrict crtc's on nv1x and nv2x. - If anyone can show a mmio-trace showing how to switch them (on cards that have a dcb table claiming they can), then please do. commit c2ac36927827439cf92ff53bbf2414bfaf45a6c3 Author: Maarten Maathuis Date: Fri Dec 21 00:05:37 2007 +0100 randr12: Detect switchable crtc's. commit 33a2cf86520f42d549d03c46134b818e90d51a41 Author: Peter Winters Date: Thu Dec 20 23:47:11 2007 +0100 NV10 EXA: use the proper variable commit 71c3b8ff09adcadb10d800d3696762c3ef58be3d Author: Stuart Bennett Date: Wed Dec 19 23:44:23 2007 +0000 randr12: fix old and new style scaling for LVDS, and use an enum for the scaling modes commit 6bea51b905a461b4e703053082ab45d9e1074112 Author: Maarten Maathuis Date: Thu Dec 20 00:07:29 2007 +0100 randr12: Fix secondary (analog) outputs with ffs(or) != 3 on some NV4x cards. commit e0e04eb561f4b127087befc4e3768d8012a82bfe Author: Stuart Bennett Date: Wed Dec 19 04:29:34 2007 +0000 randr12: don't use invalid crtc pointer for lvds dpms commit a68ac97979a3178ea210470bbb3d64f3f9325e07 Author: Stuart Bennett Date: Wed Dec 19 04:00:14 2007 +0000 Turn LVDS panel on again, after resetting, when we're shutting down commit 1cfd659fc1a5f8dc2faba30155fca46bbe31f3a4 Author: Stuart Bennett Date: Tue Dec 18 16:58:57 2007 +0000 minor link_head_and_output cleanup commit 73a5d09b3e9fa13d04d6696ca38b6402795acc3d Author: Stuart Bennett Date: Wed Dec 19 03:43:59 2007 +0000 randr12: CRTC member wasn't big enough yay gcc. could fix console colour breakage commit 0a63198195f689b32388b99db61ff942e16fbc6d Author: Maarten Maathuis Date: Tue Dec 18 23:43:57 2007 +0100 NV10EXA: Fix rotation. commit f2a3807618cfeac01d7d28e9d76721ad61495f7f Author: Maarten Maathuis Date: Tue Dec 18 23:23:59 2007 +0100 randr12: Add new pll calculation for NV4x cards (from NVClock). commit ebf96c8b651d1a0dc5a19576cf57efcbb989d51d Author: Maarten Maathuis Date: Tue Dec 18 21:38:56 2007 +0100 randr12: Hopefully reset outputs better between mode changes. commit 5561f54f94e0b31394ecaf461e342470ca768281 Author: Maarten Maathuis Date: Tue Dec 18 07:49:05 2007 +0100 Some endianess fixes for the previously committed code. commit 11104ce9c499f30fb5abe29e65ba1918c563f4cd Author: Stephane Marchesin Date: Tue Dec 18 07:40:08 2007 +0100 Rename NV30TCL to NV34TCL in preparation of the merge. commit 3e6ea7af5b1613b9e0e4e29433910d998def4899 Author: Maarten Maathuis Date: Mon Dec 17 23:13:12 2007 +0100 Add pll limits bios detection code for NV4x cards. commit e56512d283f401a75c6165a0a02e8a7a5905fc4c Author: Maarten Maathuis Date: Mon Dec 17 19:45:42 2007 +0100 NV30EXA: Fix rotation. commit 9ff42b7a83da06a3b9b7076ca888ea447eaa16f3 Author: Maarten Maathuis Date: Mon Dec 17 17:50:11 2007 +0100 randr12: Fixes + cleanup. commit 83d99bc3e15d11d3476c54053f6bbe0ff9f094be Author: Maarten Maathuis Date: Mon Dec 17 00:40:24 2007 +0100 randr12: Some minor additions. commit 60c08fedec09dd036b4165881b3001874c4d349a Author: Stephane Marchesin Date: Sun Dec 16 23:40:26 2007 +0100 nv30 exa : handle gart case. commit efb10849e136048c9c49cce752d4073402219c8c Author: Maarten Maathuis Date: Sun Dec 16 23:26:49 2007 +0100 Undo a bad change. commit dd8beae22883822ea3555122b0352d4e3cf2c266 Author: Maarten Maathuis Date: Sun Dec 16 21:35:18 2007 +0100 A little more cleanup. commit 9ff169ba62dcb2eeefce8a020060de731b72cb6c Author: Maarten Maathuis Date: Sun Dec 16 21:32:32 2007 +0100 More cleanup. commit 2d03d4b999a0a37ff2f9fc87bd20959e789a152e Author: Maarten Maathuis Date: Sun Dec 16 21:19:13 2007 +0100 randr12: Select sensible maximum heights and widths for framebuffer. commit 0e47fa4ab35e529926f5fdccdb44f9d054e1886a Author: Maarten Maathuis Date: Sun Dec 16 21:17:04 2007 +0100 Some reindenting and minor cleanups. commit 2be4b73905dc5767e593bf4753607144fe67b7ab Author: Maarten Maathuis Date: Sun Dec 16 20:24:26 2007 +0100 Some cleanup. commit 6686adbea6638dd894eef697e044941352cc2674 Author: Maarten Maathuis Date: Sun Dec 16 20:10:39 2007 +0100 randr12: Restrict digital outputs with ffs(or) == 1 to primary crtc + some cleanup. - The blob does not reveal what the possible way is (so far), and guesswork didn't help either. commit 9c8da2f562ca571a56224d7fecfb9c3fb3a8d3d0 Author: Stephane Marchesin Date: Sun Dec 16 18:33:52 2007 +0100 And of course, that comment has to go. commit 02e9a01064930a7081569474be9544fa1f20a0f4 Author: Stephane Marchesin Date: Sun Dec 16 18:32:52 2007 +0100 Fix front buffer alignment issues (probably needed because of tiling). commit b134b8f1552066b6706521a9c85d9241d99b3ccc Author: Maarten Maathuis Date: Sun Dec 16 13:41:38 2007 +0100 randr12: Fix compile error. commit ec0c9cc9a69c00a960e98e796c00d35d996cf360 Author: Maarten Maathuis Date: Sun Dec 16 12:55:29 2007 +0100 randr12: A minor change to OUTPUT register. commit 69782a57285bb53df73c7f45d29882ae990f6054 Author: Patrice Mandin Date: Sun Dec 16 00:09:45 2007 +0100 nv30: revert viewport clip change, add myself, add unknown command 0x2b8 (viewport origin?) commit 8dd238f3ce2e7eda7151670ea50a75abdb5b6217 Author: Maarten Maathuis Date: Sat Dec 15 23:49:58 2007 +0100 randr12: Some minor changes. commit 08a50d878571f7c9579b15703a08c5c2e52924f2 Author: Maarten Maathuis Date: Sat Dec 15 19:54:11 2007 +0100 randr12: Some minor reordering of load/save functions + don't lock crtc when leaving X. commit 4209c06800b97e98261c10e0a625a68f7352ca6c Author: Maarten Maathuis Date: Sat Dec 15 14:48:04 2007 +0100 randr12: Also support accelerated rotation on older xservers (and default code). commit 933b40a2911486a78615984fb17e9ea6757fcfa8 Author: Ben Skeggs Date: Sat Dec 15 23:45:03 2007 +1100 nv40: just for stillunknown... Fix composite transforms. This is getting to a point where it may be worth doing this in the vertex program perhaps. For now this works, it'll do. commit 7212400070264e27a53564a7f5fc95dd9c99f82e Author: Ben Skeggs Date: Sat Dec 15 23:44:17 2007 +1100 Revert "NV40EXA: Fix composite rotation." This reverts commit 02d4538b207cf318737ace8c3d8ded76a54e5886. commit 1a622257687a499ce74b3a608618d957784dccf0 Author: Maarten Maathuis Date: Sat Dec 15 13:39:23 2007 +0100 randr12: Avoid a vram/memory leak in some situations. commit 02d4538b207cf318737ace8c3d8ded76a54e5886 Author: Maarten Maathuis Date: Sat Dec 15 13:35:45 2007 +0100 NV40EXA: Fix composite rotation. - Thanks to radeon (code) for inspiration and sample code. commit 77d47348dfe01ca3972a683d3c478f910301e910 Author: Maarten Maathuis Date: Sat Dec 15 12:02:36 2007 +0100 randr12: Add some ifdefs to make compiling better on older xserver's. commit dbb7efc5b81145ad61d8e6502b918a1e909f3cfb Author: Patrice Mandin Date: Sat Dec 15 11:44:41 2007 +0100 nv30: need to set default depth range commit 6ab8436df0865aab7f12cd8527600353b4728df7 Author: Patrice Mandin Date: Sat Dec 15 11:37:43 2007 +0100 nv30: only 4 texture units commit 370d97a4578528c26c3f1546a9522caf40aa2151 Author: Patrice Mandin Date: Sat Dec 15 10:34:26 2007 +0100 nv30: fix viewport clipping setup commit 1190d046dfef97dea04d72c993f90a203d81d86c Author: Maarten Maathuis Date: Sat Dec 15 02:00:37 2007 +0100 Fix ugly bug, that creeped in. commit 46f321985ae57457edcedf80f82ba23e53fd9cd2 Author: Maarten Maathuis Date: Sat Dec 15 01:44:59 2007 +0100 randr12: Preliminary support for rotation, please read notes. - It works, but it's slow, very slow. - Each crtc now has it's own cursor map (fixing the bugs you never saw). - Dualhead with one rotated screen may show minor corruption near the edges, this will disappear if a fullscreen app opens. - Acceleration is possible, BUT: - You need a git xserver. - Enable NOUVEAU_EXA_PIXMAPS in nouveau_local.h (*maybe* this will become default later). - Most of the composite hooks have problems with rotation, so left and right won't work, inverted does work for me. - So please fix the composite hooks ;-) - Note: No slowdowns are apparent when using proper acceleration. commit 0f07ec3f681b87762fbe7328f47b628711bdbaae Author: Stuart Bennett Date: Sat Dec 15 00:01:04 2007 +0000 Better restoration of TMDS regs on LVDS commit 34be8d005fbfff373cc7fe52ca2fa09f5cd5ef00 Author: Maarten Maathuis Date: Fri Dec 14 23:58:25 2007 +0100 randr12: It seems DVI on laptops wasn't as strange after all. commit d678932a1818c5c5f4a4f3097992626ce9620c0e Author: Stuart Bennett Date: Fri Dec 14 01:40:14 2007 +0000 INIT_COPY_NV_REG and INIT_ZM_REG_GROUP_ADDRESS_LATCHED opcodes Thanks to RAOF for the trace with these Also correct a doc oopsy, and a bunch of superfluous whitespace commit 5b9dc7ad6eb2f16c4ca8824c2a19c85bbe1f126b Author: Stuart Bennett Date: Thu Dec 13 02:30:06 2007 +0000 Invert 18/24 bit interface flag, so that the default value (0) does not imply dithering commit a878b48c7b5a7aafac9aaa877706f5c7570d3057 Author: Stuart Bennett Date: Thu Dec 13 01:10:12 2007 +0000 Name bios opcodes 4f and 50 Extrapolating from previous names, but marked as non canon commit 59b46e695b1badbf00f2c03bc78ce58f6887f739 Author: Stuart Bennett Date: Thu Dec 13 01:03:25 2007 +0000 Get VBIOS from pNv (cleanup) And a minor doc correction commit c45930d0819668612547b4bf1a8d963bfe40e38b Author: Stuart Bennett Date: Thu Dec 13 00:15:21 2007 +0000 randr12: some minor cleanups, no actual changes commit 0e778b2d6970f761e5c0b5eb3054e91589cd2c46 Author: Stuart Bennett Date: Wed Dec 12 15:54:53 2007 +0000 Setup NV40 LVDS commit 269d83cb46075971fd8dc5402589d4da3eb92f22 Author: Stuart Bennett Date: Wed Dec 12 22:20:43 2007 +0000 INIT_CONDITION_TIME opcode commit 9b3072d195aae383a993526b3ab4350c500c4277 Author: Stuart Bennett Date: Wed Dec 12 18:08:07 2007 +0000 Opcode 4F commit 8ee100ced7da347904e45ce590350d7b7c47ed36 Author: Stuart Bennett Date: Mon Dec 10 22:50:40 2007 +0000 FP BIOS mode finding for nv40 commit 9131985f5c359bdb077eb52649369a5c06831544 Author: Stuart Bennett Date: Tue Dec 11 23:23:27 2007 +0000 CR57 doc addition commit d595eb86790432f6a75dec3388080ffc9ffff8d8 Author: Maarten Maathuis Date: Wed Dec 12 22:12:33 2007 +0100 randr12: A good guess at the lower bits of SEL_CLK (i hope ;-)). commit c5bc9899c218abe801e024919c89896e8183dff2 Author: Maarten Maathuis Date: Wed Dec 12 21:03:34 2007 +0100 randr12: Add some extra safeties (to mode checking). commit 43c05d306485eb5d8c8b9b39f9bd4a3f470f20a2 Author: Maarten Maathuis Date: Tue Dec 11 21:43:02 2007 +0100 randr12: Enable dithering on lvds when needed. commit 8752f18d27a6095485e36f4fb20e9252f27a1e1b Author: Maarten Maathuis Date: Tue Dec 11 20:22:23 2007 +0100 randr12: SEL_CLK attempt 10, return to simplicity, which may actually work ;-) commit c1227d3a2b9194d50a4274a48fa0b3bcf2628e36 Author: Maarten Maathuis Date: Tue Dec 11 17:52:39 2007 +0100 randr12: (mostly) Some fixes for NV40. - The NV40 is a strange card, as it partially behaves like an NV3x. commit 34d9e971e17e763aee96b823bb34da54a281339c Author: Maarten Maathuis Date: Tue Dec 11 11:50:28 2007 +0100 randr12: Fix SEL_CLK assignment again (for non-mobile cards) + fix crosswiring. - I made a good guess for mobile cards, but i need more mmio-traces. - I accidentally broke crosswiring for my card (and other's like it). commit bf28c3e7d9976f8695198a938397f001de62836b Author: Maarten Maathuis Date: Tue Dec 11 00:04:38 2007 +0100 randr12: Fix an earlier mistake, make a decent guess about dvi on laptops. - I could use some more mmiotraces of LVDS+DVI on NV4x. commit 58531ebd4a72368b13d3c1564110ef85fb6d6644 Author: Maarten Maathuis Date: Mon Dec 10 20:43:26 2007 +0100 randr12: Improve crosswiring for digital outputs + minor changes and cleanup. commit a388cc5fe21f8692e8ee1dbd71caea88ea2ca5df Author: Maarten Maathuis Date: Mon Dec 10 16:31:47 2007 +0100 randr12: Properly set SEL_CLK based on bus, not based on output. - This hopefully fixes non-working dvi on some desktop cards and on mobile cards. commit f96a6c2d5d251af560de673ccd91b88b3f5cc535 Author: Maarten Maathuis Date: Mon Dec 10 00:03:49 2007 +0100 randr12: Add config option for scaling mode. commit fc73ddad60c551289629be5f2f87b39e26f42674 Author: Maarten Maathuis Date: Sun Dec 9 22:46:39 2007 +0100 randr12: Some cleanup. commit 2543e301402b04ae94f349e21a7760beb6f5bdc6 Author: Stuart Bennett Date: Sun Dec 9 19:58:58 2007 +0000 Bios register write function special case and some INIT_RESET improvements nv32_wr weirdness only seen on NV40+, but it shouldn't hurt for earlier cards commit 4408ce8d2f902a9ace550a045e6022df2936fbce Author: Stuart Bennett Date: Sun Dec 9 17:09:03 2007 +0000 Some renaming for bios indexed port io commit 9eb4294e3f5814f675b403078761bf002540868b Author: Maarten Maathuis Date: Sun Dec 9 18:36:26 2007 +0100 randr12: Revert dither value to that used by nv. commit cfbe4bdef7f4ba958462743dc28bf253b456c1a3 Author: Maarten Maathuis Date: Sun Dec 9 18:34:10 2007 +0100 randr12: Set FP_CONTROL correctly for NV2x cards. commit d5dd3afc50e491689f765a5e6a72892efa1768a3 Author: Maarten Maathuis Date: Sun Dec 9 18:10:29 2007 +0100 randr12: Improve output selection. - Now detect if there is a dual link capable output at all. - NV2x cards can't switch crtc on analog outputs. commit fda83a3c489469d2bb4cbd20c205016b19dfdec5 Author: Stuart Bennett Date: Sun Dec 9 15:51:02 2007 +0000 Additional LVDS bios script sanity check Avoids current incorrect situation when LVDS attempted on NV40 commit 9932e36d4cf2988d1f6f40d615cd247acc21b592 Author: Maarten Maathuis Date: Sun Dec 9 16:29:14 2007 +0100 randr12: Fix minor (potentional) bug. commit 3f83d7308f3b0aca4943262b0ba2715a32b61d58 Author: Maarten Maathuis Date: Sun Dec 9 12:47:55 2007 +0100 randr12: Add noscale mode and some misc fixes. commit d688008b38609814de9c5c36a2c8bc569455d14e Author: Maarten Maathuis Date: Sat Dec 8 18:34:04 2007 +0100 randr12: Fix typo, it's "our" not "or". commit 0f7c018af0c7f929c2bf8efb12c510d6e3170885 Author: Maarten Maathuis Date: Sat Dec 8 18:25:41 2007 +0100 randr12: Assuming an output always has a crtc is a bad idea. - Don't rely on current crtc to restore mode. commit 86f248cc2e52de652b1768e15a4ba62eefefd81c Author: Maarten Maathuis Date: Sat Dec 8 16:49:21 2007 +0100 randr12: Avoid that two outputs have the same clock selected. commit 6be67d6cf0f047ceba0aa62989dc44bb58b0db87 Author: Maarten Maathuis Date: Sat Dec 8 15:50:39 2007 +0100 randr12: Fix bug in sel_clk assignment. commit ddfec2f1c749af227dd57dbde6751320ba72adb6 Author: Stuart Bennett Date: Sat Dec 8 02:18:41 2007 +0000 Base error :) commit dff95ae101f701d737c8d2134181693f36178beb Author: Stuart Bennett Date: Fri Dec 7 16:56:26 2007 +0000 Fix failure to cope with varying table lengths commit 10731d2a8fe06fa8675c26d201615c2a019de737 Author: Stuart Bennett Date: Fri Dec 7 02:54:36 2007 +0000 Add a new valid register range, which appears in some gf7 biosen. NVClock has it down as appearing in gf8 as a new PBUS range, but the use on gf7 looks PBUS-like too commit b25049233613eff99d767a8ec0c97b5140088213 Author: Stuart Bennett Date: Fri Dec 7 03:13:52 2007 +0000 Some more bios script opcodes Thanks to swany for the trace for these commit 6da4923088e8ca1d2de464030205b41d893e65b3 Author: Stuart Bennett Date: Fri Dec 7 02:17:37 2007 +0000 Some M table parsing, and defer I table execution commit 7e5e477b67279e00d1e56736f9c953972bda4dec Author: Stuart Bennett Date: Fri Dec 7 00:18:25 2007 +0000 Improve TMDS04 setting for LVDS commit dd757910f546a97bb42dbefdc7eae058980b1ffb Author: Stuart Bennett Date: Thu Dec 6 23:37:01 2007 +0000 TMDS regs setting for pre NV40 commit 38f139d473eb3201daaac47e655516f65c7528a6 Author: Stuart Bennett Date: Fri Dec 7 00:30:14 2007 +0000 BIOS version parsing commit 20b6be6c95a71a41456c4c9b5cb1a1e0238f2e70 Author: Stuart Bennett Date: Thu Dec 6 17:01:49 2007 +0000 Refactor BIT specific details out of TMDS setting commit f665b4737f1fbbd5e4a6495b561e723f17bc6137 Author: Stuart Bennett Date: Thu Dec 6 18:48:04 2007 +0000 The 'T' table is clearly a TMDS table, call it as such commit 3759cc9d602b0cd933a0ee7e6f64626822383e19 Author: Stuart Bennett Date: Thu Dec 6 05:03:49 2007 +0000 The TMDS scripts being non-stubs does not seem to matter - they're still not executed Message left as log clutter in case there's some future case of broken TMDS when the scripts might be useful commit d6e896dac1018fc3190a5a5283a405c4b031d1ba Author: Stuart Bennett Date: Thu Dec 6 04:14:56 2007 +0000 Test for LVDS_INIT script commit c50bc602861fdcdb238e1a4db1146b4870ce83ba Author: Maarten Maathuis Date: Thu Dec 6 21:48:13 2007 +0100 randr12: Small fix for dual link dvi. commit 457d4217624cc73df22ca7f7db0134c54ebac5e5 Author: Maarten Maathuis Date: Thu Dec 6 19:54:08 2007 +0100 randr12: Improve compatibility with DCB 2.0 commit 5046cb7b3d1af89b72327660932ae06c06d0869b Author: Stuart Bennett Date: Thu Dec 6 02:28:18 2007 +0000 randr12: oops, lost the restore case commit 54c7bdf0f3e53c23c0853eac8243407d280d0732 Author: Stuart Bennett Date: Thu Dec 6 01:54:45 2007 +0000 randr12: a common function to fix TMDS04, and new use of LVDS_RESET Plus some corrections/additions to call_lvds_script, and a minor CR5758 doc update commit a7811521ed5d227a18af23e2e761ea39fb7eb86f Author: Maarten Maathuis Date: Thu Dec 6 00:28:49 2007 +0100 randr12: Fix comment. commit 4771b4bd4b30f404fb087dd1fd6eac0e12fdd041 Author: Maarten Maathuis Date: Thu Dec 6 00:25:48 2007 +0100 randr12: Some assorted fixes, which hopefully improve things for dual link dvi. commit 4d3a015631a0d95392daeec6fd8e99c65c83cb53 Author: Maarten Maathuis Date: Wed Dec 5 20:41:27 2007 +0100 randr12: replace preferred_ramdac with preferred_output. commit d3036012db63f9a386d4c1fd8e624b86bcd6c48b Author: Maarten Maathuis Date: Wed Dec 5 20:27:57 2007 +0100 randr12: Clean up the unneeded ramdac variable. commit 37f3a06be4f50c34ee8b82617e5e6eca3a4d66fe Author: Maarten Maathuis Date: Wed Dec 5 19:03:52 2007 +0100 randr12: Pick right register set, to correctly "guess" the bios/VT clock. - A wrong register set leads to improper detection of crosswiring, thus selecting the wrong clock. - I noticed a 0.675 MHz difference in the clock (which is vpll2), when instead i should have had vpll1. commit b843dbddbd496ab7d374018e6e05ac1a05ea00e2 Author: Maarten Maathuis Date: Wed Dec 5 16:51:04 2007 +0100 randr12: Small fix. commit 4b049994f32058e380543cee81b1d0b76658ea9e Author: Maarten Maathuis Date: Wed Dec 5 16:47:07 2007 +0100 randr12: Final commit, restore TMDS regs before everything else. - Use the bios to program the tmds registers. - Restore TMDS registers in nv_crtc_restore, to make sure it's early enough (see code note). - It works for me, let me know if it breaks stuff ;-) commit 6ff8c1cb2014c7984503a8481cf6ad4f9cccf79a Author: Maarten Maathuis Date: Wed Dec 5 07:57:30 2007 +0100 randr12: Intermediate bios based flat panel init commit, still a few minor issues. commit c14c7deb725c2509c804bae72faa584109f3021c Author: Stuart Bennett Date: Wed Dec 5 00:35:35 2007 +0000 Add LVDS script function, and use it for DPMS commit c587731d08bbfd58ff5c2725b7aed4e6477e9f7f Author: Stuart Bennett Date: Wed Dec 5 00:22:22 2007 +0000 Parse the LVDS Manufacturer table Use dual link flag to set bit 31 of FP_CONTROL properly commit affcf6988f1af2c3ea8c47a2f1fdf608cbafcfce Author: Stuart Bennett Date: Tue Dec 4 20:31:06 2007 +0000 Modify DCB dual link flag, and DCB config parsing for LVDS The DCB duallink flag indicates that this setup may be used for duallink; it obviously can't know whether a duallink display is plugged or not Use LVDS DCB conf flags for mode detection / selection commit c822e32d95a7afa3d5ef076f97179a1843835f12 Author: Maarten Maathuis Date: Tue Dec 4 09:06:10 2007 +0100 randr12: Add fullscreen gpu scaling (only as randr property for the moment). commit a1054c7bef3594f6876d611dde1cf3f0528fb8e1 Author: Stuart Bennett Date: Tue Dec 4 01:31:24 2007 +0000 Better T table stuff. Hopefully now usable by calling parse_t_table(...) at the appropriate place Also collapse some messages, and add an array bound check commit edb9a59ac8d3b16cccd52bde24606c43ae7d36d0 Author: Stuart Bennett Date: Tue Dec 4 01:40:37 2007 +0000 Allow BIOS execution at runtime, if wanted And comment the opcodes I haven't double checked yet commit 82fdd3f76e20fc7dd10fcf00cf1c13520dc56364 Author: Stuart Bennett Date: Tue Dec 4 01:31:24 2007 +0000 Make the bios a bit more accessible And make a few things use the new structure commit d15bfdfb7e09dce85c3817036ced9efa6ac4522c Author: Stuart Bennett Date: Tue Dec 4 00:00:40 2007 +0000 randr12: set CR58 appropriately for 0 and 2 cases commit 02a4f498d903bda55ac38a6e19b1beca0d128e8a Author: Stuart Bennett Date: Mon Dec 3 23:35:01 2007 +0000 randr12: refactor dcb usage heads is also a better name than head commit 1571f81210b48407c9d20264437406d79dfcc784 Author: Stuart Bennett Date: Mon Dec 3 22:26:33 2007 +0000 randr12: some code economy Only addition is adding call to output2->funcs->commit when stealing a ramdac, no logical changes otherwise AFAICT commit 7debf566c7a88258ac8ca925d7138187c1ed8755 Author: Stuart Bennett Date: Tue Dec 4 00:06:05 2007 +0000 randr12: Improve CR57 and CR58 infrastructure and saving/restoration commit dab828c4793fd7e48e4d8e1d7f8d0a2f8198484c Author: Maarten Maathuis Date: Mon Dec 3 20:55:26 2007 +0100 randr12: A few minor comment changes. commit d959d880b6808adc153c752ea01f3a228879fe3c Author: Maarten Maathuis Date: Mon Dec 3 20:51:16 2007 +0100 randr12: Select CRTC 1 on pre-nv40 (stupid bug) + initial support choosing scaling method on tmds. - The output property SCALING_MODE accepts "gpu" and "panel". - The first obeys aspect ratio, the second always goes fullscreen. - This is just a first attemp at exposing an output property. commit 1d2ea797704d55f63cfe8c00cc000a6b13f1093d Author: Maarten Maathuis Date: Sun Dec 2 22:10:56 2007 +0100 Show the id's of unknown bit structures in the bios. commit fc98b11eb70f1dd7dfb4e7c6eb8d888dfebdc890 Author: Maarten Maathuis Date: Sun Dec 2 12:02:08 2007 +0100 randr12: dual-dvi cards need extra consideration. commit 2beece0c634c2c60996da1f1d15b24c5f231a6be Author: Stuart Bennett Date: Sun Dec 2 02:33:57 2007 +0000 Fix endian bug on BIT biosen commit d3563cccb43355927d4ba355bc31a957ea01587f Author: Stuart Bennett Date: Sun Dec 2 02:14:32 2007 +0000 Don't use PROM if the checksum is bad commit 4097af9bad85031fa1da9c3d21b084f587412604 Author: Stuart Bennett Date: Sat Dec 1 09:55:31 2007 +0000 randr12: print "or" _pre_ ffs-ing commit a8faa53355f9ba3851f47e290c821bc1b9a03e85 Author: Stuart Bennett Date: Sat Dec 1 09:53:05 2007 +0000 DCB parsed flag for duallink outputs Light on proof, strong on suspicion with this one commit 63fc1ab4ce597a2f542c9bb7d3edae67551bda29 Author: Maarten Maathuis Date: Sun Dec 2 02:08:20 2007 +0100 randr12: Always use vpll2_true on nv4x cards. commit 97a99c42fb24320177bdae884c4c710c5a25ce4f Author: Maarten Maathuis Date: Sun Dec 2 01:48:01 2007 +0100 randr12: A safer bet for TMDS register 0x2e. commit 3358f4eec53845cf90b9f9ef1f2a70c231bac588 Author: Maarten Maathuis Date: Sun Dec 2 01:34:49 2007 +0100 randr12: Remove preferred_crtc, since it's probably incorrect. commit 5994655925173a4e8b1c0ac902f7dc6e1ffe64f1 Author: Maarten Maathuis Date: Sun Dec 2 01:08:41 2007 +0100 randr12: Improve output register setting. commit df8d6848a004e724e92c3dd63fc608198c7bd940 Author: Maarten Maathuis Date: Sat Dec 1 18:40:46 2007 +0100 randr12: Fix up some dvi related issues, thanks to MighMoS. commit 84cc907beffd9e8f91c4333a6db919ee2efa2740 Author: Maarten Maathuis Date: Sat Dec 1 11:23:50 2007 +0100 randr12: Fix NV4x dvi clock selection, mostly affects G70 cards. commit c97ad9850da89b1898f125df1796bb1d00d124bb Author: Stephane Marchesin Date: Sat Dec 1 10:33:53 2007 +0100 Make the debug variable global to all DMA calls. commit 19d75f5018fd442920378a5083dbe1316cc6f62b Author: Stuart Bennett Date: Sat Dec 1 06:29:09 2007 +0000 The BIT bios T table. T might stand for TMDS. Parsing once on start may not be the correct answer, could be a runtime thing commit 42a02513a1db7ada586dcaa2eaa5b68e97d67892 Author: Stuart Bennett Date: Sat Dec 1 06:37:17 2007 +0000 Bump DCB table init so that INIT_50 can use it commit ddc4b0946dfd567fc0ea136db0d8b695c28bc3a2 Author: Stuart Bennett Date: Sat Dec 1 05:35:40 2007 +0000 "or" can be 0xc Quite what this means, or why Nvidia couldn't give it a more descriptive variable name in the g80 driver is anyone's guess commit 384115a5abd756c5e3ee79ba50e15636d159f19c Author: Stuart Bennett Date: Sat Dec 1 05:17:47 2007 +0000 Use Nvidia's naming for CRTC_INDEX_COLOR commit 2344b5b5a5a0efa439ba64f92d5b08097178dd6c Author: Stuart Bennett Date: Sat Dec 1 05:16:20 2007 +0000 Bios script code 0x50 commit 78c6ff292f4c2aa0e06bce095108d0716555104a Author: Stuart Bennett Date: Sat Dec 1 00:45:32 2007 +0000 Add dcb "location" field. 0 for on-chip, !0 for external commit 312fb3d65b8db6e3c2d123c0b192da82b7de4f71 Author: Maarten Maathuis Date: Fri Nov 30 16:47:26 2007 +0100 randr12: Don't unset bit 8-15 in sel_clk. commit ea10d579fb6053e064a5cd14b47e1da55d4120ac Author: Maarten Maathuis Date: Fri Nov 30 16:43:33 2007 +0100 randr12: Big commit, read message. - Outputs (on nv4x) should now select vpll2 instead of vpll1 when neccesary (this took a long time to figure out). - Register 0x00680594 is now set correctly to allow analog secondary outputs to work (for me at least). - I found the bit that triggers non-VGA modesetting in nv10reg, so in the future we could copy the blob in that area. - Misc fixes to a lot of things. commit a7a8993f4074e942ec4b3ef58ede0162a2d3c415 Author: Maarten Maathuis Date: Mon Nov 26 22:11:03 2007 +0100 randr12: Make sure the vpll is properly set when we steal a ramdac from another output. commit c11d3f68720b698736d5a28a82d3e45b55379bc6 Author: Maarten Maathuis Date: Mon Nov 26 19:40:59 2007 +0100 randr12: Fixed a minor cursor bug. commit 59d98374e082c40b57737de56b17173f5b54910e Author: Maarten Maathuis Date: Mon Nov 26 19:24:03 2007 +0100 randr12: Set the value of sel_clk correctly (hopefully) for NV4x. commit 8672d7a33fe369645786c21e130f51560a656d3c Author: Maarten Maathuis Date: Sun Nov 25 22:08:23 2007 +0100 randr12: cleanup + double register assignment (vga CRTC) removed. commit 11809882f24e40b1b8c77f4caca27ce2ebd3ccbf Author: Maarten Maathuis Date: Sun Nov 25 18:15:27 2007 +0100 randr12: Convert premultiplied alpha cursors to normal alpha cursors. commit ece41daabeb0cfd727daec14d9734dac08159c7a Author: Maarten Maathuis Date: Sun Nov 25 16:49:01 2007 +0100 randr12: Fix alpha cursor corruption. commit 5abbf55fb5c957c4be425e9ebd2660ca14d44e27 Author: Maarten Maathuis Date: Sun Nov 25 14:15:30 2007 +0100 randr12: alpha cursors don't need background changes. commit 37c36a284508e63af152a9315aa19a729e5516cd Author: Maarten Maathuis Date: Sun Nov 25 13:06:10 2007 +0100 Reindent a few cursor functions. commit 1ad212271cc99b95ff52eb719d24ac58d392c0eb Author: Maarten Maathuis Date: Sun Nov 25 03:20:43 2007 +0100 randr12: Improve TMDS and LVDS registers (and enable for LVDS). commit 39d94139910c53f9092f28ea6d742133666ac18d Author: Maarten Maathuis Date: Sun Nov 25 01:31:39 2007 +0100 randr12: Optimize tmds_regs a little bit. commit c6dce92c47dacfc822315e570bff70a8e42f5dc2 Author: Stuart Bennett Date: Sat Nov 24 21:51:14 2007 +0000 randr12: use bus field to determine dvi pairs commit 328197b4613f5e25eacfb67888701bb0e298c765 Author: Stuart Bennett Date: Sat Nov 24 20:44:27 2007 +0000 Remove a load of unnecessary casts, and reorder functions by opcode Plus a micro opt to checksum thing commit 8cee41bc6112a96f43f242b5178a9c968d2b2d9e Author: Stuart Bennett Date: Sat Nov 24 20:25:13 2007 +0000 A bunch more cleaned up bios opcodes Thanks to stillunknown for the bios trace commit 5d6f214db4cd5f0cdcb6a4395ce2ce4acf322257 Author: Maarten Maathuis Date: Sat Nov 24 16:22:04 2007 +0100 randr12: Be more considerate of outputs that can only work on ramdac 1. commit 6e1c37e26f630caa03da9061a5cec200708babbd Author: Maarten Maathuis Date: Sat Nov 24 15:47:04 2007 +0100 randr12: The result of another refinement of dvi crosswiring. commit ce57eb9b34095f2776ef36b09249a4b202824a86 Author: Maarten Maathuis Date: Sat Nov 24 13:12:49 2007 +0100 randr12: Disable crt_load_detect for ramdac 1 and set some better valued for test_control. commit 525997f86c5fe0f79cf0fa584b4cb617b83a9386 Author: Maarten Maathuis Date: Fri Nov 23 23:12:53 2007 +0100 randr12: add bit30 to vpll register for nv4x cards - This seems the most common situation, any idea what the bits do? commit f249b3b33c025417d11a85a29848db2112450dce Author: Patrice Mandin Date: Fri Nov 23 22:25:47 2007 +0100 nv30: missing command commit b56ca2ef87fe15132dcbc43361344d8af446c8a7 Author: Patrice Mandin Date: Fri Nov 23 22:25:06 2007 +0100 nv30: another reference to an object commit a8af1725ef7ae6c1cd19659d0607e2a702dc148a Author: Patrice Mandin Date: Fri Nov 23 22:24:19 2007 +0100 nv30: rename viewport clip commit 14e631691a2e8704ee016828e94c48de7eb96409 Author: Patrice Mandin Date: Fri Nov 23 22:03:21 2007 +0100 nv30: was not using gart handle commit 9648fd259f9906f5db854e8c4b57fd2675f4d5c5 Author: Maarten Maathuis Date: Fri Nov 23 21:08:46 2007 +0100 randr12: Reenable a properly working crt load detect. commit 3010847c1ccf14f0b5356aeb05f2c8c0c519ce91 Author: Maarten Maathuis Date: Fri Nov 23 18:58:49 2007 +0100 randr12: Remove some unneeded stuff. commit 2b092ca5277405a166ea54de418a8114fb6a8cf6 Author: Maarten Maathuis Date: Fri Nov 23 17:32:12 2007 +0100 randr12: fix comment typo commit 5ca53ef57ece7ae547cd5b11e83eb0d15fe69033 Author: Maarten Maathuis Date: Fri Nov 23 16:40:02 2007 +0100 randr12: Allow arbitrary ramdac and crtc combinations. - Support for the misterious ramdac 2 still has to be reverse engineered. commit e16fccde3f817e9eab3a09398a4821566967a86d Author: Maarten Maathuis Date: Fri Nov 23 13:25:38 2007 +0100 randr12: Move a lot of registers from output to crtc. commit cd8293954e1d004ef837d339ae87c4689fd45e1f Author: Maarten Maathuis Date: Fri Nov 23 10:32:08 2007 +0100 randr12: There was more logic to sel_clk than previously thought. commit 0b55ba9f9fbd60044bad880f260e0c70e6f577f0 Author: Maarten Maathuis Date: Thu Nov 22 22:18:47 2007 +0100 randr12: revert to old vpll regs on nv4x cards, because the others can't be written - If anyone knows the bit to allow those registers to be written, then please tell. - This also fixes db1 vclk ratio issues, hopefully. commit 18117df17ec2ce355344953d70caf33a0272697f Author: Stuart Bennett Date: Thu Nov 22 00:30:29 2007 +0000 Bios CRTC head chosing fixed Also, a slightly tighter limit on values for or, as I don't currently think bit 4 being set makes any sense commit 425b7cd9dcddf1735d59e9ef60e81bf91db1c65c Author: Stuart Bennett Date: Wed Nov 21 20:02:17 2007 +0000 randr12: unbreak LVDS console restore by reverting tmds_regs change commit e3f77b1b4332f5c072be713b5ea6dd234c194bb0 Author: Stuart Bennett Date: Tue Nov 20 19:02:17 2007 +0000 Complete init_index_addr_latched opcode commit 05f40b2dd3f8c14da2464b19b21aa66defec17e3 Author: Stuart Bennett Date: Wed Nov 21 01:58:12 2007 +0000 More DCB entry output, and a default for DCB 1.4 The table seems to be the same for all DCB 1.4 biosen I've seen, and POST seems to make no effort to parse it. I wonder if it is in fact used at all commit d96176c2f07efde4224c35b7c03b8380a73e1831 Author: Maarten Maathuis Date: Tue Nov 20 20:41:38 2007 +0100 randr12: better guess for ramdac register 670 (nv44 and up) commit 817b8f1a1af70402c18c45edccec5c746063d4e8 Author: Maarten Maathuis Date: Tue Nov 20 19:55:15 2007 +0100 randr12: fix serious bug in vclk calculator for nv4x cards. commit 040e5479344b0f794e79e4ffc6c547c58835401a Author: Maarten Maathuis Date: Tue Nov 20 18:49:39 2007 +0100 randr12: Fix a small mistake that could cause blank screens for NV44 and up. commit 1cc05c9e08a7e4f0c27bb0e08d47265d31123bf9 Author: Maarten Maathuis Date: Tue Nov 20 12:56:28 2007 +0100 randr12: I hope i really fixed db1 vclk ratio this time (for nv4x). commit 016f7e84c4ef62840e300d61e5e3b2ddfadd5e32 Author: Maarten Maathuis Date: Tue Nov 20 12:44:25 2007 +0100 NV50: Make a small mistake. commit 2cbd24ad579d3e68eaef2f8500b22e101fecd936 Author: Maarten Maathuis Date: Tue Nov 20 12:25:21 2007 +0100 NV50: Some deobfuscation. commit ccfc6910f8cd8eb8d4b628cc14ef7db417f576ea Author: Maarten Maathuis Date: Tue Nov 20 09:52:47 2007 +0100 randr12: Also enable DB1 vclk ratio if PLL_SELECT had it enabled. commit 5b3d86562afd35c14d2c8c07618b08bbc98ad775 Author: Maarten Maathuis Date: Mon Nov 19 23:55:58 2007 +0100 randr12: Proper support for db1 vclk ratio, thanks to Thunderbird for some info. commit 22d8ba5ebf659f6f126a1380190339d08ee824c6 Author: Maarten Maathuis Date: Mon Nov 19 09:23:37 2007 +0100 randr12: Add a gamma_set hook. commit cbd70303a949f387d42497cb4ea52186ed938b9c Author: Maarten Maathuis Date: Sun Nov 18 22:03:03 2007 +0100 randr12: A first attempt at some lvds programming, not hooked up. - This is a start for someone with a laptop to test and refine. commit 58c3d6a886c5d5557def490ee8c3e75c9f8d2cd7 Author: Benjamin Herrenschmidt Date: Sun Nov 18 02:50:33 2007 +0100 Enable IFC uploads. commit 619ae1f7a028f24293f9a4e4f7777cc51ef8d16d Author: Maarten Maathuis Date: Sun Nov 18 00:15:34 2007 +0100 randr12: Final commit, switch to nv40 native vclk regs. - I've also seperated the save load pll functions, to improve clarity. commit 601adb4f431b638d4b711ba01aa2d4c3408a7bd3 Author: Maarten Maathuis Date: Sat Nov 17 23:47:12 2007 +0100 randr12: Intermediate commit (using the native nv40 vpll regs). commit a29eca9dec176388b1c4666ad801ae75360a1219 Author: Maarten Maathuis Date: Sat Nov 17 20:08:27 2007 +0100 randr12: Some comment fixes. commit 6f3d335f6e3b9866457730660538c5f073862dfe Author: Maarten Maathuis Date: Sat Nov 17 22:23:32 2007 +0100 randr12: Reinstate m-divider limitations. commit e2b7f57cbe7e1080736e6088d2997cbcf966fc3d Author: Maarten Maathuis Date: Sat Nov 17 18:36:24 2007 +0100 randr12: Some minor changes. commit 2c0c7612bd08938496abb47b34498065e668ec34 Author: Maarten Maathuis Date: Sat Nov 17 15:57:20 2007 +0100 randr12: Change vpll handling, note that it still is a work in progress. commit caec3d1ab69c523b6c0a7e0019d1a9f115cf5da3 Author: Ben Skeggs Date: Sat Nov 17 20:59:25 2007 +1100 EXA 1.4 pixmap hooks (disabled) Really, you don't want to turn this on yet... :) commit b8e7c64476948426d5801367bab5cdf15db5ce84 Author: Ben Skeggs Date: Sat Nov 17 17:17:34 2007 +1100 Add a user callback for when a channel hang is detected. commit 293b32d0f66e965b3a31d54859b91210b3e35b3d Author: Ben Skeggs Date: Sat Nov 17 17:02:23 2007 +1100 Use handles from grobj, instead of hardcoded vals from nv_dma.h commit 84bc37723c2cabe7652050b4cbaf9f5218fdb071 Author: Ben Skeggs Date: Sat Nov 17 16:43:05 2007 +1100 Turn vram/fb handles into "real" grobjs. commit f3cdd5086f410711103c6b3453629d85ef4c2788 Author: Stephane Marchesin Date: Sat Nov 17 01:22:31 2007 +0100 Put back memory barrier and write posting. commit 762f732c7aaa8aa3dd7d54a8734cbcc54cd10494 Author: Stephane Marchesin Date: Fri Nov 16 23:38:49 2007 +0100 Add verbose debugging code to help with fixing push buffer issues. commit c8f7a9fcdcc356b4dc5030112b1532d2fa3eaf0f Author: Stephane Marchesin Date: Fri Nov 16 23:37:10 2007 +0100 Oops. Correct either the header or the packet but not both. commit 5ce573875387490eb7feaa87a3354b888beb4410 Author: Stephane Marchesin Date: Fri Nov 16 23:32:07 2007 +0100 Unmatched OUT_RING(0). commit cc0c1af932a96cec6aabc72cbe9ca508fbc80a36 Author: Stephane Marchesin Date: Fri Nov 16 21:59:53 2007 +0100 fix typo. commit 4b7601c297fefc46adf3bc37a463575d3caafedb Author: Stephane Marchesin Date: Fri Nov 16 21:56:14 2007 +0100 fix 32/64 bit ism. commit bee8bc5ce321245362847253b7ccc7530899e514 Author: Maarten Maathuis Date: Fri Nov 16 21:29:20 2007 +0100 randr12: Minor change. commit 735fae4bb0b92f097665f675ba5127a9bb11d8fa Author: Maarten Maathuis Date: Fri Nov 16 19:19:23 2007 +0100 randr12: That wasn't supposed to end up there ;-) commit 2848c3e7a4d25e5ca311ea1a88458eb2a77976ed Author: Maarten Maathuis Date: Fri Nov 16 19:16:08 2007 +0100 randr12: Disable changing ramdac reg580, until i know why this causes issues. commit 75222fa199f1f5bc1abd66a4e80a446b5d597523 Author: Ben Skeggs Date: Sat Nov 17 15:31:49 2007 +1100 nouveau: fix valgrind complaint commit 1a98f1ae8298ca3b069b146a2866f96e934afb74 Author: Maarten Maathuis Date: Fri Nov 16 17:00:59 2007 +0100 randr12: Restore old timings + misc changes. commit 1b0cd6602cf9d96f41242054efe2f96cc70eaa96 Author: Ben Skeggs Date: Sat Nov 17 09:08:03 2007 +1100 oops, forgot these... commit 9c46ec6833ccfc29e4a67b0ce4226d8b38b772ab Author: Ben Skeggs Date: Sat Nov 17 07:23:41 2007 +1100 Initial hacky relocation stuff. Entire DDX ported across to OUT_RELOCx/OUT_PIXMAPx, workable in it's current state for the current BO backend.. definitely not for TTM yet :) commit ddda33decb42ba2f5f9586e1d5de4533d1d88674 Author: Ben Skeggs Date: Sat Nov 17 06:11:01 2007 +1100 Initial buffer object work. Implemented on top of the current MM interface, and currently used in the exact same way NVAllocate/FreeMemory was used. Can transition to something more ttm-friendly gradually. The "old mm" bo backend is extremely primitive. Buffers can only be created in mappable memory, forcibly pinned, and never moved once they're created. Some of these things could be improved, but probably not much point. commit 9b9d995a517b48cd074030c567f9c78bee19b129 Author: Ben Skeggs Date: Sat Nov 17 03:36:04 2007 +1100 Report engine hangs again, instead of spinning forever. commit 2af4a28ae1df46686e264bcda417a896b7cfa59a Author: Ben Skeggs Date: Fri Nov 16 09:18:33 2007 +1100 Hook up DMA funcs to channels/grobjs etc etc commit 6e3d05e8c60fd7bab371af86151e45eec0a65b3d Author: Ben Skeggs Date: Fri Nov 16 07:08:23 2007 +1100 notifiers.. Lacking timeouts at the moment so if X would've crashed before, it'll spin forever now. commit 020740d92b5d623bee65e598ac60020187011b04 Author: Ben Skeggs Date: Fri Nov 16 06:07:56 2007 +1100 And grobjs. commit 929e2b7d53435d097b07c23ed1d0caaa47924f8a Author: Ben Skeggs Date: Fri Nov 16 05:10:58 2007 +1100 And channels.. commit 22909d96b8ea720169b34326b93c7b29eb3db013 Author: Ben Skeggs Date: Fri Nov 16 04:36:08 2007 +1100 Implement nouveau_device struct. commit b96e813773b0705bbac57f2d64adff3aad845622 Author: Stuart Bennett Date: Fri Nov 16 03:26:56 2007 +0000 Begone, foul g5-bios-hack also, fix the DCB termination test; I'm amazed nothing broke commit 7eee9585fa8e8c45f4ab4712a3b990664203d72b Author: Maarten Maathuis Date: Thu Nov 15 19:33:13 2007 +0100 randr12: Only NV4x have two seperate PVIO ranges. commit 276892b069fd045b20f44d7888a7971371d73ad3 Author: Maarten Maathuis Date: Thu Nov 15 19:27:12 2007 +0100 randr12: Improved values for FP_CONTROL register. commit 4a16f14061c88ed49b05ef8779a2584f5053c3f1 Author: Maarten Maathuis Date: Thu Nov 15 18:44:52 2007 +0100 randr12: Some minor register changes. commit b436a6809c62e0fe0696d2c6bad066c3afcf9166 Author: Arthur Huillet Date: Thu Nov 15 15:01:47 2007 +0100 NV10 EXA: removed left out debug statement commit 98e223ebb01440810e01e902e904524c50b463cb Author: Arthur Huillet Date: Thu Nov 15 12:57:20 2007 +0100 NV1x EXA : refactored A8 + A8 code, enabled on NV2x, fix A8 txfmt for NV2x more compact and more readable A8 + A8 code along with some codestyle fixes now enabling this acceleration on NV2x cards, with the A8 format value hack commit 3cdc4b274f371f1f524d140fddd79dad2987b06c Author: Ben Skeggs Date: Fri Nov 16 03:28:45 2007 +1100 nouveau: fix a host of warnings commit 6eba6c7fab534efd15c8e96daeeb9a33972c2b6d Author: Stuart Bennett Date: Thu Nov 15 02:09:45 2007 +0000 Big endian bios fix commit 69a3a849e65a022609db3a5f33277b744463a6ae Author: Patrice Mandin Date: Wed Nov 14 23:03:06 2007 +0100 nv30exa: set link with image blit commit 2435836202efe7ea42a7bece71f125fb46aac3ba Author: Stuart Bennett Date: Wed Nov 14 19:02:28 2007 +0000 nv_bios indentation commit 7b0ca260f57e92e45d7f48f16642bfcd67b10eaf Author: Stuart Bennett Date: Wed Nov 14 18:47:40 2007 +0000 More code and logging beautification - wrap I/O better Plus some actual fixes commit d00420a1286e368fbc20551cae5260bf65ed1b15 Author: Stuart Bennett Date: Wed Nov 14 19:07:06 2007 +0000 IO flag conditions, beginnings of init_idx_addr_latched plus usual whitespace and pointless renaming commit 4e8af31a89b7d732b52706f87e1dc66e29ab717e Author: Stuart Bennett Date: Wed Nov 14 03:01:27 2007 +0000 More opcodes, and some monstrous reindenting all part of an evil plan to have the most lines in the Xorg log commit 89617cfcdfd1ee19b99888cfbcfec1ee0550d26c Author: Stuart Bennett Date: Wed Nov 14 00:36:02 2007 +0000 Updating some BIOS parser opcodes plus various debug / whitespace fixes commit cc5db05bed630350613c7cbfa418d814ed5a5093 Author: Stuart Bennett Date: Wed Nov 14 19:27:06 2007 +0000 randr12: More DCB abstraction to lessen parsing nastiness for old versions commit d46b61f88225d3e2b28a6c4a4ac4b8a1fe942a39 Author: Stuart Bennett Date: Tue Nov 13 18:24:46 2007 +0000 Gratuitous code renaming, moving + warning fixes for bios commit c87e3570a198b5d69046387d111a2709a571d5e3 Author: Maarten Maathuis Date: Wed Nov 14 22:30:11 2007 +0100 randr12: Reinstate the "magic factor" until a better solution comes along. commit 5b62e77ded9e64d439b70ce0b7dce27a7ae1df4f Author: Arthur Huillet Date: Wed Nov 14 20:54:24 2007 +0100 NV1x EXA : implemented A8 + A8 via a dirty hack it works, but probably needs to be optimized commit 3db89822ba94a94eeb1ab891488d7f203a0dfff8 Author: Maarten Maathuis Date: Wed Nov 14 19:48:53 2007 +0100 randr12: Disable ramdac register 0x900, until i know for certain what it does. commit 842b33e2dc82e70a7da992642de4503d4cb0a1fc Author: Maarten Maathuis Date: Wed Nov 14 16:02:56 2007 +0100 randr12: fix comment typo commit c7fc4b9981bb242830ddb830863fb26301429c74 Author: Maarten Maathuis Date: Wed Nov 14 08:34:44 2007 +0100 randr12: Enable all pll on pre-nv40 and improve usage of ramdac_670 register. commit 992d079d64369a4a8445012b438ec980968c11d8 Author: Maarten Maathuis Date: Tue Nov 13 21:46:23 2007 +0100 NV50: fix stupid type from commit d5dfb82f7f39304eb39dd4b1c34a2a2801d90a25 commit 7ad7b6ad453b6401ef0bf5128f7ac9790df95bb2 Author: Stephane Marchesin Date: Tue Nov 13 21:36:13 2007 +0100 Don't use GART on PPC. Workaround DMA bugs there. commit b451a21f77678b1fb1d31f3df7e3b1aea6984876 Author: Stephane Marchesin Date: Tue Nov 13 20:58:51 2007 +0100 Remove ENABLE_NV30EXA, which is not needed any more. commit 9dc1e1e1fc049c7a535da8e1bc8ce79fd2d620b5 Author: Stephane Marchesin Date: Tue Nov 13 20:54:53 2007 +0100 Enable nv30 exa on PPC. commit 4fb7b608cbdf53084da63526c066eb7f772c6c14 Author: Stephane Marchesin Date: Tue Nov 13 20:53:58 2007 +0100 Fix nv30 exa for big endian commit 875960dacda54268fc1d318995c145b2db09ca5b Author: Maarten Maathuis Date: Tue Nov 13 19:43:41 2007 +0100 randr12: Set a few new registers + misc fixes. commit cf9aaa2b074eca67cf0119172c3d15328418416d Author: Stuart Bennett Date: Mon Nov 12 19:24:34 2007 +0000 Some type / warning fixes for nv_bios.c commit f00f6d1df06d2671255fd988f514a6f6ab0f8b18 Author: Stuart Bennett Date: Sun Nov 11 17:50:55 2007 +0000 Misc bios parsing bits commit fdc7f4a353c4dda07fffd9800b477ae5bc43baac Author: Patrice Mandin Date: Mon Nov 12 23:54:22 2007 +0100 Remove disable switches, big cleanup, requires xorgs server 1.3 again commit e93a5d3abe6d637e00bd9c998e9735c9766eecfb Author: Maarten Maathuis Date: Mon Nov 12 21:05:00 2007 +0100 randr12: Improve vclk setting. - It now considers crosswired TMDS situations. commit d32420c82b1e63bbc84768c92c336391af624952 Author: Maarten Maathuis Date: Mon Nov 12 20:17:04 2007 +0100 randr12: Fix bad comment. commit 8a04babb88111ec8ccec9af56c3591d41afba9b3 Author: Maarten Maathuis Date: Mon Nov 12 20:14:10 2007 +0100 randr12: Some minor changes. commit 821d4b83ed780d9a0a8d950a2595a0e15ef3f103 Author: Maarten Maathuis Date: Mon Nov 12 16:21:14 2007 +0100 randr12: Set SEL_CLK appropriately based on wether a TMDS is crosswired. commit d017ce4879ca755fc6d56f232fe3162864f4b38e Author: Maarten Maathuis Date: Mon Nov 12 10:34:54 2007 +0100 A little code cleanup. commit 16fb5b92dba9a0380d2fdd1ece1b9b0691d79d3a Author: Maarten Maathuis Date: Mon Nov 12 00:17:52 2007 +0100 NV50: Port an LVDS detection fix from nv. commit b01a87f18d122d80fac6daf1dfb1c404d7f3a814 Author: Maarten Maathuis Date: Mon Nov 12 00:03:19 2007 +0100 NV50: Port one of the nv patches. commit f22691661f8b72cedb8aa4fc96b41fcff4171e12 Author: Maarten Maathuis Date: Sun Nov 11 21:53:10 2007 +0100 randr12: Some code cleanup. commit aceceb22775bb039cb0e207f39f7cbd93c2db194 Author: Maarten Maathuis Date: Sun Nov 11 21:32:31 2007 +0100 NV50: Clean up nv50_output.c a bit. - I did not make wrappers for the i2c stuff, since i do not know what that range does, besides i2c. commit a0835f7c64cf5f62626332ccba21cfe436584275 Author: Maarten Maathuis Date: Sun Nov 11 21:17:40 2007 +0100 NV50: cleanup of nv50_sor.c commit f463a7f6213bede18917191546c8cd61cf4612e8 Author: Maarten Maathuis Date: Sun Nov 11 20:51:01 2007 +0100 randr12: Make sure we don't set 2 "special" bits in sel_clk. commit 27cbf73bc572f435870decc2017cbf1c4f38264d Author: Maarten Maathuis Date: Sun Nov 11 19:32:26 2007 +0100 randr12: Overhaul vpll set code + misc fixes. - Hopefully the problematic G70's work again. commit 78e88d1f4e2f058c487978c01e19a828271f3f0b Author: Stuart Bennett Date: Fri Nov 9 03:17:12 2007 +0000 vbios fptable v2 parsing (for BIT biosen). Not that I know how to index it. Plus some fptable v1 fixes, bmp structure length checks, and support for a weird bios version that may be in some gf2go commit 15c771a6b3ecb9b36f9725c518141cf889aa953c Author: Stuart Bennett Date: Fri Nov 9 01:19:04 2007 +0000 G5 6600 DCB improvements, but I'm sure to be some bswaps short This will all become so much nicer when I can do leNN_to_cpu()... commit 9408fcbbbbab80608c8923ab2b7757dfa76b9767 Author: Maarten Maathuis Date: Sat Nov 10 17:02:38 2007 +0100 NV50: Last part of nv50_dac.c commit 85b5e6bfc17c347a9976155a755637f7c8d9304f Author: Maarten Maathuis Date: Sat Nov 10 16:59:49 2007 +0100 NV50: More cleanup (this time nv50_dac.c). commit 23d9f09a4600abf5426cb6d069dc5d9aa876a771 Author: Maarten Maathuis Date: Sat Nov 10 16:32:51 2007 +0100 NV50: That's the initial cleanup for nv50_display.c commit 25cef08b183d6406ce065b2b3cd224dd1840525b Author: Maarten Maathuis Date: Sat Nov 10 16:24:32 2007 +0100 NV50: Should have run make first ;-) commit d5dfb82f7f39304eb39dd4b1c34a2a2801d90a25 Author: Maarten Maathuis Date: Sat Nov 10 16:23:48 2007 +0100 NV50: Even more cleanup. commit 391c498e676752ac6bf03b668a1cb00094c1a049 Author: Maarten Maathuis Date: Sat Nov 10 16:19:32 2007 +0100 NV50: More cleanup, small commits to make bisecting easier. commit 59788f9d4e6c264a6b666918989ad6b778026bd9 Author: Maarten Maathuis Date: Sat Nov 10 16:05:42 2007 +0100 NV50: Some initial cleanup. commit 1a7d7ccb4c12f6a10aa5e8b41daee1aae52efa8a Author: Maarten Maathuis Date: Sat Nov 10 15:39:04 2007 +0100 NV50: Another wrapper. commit 3ca3170c8bbd758da81a1bc5b5a84cf3ca642c07 Author: Maarten Maathuis Date: Sat Nov 10 15:29:13 2007 +0100 NV50: A new wrapper + a few functions renamed. - I'm trying to clean up the code a bit, but lack of the hardware prevents me from testing it. commit 77dc99b2621523e20a956a8eaa01a100c992c458 Author: Maarten Maathuis Date: Sat Nov 10 00:35:04 2007 +0100 randr12: This may break stuff for some g70 cards, if it does, then please scream. - I hope i've got most situations covered. - If there are issues getting the second head to work on nv4x cards, then please tell. - nv4x is geforce 6 and 7 series for those who do not know. commit c169480b0bb177e8c5efb292d38c55554dcdfcdd Author: Maarten Maathuis Date: Fri Nov 9 20:41:48 2007 +0100 randr12: Disable load detect again, until we can identify it from a DVI monitor. commit 7237a7014b426acc4857d32967e0f10974877819 Author: Maarten Maathuis Date: Fri Nov 9 20:40:46 2007 +0100 randr12: Improve detection of DVI-D/DVI-A pairs (for naming). commit a8125c458fa53544625da2071a69e3fd27d7c084 Author: Stuart Bennett Date: Fri Nov 9 19:27:37 2007 +0000 randr12: Revert "randr12: lose ffs wrapper", it's wrong commit d83cb471cfcc18973eb4a5f319bc17a06e0a883f Author: Stuart Bennett Date: Fri Nov 9 19:02:00 2007 +0000 randr12: lose ffs wrapper commit dedf68e10f4b0cde6f9c49d60df737ed7b4148c0 Author: Stephane Marchesin Date: Wed Oct 31 02:36:41 2007 +0100 More nv30 exa cleaning up. commit d3679e8a5c0ce54ee3ef4de15be5a1fcd353df8e Author: Maarten Maathuis Date: Fri Nov 9 18:44:37 2007 +0100 randr12: Do not mess with ramdac register 580 until it's proven to be neccesary. - I cannot seem to find out what the conditions are to change this register, except that it's related to VCLK ratio DB1. commit a49d51c638c2004641e58dc0061652553e9a6751 Author: Maarten Maathuis Date: Fri Nov 9 18:31:02 2007 +0100 randr12: Fix vertical scaling. commit 2e6f5e18231a327cac7de4a927435585d1eadcee Author: Patrice Mandin Date: Fri Nov 9 18:13:43 2007 +0100 oops, trailing whitespace commit 596f4e6a78900f3cbb3beb4c99da7606dc630179 Author: Patrice Mandin Date: Fri Nov 9 18:11:25 2007 +0100 Also disable nv40exa if nv30exa disabled commit d9f80b9d5f4ae1c00e79b9e903c2fc0c23b37a13 Author: Patrice Mandin Date: Fri Nov 9 18:10:53 2007 +0100 Reading DFP tables need randr1.2 commit 50aaccb5e0d3b9a978701c55ebe6545a6f7b1456 Author: Stuart Bennett Date: Thu Nov 8 18:59:50 2007 +0000 randr12: invert fpScaler to regain original meaning (see man page) commit 3f6db3ac15b51a58353396fce2126a369b4cfd89 Author: Stuart Bennett Date: Thu Nov 8 20:30:28 2007 +0000 randr12: Do scaling / native fixup in the fixup function Nuke the LVDS specific fixup code Then use adjusted_mode accordingly commit 51a874a59d82678bbb790b708f9ba62985d99344 Author: Stuart Bennett Date: Wed Nov 7 18:37:57 2007 +0000 randr12: rename DIGITAL and PANEL to TMDS and LVDS Following on from earlier renaming, this is less confusing, at least to me. commit 61c92f10e1182403fc6fc8a666ed3d8b14795481 Author: Stuart Bennett Date: Thu Nov 8 17:00:44 2007 +0000 randr12: blank screen before we're ready to show it commit da64328dd7be7f0e7ee1dd0dd774174fc126948b Author: Maarten Maathuis Date: Thu Nov 8 20:11:25 2007 +0100 randr12: Some outputs are only valid on secondary output. commit fe3d49ccb24ff20fba79ee97cceba64850d9387f Author: Maarten Maathuis Date: Thu Nov 8 19:20:41 2007 +0100 randr12: Improve output naming scheme. commit 42542b36d771142d38f72b3365da8b53e9d25c55 Author: Maarten Maathuis Date: Thu Nov 8 19:13:03 2007 +0100 randr12: Add ramdac assignment code to the lvds dpms function. commit 2f1bf8138ba970ad18afe1ba9ee10228ea213926 Author: Maarten Maathuis Date: Thu Nov 8 18:42:35 2007 +0100 randr12: Misc fixes. commit 8b733ab61e0b9eb375783e986de776eef5fd49ff Author: Ben Skeggs Date: Fri Nov 9 03:29:21 2007 +1100 get rid of ALLOCATE_LOCAL etc. commit bfb78d2090ee5c189cf00e6af5107a756e864e98 Author: Maarten Maathuis Date: Thu Nov 8 00:20:53 2007 +0100 randr12: It seems the situation was a bit easier to handle, luckily. - I've tied ramdac and crtc number together. - Switching crtc's doesn't cause a problem anymore (even when crtc0 is not in use). commit d56e6e498ed9acc35bfa540881243acf03981571 Author: Maarten Maathuis Date: Wed Nov 7 22:25:40 2007 +0100 randr12: Intermediate commit. commit f13659a8c8e855dc0b871173ccfdd0b70236be71 Author: Arthur Huillet Date: Wed Nov 7 23:03:54 2007 +0100 NV10EXA: added support for R5G6B5 as source and destination (tested only with rendercheck) added A8 + A8 via ARGB + ARGB hack, disabled by default because it cannot work updated instrumentation to dump pixmap sizes and repeat flag commit 3d671bf3b06e64b49254db666980be3a3b3652cc Author: Stuart Bennett Date: Wed Nov 7 15:08:48 2007 +0000 randr12: remove some duplication and reduce mem leaks commit cdbec606e4ec398d6bef87d635499100559e3a19 Author: Stuart Bennett Date: Wed Nov 7 14:54:18 2007 +0000 randr12: refactor ddc stuff for convenience commit ed8473b228579024a4fdc9c2a9ecf4cb71135378 Author: Stuart Bennett Date: Wed Nov 7 14:33:50 2007 +0000 randr12: micro-optimization on use of "or" commit f6d0b446eda687bb55649599e1aedfa231feaaa9 Author: Stuart Bennett Date: Tue Nov 6 21:20:10 2007 +0000 randr12: LVDS warning commit 62f8fed79f1617ffd0289123045fda0a3c0e92b2 Author: Stuart Bennett Date: Tue Nov 6 01:29:33 2007 +0000 randr12: Use NV_RAMDAC_PLL_SELECT_PLL_SOURCE_ALL for LVDS Using only VPLL seems to be broken for LVDS. Traces show consistent use of ALL. commit 0b958dc66a5533a7db61b7b2f456df876e9905ff Author: Maarten Maathuis Date: Wed Nov 7 09:33:40 2007 +0100 randr12: Also save flatpanel regs on analog monitors. commit c8ac3f0c7cfd6eca85f332e11e280f715e80283e Author: Stuart Bennett Date: Tue Nov 6 21:09:51 2007 +0000 Various minor fixes Now that ramdac selection uses sensible numbers, it turns out writing to TMDS regs is a bad move on LVDS. Also, change FP_CONTROL handling a bit for LVDS (bit31 needs preserving) commit d7be5bdc27fee0758df33feb3a331c9c79dd94e0 Author: Stuart Bennett Date: Tue Nov 6 19:53:08 2007 +0000 Start using OUTPUT_PANEL where appropriate commit f1160ac702a251708f2385b78c1657f95c2916ab Author: Stuart Bennett Date: Thu Nov 1 00:24:13 2007 +0000 Beautify DCB 1.2 weirdness, hopefully fixup G5 and use dcb_table more simply commit 38829fa5cdac1469a6a71a092a42885ea048a1ba Author: Stuart Bennett Date: Tue Nov 6 19:41:47 2007 +0000 Implement lvds_output_{get_modes, mode_valid, mode_fixup} commit 29c578bfe9415aa86910cf6d5cd44787b4fdf44d Author: Stuart Bennett Date: Fri Oct 26 03:01:17 2007 +0100 Reindentation, renaming, adding debug, and assume LVDS always connected commit 7aeae6cdc99ab633361f107752ef1bfa3e0492e0 Author: Stuart Bennett Date: Wed Oct 31 17:29:16 2007 +0000 LVDS VBIOS FP mode finding commit cd806f92e29573ea968ab2fddb454eb1513e37dd Author: Maarten Maathuis Date: Wed Nov 7 00:16:33 2007 +0100 randr12: Fix ugly alligment. commit 88faf35179b9af8060c35a7a95e9a6baaae552be Author: Maarten Maathuis Date: Wed Nov 7 00:11:51 2007 +0100 randr12: Improve hotplugging of outputs. commit 4aa3acbd5410c8dda57a483cf7967258440888dc Author: Peter Winters Date: Tue Nov 6 23:40:07 2007 +0100 NV10 EXA: Implement a8 1x1 repeat commit 524e555c468fbab32b515ecd2c1e9cccf6c48443 Author: Peter Winters Date: Tue Nov 6 23:29:03 2007 +0100 NV10 EXA: setup viewport like nv40 exa commit 2f2298f0ae3777c775b3ab81356adebf4f52ed77 Author: Maarten Maathuis Date: Tue Nov 6 22:15:20 2007 +0100 randr12: Readd crt load detect + misc changes + restrictions (see full log) - Crt load detect has been readded, but only for the primary output (the other gives false positives). - Misc changes to ramdac management. - Until i know how to trigger a full mode change, i cannot allow adding an output which requires ramdac0 during runtime. commit a6244c25a5c7efc633c74f506ca121e10a5642c0 Author: Maarten Maathuis Date: Tue Nov 6 16:11:43 2007 +0100 randr12: Reasonably complete TMDS programming, see notes. - Please file a bug and make a mmio-trace when it fails for you. - I can now hotplug TMDS, so that makes both types hotpluggable on nv4x. - I have no clue what happens on pre-nv40 hardware, so please try. commit 5f6912f083048f01a33582d45bc6b22f0ac27d4e Author: Maarten Maathuis Date: Tue Nov 6 10:56:22 2007 +0100 randr12: Associate VPLL's with ramdac instead of crtc. commit 8241710c94f6df0bf683bc3c93f7ea1ca14d118c Author: Maarten Maathuis Date: Tue Nov 6 10:34:56 2007 +0100 randr12: Put TEST_CONTROL into neutral position. commit 19533d8ba549965dedd9083330b217270efaa49b Author: Maarten Maathuis Date: Mon Nov 5 23:32:16 2007 +0100 NV50: Don't hit pre-NV50 codepath. commit 5ca10da0c7dd2fd689cc4369e37ed385a0c10d21 Author: Maarten Maathuis Date: Mon Nov 5 21:28:22 2007 +0100 randr12: Remove incorrect (and hopefully redundant) output initialisation check. commit fcacad59d9233a66111d1c434e14cc4b2a08961e Author: Maarten Maathuis Date: Mon Nov 5 21:18:13 2007 +0100 randr12: Do not remove any bits from crtc register 580. commit e58c6735c73cc3a94a7a139e235b1dff9220e507 Author: Maarten Maathuis Date: Mon Nov 5 20:30:41 2007 +0100 randr12: Only use VPLL as timing source. commit 1071aeef24b349bac08a2ac091733c23cad1cb44 Author: Maarten Maathuis Date: Mon Nov 5 20:04:26 2007 +0100 randr12: Only enable crtc at the very last stage, should avoid mode setting "blinking". commit 1ac7798bdec75d9336afd1cfbe7fa177f5fe1465 Author: Maarten Maathuis Date: Mon Nov 5 10:03:15 2007 +0100 randr12: Add a native mode for TMDS and make that preferred + some ddc related fixes. commit bfb75679e504b335be0de4384830cc8129f92c1b Author: Ben Skeggs Date: Mon Nov 5 11:44:58 2007 +1100 Fix a thinko from commit 62294d9be8ec6f1159e3c2ad273649f937b7aa7e. commit bf8a2dfa7f83956d100316ed7450669795ea47d2 Author: Maarten Maathuis Date: Sat Nov 3 22:03:18 2007 +0100 randr12; Forgot a small thing. commit 19b0971d0c1d03896bfaee2b833194ef1e4d7566 Author: Maarten Maathuis Date: Sat Nov 3 21:54:48 2007 +0100 randr12: A legitimate DPMS call could reset the ramdac and effectively disable the mouse. commit a29839c718fd6bf3003081299017536dd9f8223e Author: Maarten Maathuis Date: Sat Nov 3 10:00:06 2007 +0100 randr12: Hopefully improve the native flatpanel mode finder. commit bd20ff5b8c9467ca913c00d3ec946e7e975ad3d4 Author: Maarten Maathuis Date: Fri Nov 2 23:17:16 2007 +0100 randr12: We cannot reset ramdacs during detect, there may not be a modesetting after it. commit 7054de29c589a7be0a6b027f3067ae2c02e2fc45 Author: Maarten Maathuis Date: Fri Nov 2 21:44:40 2007 +0100 randr12: Futher refine crtc timings, hoping to solve the "pink line" issue. commit 39ced4abb536993249e55a72eceeba26d577724c Author: Maarten Maathuis Date: Thu Nov 1 17:54:26 2007 +0100 randr12: Improved ramdac choosing, based on bios information (or value). commit 28ba9ed765d9956b2f07c6a405fca675a71012db Author: Maarten Maathuis Date: Thu Nov 1 17:01:53 2007 +0100 randr12: Remove redundant output setup + don't print full edid. commit 609f7b9c2962ccf04861d2164a0ff12c58e84010 Author: Maarten Maathuis Date: Thu Nov 1 13:00:45 2007 +0100 randr12: Cursor fixes(probably only affects nv4x). commit 6945dfdc5e6b2540432805e845cb8540dc00d326 Author: Maarten Maathuis Date: Thu Nov 1 11:10:24 2007 +0100 randr12: Improve analog monitor allignment + misc fixes. commit 5bd8ba52788b3b3b8f91ba59c29e154e38482481 Author: Ben Skeggs Date: Thu Nov 1 18:35:33 2007 +1100 nv40: what can I say? oops! commit f59e596bcd90ef824cd41e0c37952e574d6914bb Author: Ben Skeggs Date: Thu Nov 1 18:17:20 2007 +1100 nv40: completely untested fix for composite on ppc Thanks go to ps3rsx guys for finding the issue. commit 59c4fdb650ff2e6b6948d1bdd6bb22aa94195a32 Author: Maarten Maathuis Date: Wed Oct 31 22:59:54 2007 +0100 randr12: Some misc cleanup to make malc0's patches work. commit f165d4f2ca90916b1334cdc18d62b82ea71d9f62 Author: Maarten Maathuis Date: Wed Oct 31 21:30:36 2007 +0100 randr12: The "easy" TMDS registers, please report regressions. commit 860c4bdd38fd259ae51e32e4873a2aa8b1e6883e Author: Maarten Maathuis Date: Wed Oct 31 19:00:28 2007 +0100 randr12: Misc register fixes. commit d758e8f4c1a7d4effe1298a0a41d4e0b96496ab9 Author: Maarten Maathuis Date: Wed Oct 31 13:22:29 2007 +0100 randr12: Some changes to VCLK ratio handling. commit 899559921b0e46db010fa1e771203c2edefb7ade Author: Maarten Maathuis Date: Wed Oct 31 09:18:59 2007 +0100 randr12: some blob copying commit b5ecadb73335d934a8cb1c106983d219c9d8d399 Author: Stephane Marchesin Date: Wed Oct 31 02:09:08 2007 +0100 Fix bugs in nv30 exa (kde text seems back) commit f7b553a87e7f67138e06e74877145a1f83e9d188 Author: Peter Winters Date: Tue Oct 30 23:04:28 2007 +0100 NV10 EXA: implement repeat for 1x1 textures commit bf7b0231db1f7e45cee60d7d2e04b1b006aec2b0 Author: Peter Winters Date: Sun Oct 28 23:52:22 2007 +0100 NV10 EXA: Fix viewport setup commit f8f9c8789b89a02886702c46c5feafec169ae78a Author: Maarten Maathuis Date: Tue Oct 30 21:00:54 2007 +0100 randr12: Flatpanel scaling is finally working, read full message. - The option FPScale is now obeyed and will cause scaling to happen in the monitor. - The default is scaling is using the GPU. - When the aspect ratio is very different(>0.10 diff), it will obey aspect ratio and create bands around it. commit e73aa148d965abbf73392c6ffef3993dc26c31fd Author: Maarten Maathuis Date: Tue Oct 30 13:54:25 2007 +0100 randr12: Some copyright stuff. commit c1508e1448e3822e8b6bb2604c09a9d766a64a93 Author: Maarten Maathuis Date: Tue Oct 30 13:44:44 2007 +0100 randr12: Disable some panel scaling stuff, because it is broken. commit 3bf8110b61ef854af803a45f0faf1eaffbbcfac9 Author: Maarten Maathuis Date: Tue Oct 30 11:44:58 2007 +0100 randr12: Lots of misc fixes. - This does not fix the issue with -hsync, +vsync modelines (or the other way around) yet. - There are two PVIO ranges, i'm surprised noone noticed this. - Some misc fixes. commit 894f9aacce3d685b811f8961275a9f225b964159 Author: Stephane Marchesin Date: Tue Oct 30 01:49:38 2007 +0100 Disable nv30 exa no big endian until we fix the endianness bugs related to the 3D engine. commit 482cbcb9efdfbdd4bbe998c09f7d29033aeca09b Author: Stephane Marchesin Date: Tue Oct 30 01:37:45 2007 +0100 Use the new header with license. commit a9908dbb70df0d0abb586b9774efdc10adf4d74f Author: Stephane Marchesin Date: Mon Oct 29 23:00:14 2007 +0100 More copyrights I remember... commit 67e142394edcb553a40c6c8b0ef091bd4dad2bdd Author: Stephane Marchesin Date: Mon Oct 29 22:57:30 2007 +0100 Add some copyrights... not all files are covered yet, but I did the ones I recalled. commit f75e36a901fd47bbd9164242c408e9f8b0e03e2c Author: Maarten Maathuis Date: Mon Oct 29 18:37:34 2007 +0100 randr12: My suspicion was incorrect, i2c buses are swapped for all nv4x it seems. commit e741ac76ac45e8ea959792810670abdf2afbc6bd Author: Maarten Maathuis Date: Mon Oct 29 13:40:30 2007 +0100 randr12: Show NV_RAMDAC_FP_DEBUG_0 of both ramdac's when output is refused. commit c53754162087a7b66d40b7c3982cdc5b6d160ea1 Author: Maarten Maathuis Date: Mon Oct 29 13:34:20 2007 +0100 randr12: Minor change, turning on bit 18 of NV_RAMDAC_SEL_CLK. commit fef872bd999b430a41bdfae8d408f8dfed0010a2 Author: Stephane Marchesin Date: Fri Oct 26 15:50:40 2007 +0200 nv30 exa : add A8 dst (requires new drm), add some dst formats, handle 1x1 repeat, enable by default. commit 1d7354cbb5875eb13ed88e6aaab69aff615f82b2 Author: Stephane Marchesin Date: Fri Oct 26 04:37:51 2007 +0200 Fix nv30 exa. commit 2cd3d47713cf3eb0d36124902a2c66b689acba51 Author: Arthur Huillet Date: Thu Oct 25 16:55:18 2007 +0200 s/#define ABC ;/#define ABC do { ; } while(0);/ commit 228b91d3da445fc58bfe6b13e792bbdff3728301 Author: Arthur Huillet Date: Thu Oct 25 16:40:34 2007 +0200 NV10 EXA: implemented masking via register combiners and added (disabled by default) statistics displaying masking works for ARGB, XRGB (it's a nop), A8 - no component alpha for now, but it will come soon hopefully commit 7d77ab0692126cea9248b7ee61b001e138b4e47c Author: Arthur Huillet Date: Thu Oct 25 10:52:59 2007 +0200 NV10 EXA: fixed A8 as pointed out by p0g commit cdb54271837564bb4a5afd2dc4cf7e7169138975 Author: Arthur Huillet Date: Thu Oct 25 10:38:42 2007 +0200 NV10 EXA: added support for A8 as source commit 220acbe07e84015e489257a9b9dae8e8f1be8268 Author: Peter Winters Date: Thu Oct 25 10:03:39 2007 +0200 NV10 EXA: use proper XRGB format and use correct RC setup commit 6034387ea96816d34b627c306998342136ecb01b Author: Peter Winters Date: Thu Oct 25 09:59:01 2007 +0200 NV10 EXA: always use an even width for NPOT_SIZE commit f7f17b789e89aadafa2734cba0f4464c5f317a68 Author: Jeremy Kolb Date: Wed Oct 24 19:34:49 2007 -0400 nv30: Fix some corruption. Give us some semblance of icons (still messed up though) commit bafa34a7bd7a9136a95c8ced25c5b80556c78c0c Author: Maarten Maathuis Date: Wed Oct 24 20:28:46 2007 +0200 Fix a few NV_IMAGE_BLIT offsets. commit 09f4b66d35543037c4f50910d0265751dded66c0 Author: Arthur Huillet Date: Wed Oct 24 10:40:17 2007 +0200 NV10EXA : enabled by default for NV1x. Waiting for pq before doing the same for NV2x. commit 6c978164a212ddf4f60f82cdc72b11ebbc96efbb Author: Arthur Huillet Date: Wed Oct 24 09:37:34 2007 +0200 Xv: disabled YV12 overlay for NV20 chipsets that do not seem to have it commit 9f48bd410f8cf9aa700e03db807cef2e7cc07e34 Author: Maarten Maathuis Date: Wed Oct 24 09:08:41 2007 +0200 randr12: The last step to make lower flatpanel resolutions working. - Note: the previous randr12 commit also contained some fixes in this area. commit 2bf8bbd1764979d194ff2dbac4a6529cbcbdbc1d Author: Maarten Maathuis Date: Wed Oct 24 00:00:59 2007 +0200 randr12: Misc changes. commit 5841664c82126058e582f215af2323cc80a6150d Author: Arthur Huillet Date: Tue Oct 23 22:53:46 2007 +0200 x8r8g8b8 now seems to work (it passes rendercheck) with format 0x380 commit 27a713057f0fd2d3c8a77f5eff86393059b60511 Author: Arthur Huillet Date: Tue Oct 23 22:53:21 2007 +0200 Remove NV10 texture formats that are all wrong. commit 78a0d5a42f96816889f1c9294f11c637dfcba486 Author: Arthur Huillet Date: Tue Oct 23 19:12:19 2007 +0200 NV10 EXA: A8R8G8B8 without mask works with rendercheck now commit 7543e65cecab510f6bea8b6efc5cdf3cc9d261ae Author: Maarten Maathuis Date: Tue Oct 23 18:41:38 2007 +0200 randr12: actually add scaling factor's - This was forgotten when i first added this from the haiku driver. commit a11faa794c5dd24cd74d949006c8e86c6c3f0310 Author: Maarten Maathuis Date: Tue Oct 23 16:22:56 2007 +0200 randr12: Add a few debug statements that should explain why an output is refused. commit 2d842c39bf210b4b8294a447ec9ac194ec3e2e47 Author: Maarten Maathuis Date: Tue Oct 23 16:19:10 2007 +0200 randr12: Check if output is needed before creating it. - This hopefully fixes a problem some NV30 people have. commit 5c884a188296c9a026f110f272dff5d88d58c0b6 Author: Maarten Maathuis Date: Tue Oct 23 15:47:49 2007 +0200 Revert a G70 workaround, this may BREAK your setup. - Please report if you have issues, but be prepared to help out to find a real fix. commit 0fb93b45378c9d0fbee9bb96bd60d7a995c667b9 Author: Arthur Huillet Date: Mon Oct 22 19:02:17 2007 +0200 added (disabled) NV10 EXA hooks commit 78af60e798f5b91cc128cd2f84ddae7d0a1523cd Author: Arthur Huillet Date: Mon Oct 22 19:00:20 2007 +0200 added NV10 EXA functions to proto header commit cf053adacabaee887ecedaa9967b07b3185095b5 Author: Peter Winters Date: Mon Oct 22 17:04:23 2007 +0200 Fix some blending stuff for NV10 EXA commit b0605fbeef0765e39554a15ea9f871c19258f72c Author: Peter Winters Date: Mon Oct 22 17:01:26 2007 +0200 Add basic RC setup for NV10 EXA commit 8dea36f6533c5fc35dcb3c24e2fe0c1d009b6693 Author: Peter Winters Date: Mon Oct 22 16:50:47 2007 +0200 Fix NV10 EXA transform commit b9f97583979d7dbbf0058de9f807a97812362c71 Author: Peter Winters Date: Mon Oct 22 16:48:53 2007 +0200 Fix NV10 EXA list of supported formats commit 3dc9778902d9412c469d79e3d437838a6c9da7a5 Author: Peter Winters Date: Mon Oct 22 16:44:08 2007 +0200 Various NV10 EXA fixes commit 391e2dd1216f598538524fdc52a14bfdd4451567 Author: Ben Skeggs Date: Mon Oct 22 22:48:13 2007 +1100 Fix bad s/ commit 162edc70769b24b39f432cb79f5959eff363c564 Author: Pekka Paalanen Date: Sun Oct 21 19:55:41 2007 +0300 Revert "EXA: now caching BLIT_OPERATION and RECT_OPERATION..." This reverts commit 6d8caf5e0dd915809152c52c2c56a39d76e2ed8c. Conflicts: src/nv_exa.c The above mentioned commit broke EXA copy and solid operations on nv20 after display mode change. Triggered by running freedroid in fullscreen. (Not freedroidRPG) commit cc04b651348768dc214f59211ba396343aaa6a17 Author: Maarten Maathuis Date: Sat Oct 20 20:30:02 2007 +0200 Add back comment. commit 6fd262027c74d5008e484bb5f09edbf5f657470b Author: Maarten Maathuis Date: Sat Oct 20 00:26:02 2007 +0200 randr12: Fix critical bug and minor change. - The previous code could allow the TMDS[0x4] register of both heads to be set to 0x88. - This caused problems and freaked out my monitor and scared me as well :-( - Until further notice, the usage of this swap bit is restricted to very specific situations. commit 377f69172b4935372538d7bbf26852bf8a1fe1c4 Author: Maarten Maathuis Date: Fri Oct 19 20:57:58 2007 +0200 randr12: Some changes to crtc regs. commit 85dac1041b38127d41832a6a322d01f87d70f28f Author: Maarten Maathuis Date: Fri Oct 19 08:06:33 2007 +0200 randr12: Some changes to output detection. - I'm aware that we still can't fully program modes. commit 8320f4f61ca72ee0101c1d552ea3ef28e573d21d Author: Stephane Marchesin Date: Thu Oct 18 01:56:17 2007 +0200 Remove xaa includes. commit 86855f03945d3bad90da0b28311bece484cbfce7 Author: Stephane Marchesin Date: Thu Oct 18 01:55:06 2007 +0200 Handle -minline-all-stringops properly commit 53ee9726eeda8cf844d32a9563c82b7549ba6c03 Author: Ben Skeggs Date: Wed Oct 17 23:28:50 2007 +1100 re-align nv40exa after ring macro changes commit a5c4786aaeadce6103fcc9b3a6f4e6f25a66730f Author: Ben Skeggs Date: Wed Oct 17 23:22:05 2007 +1100 Switch to *_RING instead of NVDma* commit 0d1835d67e38ca12347a7965ac43fbfc29063b87 Author: Ben Skeggs Date: Wed Oct 17 16:29:01 2007 +1100 Switch to header generated from XML + other cleanups. - Renamed object header to nouveau_class.h, so it's not confused with mmio - Removed usage of method defines in nv_dma.h - Removed 2D engine EXA composite hook, it was broken, useless and soon to be obsoleted by card-specific versions. - Use names in a few places that magic values were previously used. commit b36fbf174849b04928efda2909c461b6c1688cdc Author: Dave Airlie Date: Tue Oct 16 09:28:58 2007 +1000 nouveau: missing include commit 8425d93f7f932281a1b9b420e676acba2a2b5ecd Author: Stephane Marchesin Date: Sun Oct 14 17:10:59 2007 +0200 more changes to nv30 exa... displays the pictures at their correct postition and size but doesn't obey the blending parameters (i.e. no blending takes place). commit 212a4cd8884ff9276f64bdd0a0115782d146e36a Author: Maarten Maathuis Date: Sat Oct 13 23:02:27 2007 +0200 randr12: Some fallback defaults for dual-dvi cards, please submit dumps when you can. commit 6d8caf5e0dd915809152c52c2c56a39d76e2ed8c Author: Arthur Huillet Date: Sat Oct 13 22:28:39 2007 +0200 EXA: now caching BLIT_OPERATION and RECT_OPERATION (0x2FC) to limit the number of IRQs on NV04 commit ceaf8df424651e0f20d63f817864f3e8657f2c21 Author: Maarten Maathuis Date: Sat Oct 13 21:45:50 2007 +0200 randr12: Revert a small unnecesary change. commit 7171acbe7f174dcbe8c28c7f1fcb7481f2fafd90 Author: Maarten Maathuis Date: Sat Oct 13 21:33:07 2007 +0200 randr12: Hopefully fix panel size detection and allow negative hsync/vsync polarities. commit be08f09ad1ba6aeebf4491727052d246d5568fd2 Author: Maarten Maathuis Date: Sat Oct 13 17:26:32 2007 +0200 randr12: Some debug stuff. commit 418e6117a25e51d5b0dbcd87c17f78f9b04fa588 Author: Maarten Maathuis Date: Sat Oct 13 12:52:10 2007 +0200 randr12: Remove a double reg and misc changes. commit e30e21ed0ee8b1bd112780badc933dc4552a2e81 Author: Maarten Maathuis Date: Fri Oct 12 19:49:32 2007 +0200 randr12: Some misc changes. commit 9425f7a3ea2d80f4df79239e1ca8000bd729c772 Author: Jeremy Kolb Date: Thu Oct 11 20:32:47 2007 -0400 Remove division in NV30EXATransformCoord. We want coords between 0 and texture width, height. commit 879e653867552f6bb595160670c8325bcb5a0d3b Author: Maarten Maathuis Date: Wed Oct 10 21:40:13 2007 +0200 randr12: Misc fix. commit 99dd9da140a5750b7c4d6030a0e8e1f7fca44033 Author: Maarten Maathuis Date: Wed Oct 10 20:08:28 2007 +0200 randr12: Fix switch mode function, so fullscreen apps don't screw up your screen by definition ;-) commit 0c80565e2cb7fa5ff359f57cc3d7016a78a43ac2 Author: Stephane Marchesin Date: Wed Oct 10 14:43:34 2007 +0200 Oops. commit 761ef4bd32f42fb77a3e48985fd6dda81aa081f5 Author: Stephane Marchesin Date: Wed Oct 10 14:42:46 2007 +0200 Try to do something for our desastrous UTS/DFS performance. My PCI card is really hurting. commit 254f9b075034c86e5936954b52f499d573880039 Author: Stephane Marchesin Date: Wed Oct 10 02:34:06 2007 +0200 Still more work on nv30 exa... now starts but nothing works. commit 79dc3ad2c89eef74596a4c8e5714c2c661f56fee Author: Stephane Marchesin Date: Wed Oct 10 00:48:46 2007 +0200 Don't swap the registers from user space. This is very wrong, and the drm will handle that soon. commit 2c08930f0b2bf06282976d6a357daf7f45405cdc Author: Stephane Marchesin Date: Wed Oct 10 00:48:06 2007 +0200 Revert back to the other shaders. The terminator instruction doesn't seem to help, and breaks the A8 hack. commit 90d2457125b059916f9b9dd5ddb7cec73a554c55 Author: Stephane Marchesin Date: Tue Oct 9 04:38:29 2007 +0200 Cleanup some nv30 exa issues, add debbuging info to the composite hook. commit e184fc802c7f9103bbc8ee8c036cfe5a9ddd9513 Author: Stephane Marchesin Date: Tue Oct 9 03:28:39 2007 +0200 Some fixes to nv30_exa. Now goes through a couple of composite() calls without crashing. commit 708f28dc8175375713cd9ae4d07b2cfcea3b106c Author: Stephane Marchesin Date: Tue Oct 9 03:28:11 2007 +0200 Use terminators on the nv30/40 shaders. commit 43d5f747103721b3e0ccf4fe73494729ed34986c Author: Maarten Maathuis Date: Mon Oct 8 19:53:56 2007 +0200 randr12: Small changes makes finding regressions easy ;-) commit 62294d9be8ec6f1159e3c2ad273649f937b7aa7e Author: Maarten Maathuis Date: Sat Oct 6 19:04:51 2007 +0200 EXA: Starting from version 2.4 we can't use devPrivate.ptr anymore. commit 721de8da8fccd6f7b6e5a3044ce82616cdb689e8 Author: Stephane Marchesin Date: Fri Oct 5 23:50:18 2007 +0200 some more work on nv30 exa... commit 80bcbf493b6b2ad927c7a3826cc6e5fa46bca76e Author: Maarten Maathuis Date: Fri Oct 5 22:29:07 2007 +0200 randr12: Misc changes. commit 63ad301baab5803329ba0f192f12c917b435594e Author: Stephane Marchesin Date: Fri Oct 5 17:20:05 2007 +0200 mandatory oops commit. commit 3773e0e5045a6c347bf26eff71e6bdd4c592cebc Author: Stephane Marchesin Date: Fri Oct 5 17:18:40 2007 +0200 Split nv30 exa and nv40 exa. commit 37900537c0f8b8dfa3dc80300d6809f1f4ac9423 Author: Jeremy Kolb Date: Thu Oct 4 23:15:38 2007 -0400 NV30 texture changes. Commented out table that appears to work for nv35 at least. commit 44eb015e88caba82c8d84fee4ea71768c9a6b2a3 Author: Jeremy Kolb Date: Thu Oct 4 20:37:35 2007 -0400 Fix NV30 arch check. commit 5a76e5a751cd66021565ab92b2fc3c61204c7d73 Author: Stephane Marchesin Date: Thu Oct 4 23:46:43 2007 +0200 fix nv30_exa for nv40. commit d7b767fc951287a1c87965db3c236e05cc94d8f6 Author: Maarten Maathuis Date: Thu Oct 4 21:49:33 2007 +0200 NV50: Fix a minor mistake. commit 926e887a4b374768648fe772b1b3d7730096e45f Author: Maarten Maathuis Date: Wed Oct 3 22:57:56 2007 +0200 randr12: Some reindenting. commit 7ee3f670077641e14a0ff024443805564d5be599 Author: Patrice Mandin Date: Thu Oct 4 19:54:40 2007 +0200 nv10exa: init link between tcl and image blit for >=nv11 commit 6510e75ada6fb921e417588d98afdc58b2c14972 Author: Jeremy Kolb Date: Wed Oct 3 23:34:23 2007 -0400 nv30_exa: send down pitch correctly commit b7fc7b63eec4a5e23879120284c882e19e095471 Author: Jeremy Kolb Date: Wed Oct 3 20:54:28 2007 -0400 Fill in some regs. commit 46facb7c29d2737f1cc414655de8e09ee0aea22f Author: Maarten Maathuis Date: Wed Oct 3 22:16:13 2007 +0200 randr12: Actually borrow some timing stuff from Haiku correctly ;-) + new crtc reg commit 9d6b3216ed519e89386480d04070b1c1e4702921 Author: Matthieu Castet Date: Wed Oct 3 21:21:41 2007 +0200 abort on Init table command not found when parsing bios commit b6351c0efa3629a448557fc7e597ba14fbf057fb Author: Maarten Maathuis Date: Wed Oct 3 19:54:40 2007 +0200 NV50: Fix small mistake. commit f00ea962e549934965100dc6d2806709129995e8 Author: Maarten Maathuis Date: Wed Oct 3 19:03:38 2007 +0200 randr12 + NV50: Misc changes. - Switched everything back to head variable instead of pcio. - Removed ugly C() macro for NV50. - Probably some other stuff too. - Please test NV5x users ;-) commit 5d7f06c2a205004b78692b4dfad477ade3947fd5 Author: Maarten Maathuis Date: Tue Oct 2 19:31:10 2007 +0200 NV50: Some infrastructure and minor changes. commit 7680648c9ddb81e2a1c6295431d7074366fb7b9a Author: Maarten Maathuis Date: Tue Oct 2 16:55:07 2007 +0200 NV50: The beginning of moving some code around. - Please contact me if something breaks, i don't have an NV5x card. commit b812ecaef75216cc76557e6a3a080efa870d189f Author: Maarten Maathuis Date: Tue Oct 2 10:35:37 2007 +0200 NV30EXA: Minor code cleanup. commit 5b974b3bed86d53ccf6915c46aeb310a2bba3519 Author: Stephane Marchesin Date: Mon Oct 1 17:19:41 2007 +0200 Remove those useless casts. commit 734785c05357455a7ae7181fd7326f02e0bd0478 Author: Stephane Marchesin Date: Mon Oct 1 02:01:30 2007 +0200 Some work on nv10 exa. commit 0cfcbcc9d64bfd47b765f4f2ff41d7ad467990bd Author: Matthieu Castet Date: Sun Sep 30 22:41:15 2007 +0200 enable bios PINS parsing on post nv10 cards commit 9ac6d0e9d46abdf867fd06f7ca24b718a340bb74 Author: Pekka Paalanen Date: Sun Sep 30 23:09:33 2007 +0300 nv20 inits nv10tcl. commit c3439aebe000a3c6dd716bd4739ce01321bee26b Author: Maarten Maathuis Date: Sun Sep 30 21:43:41 2007 +0200 Fix detection of NV04 and NV05 when using pci-rework. commit 9e070c09f68b0e3e41109360c455b3e2cc1dbb9c Author: Maarten Maathuis Date: Sun Sep 30 19:37:53 2007 +0200 randr12: Switch to proper cursor api + minor changes + small nv50 fix - Remove the ugly cursor hack. - A function name on nv50 was still g80, this caused an implicit decleration. commit c7de03556a51009ce69b073d7ecfd01919d24c5f Author: Maarten Maathuis Date: Sun Sep 30 12:40:50 2007 +0200 NV30EXA: Fix rendering issues. - Full non-composite tests using rendercheck. - The full test suite of composite has been run (it takes ~15 hours). - A partial cacomposite has been run (a8, a8r8g8b8, x8r8g8b8). - All the rendering tests work fine, as does the cairo-knockout demo. - Thanks to doener for reporting this issue. commit 0574dc5a8bd09216e41656c943c92a437bcf020b Author: Stephane Marchesin Date: Sat Sep 29 20:20:47 2007 +0200 A little more work on nv10 exa. commit aae155f149af522e1a83168ed4ec5b7b5a40bb73 Author: Maarten Maathuis Date: Sat Sep 29 17:28:10 2007 +0200 randr12: Some more CRTC regs. commit 8b03086ee36ca9c3e77f9df9eb4a1805072d2103 Author: Maarten Maathuis Date: Sat Sep 29 14:33:38 2007 +0200 randr12: make crtc owner beheaviour consistent with blob + minor changes commit c572315a974746224dba1213e956a1b6189f175d Author: Maarten Maathuis Date: Fri Sep 28 19:58:39 2007 +0200 randr12: Minor changes and more debugging output. commit db36a1df4ba3dddf3669f491bfe6461e4fd490b6 Author: Maarten Maathuis Date: Fri Sep 28 18:52:47 2007 +0200 randr12: Some more debugging output and some other minor changes. commit 2d21405c9c0bff36f47e28a5e4086dacae557d17 Author: Maarten Maathuis Date: Fri Sep 28 13:02:51 2007 +0200 randr12: Preperation to allow differentation between crtc and pcio in the future. commit f235cf896c1da098ff635d5a882561f16f5fb4f7 Author: Stephane Marchesin Date: Thu Sep 27 18:21:25 2007 +0200 Import nv10 exa code. Does not work yet. commit 74a243d8e188432854c15849ad1ab6e893e48f0a Author: Maarten Maathuis Date: Wed Sep 26 09:04:43 2007 +0200 randr12: Some registers were not constants, so changed it back with a note about the values i had seen. commit a3c71495097f8d745110aad06c9f8e2f6f03baad Author: Maarten Maathuis Date: Tue Sep 25 22:05:36 2007 +0200 randr12: Getting closer, doing a decent attempt at detecting the proper ramdac. - crtc detection may need to be added - When i boot up with both analog and dvi attached, my dvi is misprogrammed, maybe some sharing is happening somewhere? commit 4a57ebb9c2098ce5d568a2da6e0640cdcc18d3f0 Author: Maarten Maathuis Date: Tue Sep 25 21:06:03 2007 +0200 randr12: detection changes, more to come later - Detection of crtc's (or a way to program them effectively) still has to be done/fixed. - It now detects if tmds controls is on another ramdac, for a non-dual dvi setup. - Disabled TMDS stuff for the moment, since it's incorrect somehow. - Dumps for single dvi, dual dvi, etc are appreciated. commit 41df1ff6ce348dc6a38e34ce63887c66b0300c09 Author: Maarten Maathuis Date: Tue Sep 25 16:22:38 2007 +0200 randr12: Some reindenting. commit 334a9b065c4973876b894eadf05ce86ca439e08f Author: Maarten Maathuis Date: Tue Sep 25 16:17:03 2007 +0200 randr12: simplification of the swapped i2c buses "workaround" for nv4x and some code reindenting commit c40559dacd6fe20f35710111330dee37fb2b9a58 Author: Maarten Maathuis Date: Sun Sep 23 01:16:55 2007 +0200 randr12: A frail attempt at some TMDS programming, i have not figured out yet what switches DVI from one RAMDAC to the other. commit 50bc4dbff6df80f5d80f731fe42b06768c429dc0 Author: Maarten Maathuis Date: Sun Sep 23 00:57:18 2007 +0200 randr12: Reindenting and minor changes. commit 1a3303a5b6f261470c1c56f84f9b89af950a0b35 Author: Maarten Maathuis Date: Sat Sep 22 22:21:37 2007 +0200 randr12: Assign ramdac's in more sane way, otherwise two outputs may end up on the same ramdac. commit 9b62853dfe1664f3624f6be8aa86f6ca15ca8392 Author: Maarten Maathuis Date: Sat Sep 22 20:37:32 2007 +0200 randr12: Add some TMDS register infrastructure, so i can try some stuff in the future. commit a445cbcd71ee51d7680a6eb13cd037e06d59b0ba Author: Maarten Maathuis Date: Sat Sep 22 15:55:01 2007 +0200 randr12: hardcoding a base value for debug_0 register. commit f89a3217a18261424e212b355628ce5f5b8b9142 Author: Maarten Maathuis Date: Fri Sep 21 23:16:40 2007 +0200 randr12: Some minor changes. commit 5ea59f8f01dbbd4211aee1a0e46a6529cddc016c Author: Maarten Maathuis Date: Fri Sep 21 20:37:50 2007 +0200 randr12: hardcode more stuff + actually use a few previous regs - I'm going to try and do full modesetting, before tackling the problems that dual monitor setups face (i tried, it wasn't pretty). commit 0f66c725cb8806041faddf94cceb88009f7e9f06 Author: Dave Airlie Date: Thu Sep 20 08:29:43 2007 +1000 make distcheck pass commit bf3cceeb9c72c16a1cf601c8bd0dedd8c676e3cd Author: Maarten Maathuis Date: Mon Sep 17 18:58:31 2007 +0200 randr12: Add some CRTC regs which the blob sets. commit e3346c17c1ead9619206a5921994b5de7ed72739 Author: Maarten Maathuis Date: Mon Sep 17 18:22:53 2007 +0200 randr12: Change the way CRTC register 59 is set. - Small change, i suspect the original author had a dfp on the second crtc. - Information taken from a mmio trace of a nv28. commit 6c3aee9d68abdb9303cf03d9024f4f0deb5f1e3e Author: Ben Skeggs Date: Mon Sep 17 00:01:22 2007 +1000 Make use of exaGetPixmapOffset(). commit 4d9e5d451a516aac64c4b95a4478f252c0c9eafb Author: Ben Skeggs Date: Sun Sep 16 23:54:14 2007 +1000 Fix randr1.2 with driver-provided modes (ie. LVDS native mode) Fixes #12368 commit 5e58e74435da2071aab9f21386ac6dabdf3f8e7d Author: Ben Skeggs Date: Sun Sep 16 19:44:42 2007 +1000 NV30EXA: Support PICT_a8 dest surfaces Quick hack for now, shader handling will get a rework one day and clean all this up. commit d6d3ddfafaece2d153942ec37e3a8c3127c7c3fa Author: Ben Skeggs Date: Sun Sep 16 19:01:21 2007 +1000 Bring G8x modesetting into sync with xf86-video-nv. commit 53e35a1d42070fd683eb6d0f169ac3ce482a45b0 Author: Ben Skeggs Date: Sun Sep 16 17:27:22 2007 +1000 Move G80 VBIOS download into nv_bios.c. commit 02d5443d650e628256ebed1f331ad32b0f642a38 Author: Arthur Huillet Date: Fri Sep 14 21:13:26 2007 +0200 Xv: NV04 overlay now has one "colorkey" attribute It is technically possible to add other attributes, by copypasting vidix code from mplayer, but it requires a bit of work especially on testing, so I am going to do it only if someone actually needs it. commit 0fa042e5123066ca2d9f36ff05cf64d0f68289a8 Author: Arthur Huillet Date: Fri Sep 14 14:17:32 2007 +0200 Xv: NV04 overlay now almost functionnal commit a7ff07f4ab63c5a574e549326f022f84c2b9bab4 Author: Arthur Huillet Date: Fri Sep 14 12:27:45 2007 +0200 Xv: quick imple of NV04 overlay commit 77076a391647f6111f38b10192d78ea7560ca9e8 Author: Stephane Marchesin Date: Wed Sep 12 13:10:37 2007 +0200 Try to fix nv4/tnt1 commit e03fabf7e14599c1619673430ec3d81db90ffd1e Author: Maarten Maathuis Date: Tue Sep 11 20:15:11 2007 +0200 Restore PRAMDAC1 and PCRTC1 offsets, in proper format (0x2000/4) and move them to their proper place. commit 564043d9c1c9b5023f1b69a79d80742338256b83 Author: Maarten Maathuis Date: Mon Sep 10 21:14:24 2007 +0200 Fix the memory adresses of the secondary crtc and ramdac + minor change. commit 5672842381a0e8f605cd482563c5d9ea02118647 Author: Patrice Mandin Date: Mon Sep 10 18:29:10 2007 +0200 make randr 1.2 disableable for xorg server < 1.3 commit 2778d3a9041ec62462585f623f84b1ed05b4ebad Author: Patrice Mandin Date: Mon Sep 10 18:28:03 2007 +0200 make randr 1.2 disableable for xorg server < 1.3 commit 9bb76f73f0e648fda79a9c84d6e78469752a4eac Author: Maarten Maathuis Date: Mon Sep 10 07:57:01 2007 +0200 randr12: Apply the same pll restrictions to a two stage design. commit b46bbab81cc9f2093406fa8b53f9ffaf6f7fd0fc Author: Maarten Maathuis Date: Mon Sep 10 07:25:25 2007 +0200 randr12: Some more pll timer restrictions from Haiku. commit 77b424415d31428e113688ec27a405966d5080e6 Author: Maarten Maathuis Date: Sun Sep 9 23:11:18 2007 +0200 randr12: Some new pll clock restrictions. commit a1bbfe17cc863497644b58a9206ae3876a654543 Author: Maarten Maathuis Date: Sun Sep 9 22:50:19 2007 +0200 Some reindenting. commit dedb80d1237ebacf7531938d627328a20453d5d0 Author: Maarten Maathuis Date: Sun Sep 9 22:12:38 2007 +0200 randr12: Modify dcb table for nv40 to make it look more like older hardware. Remove i2c bus reverse. commit 7aa96706ef428f1390d8e938d0bf26b8c046a67d Author: Maarten Maathuis Date: Sun Sep 9 20:40:20 2007 +0200 Removed a check for > 1 active crtc's, which seems really odd, no regressions occured for me. - I cannot plug in both the vga and dvi connector of my monitor, so i cannot verify that. - The seperate monitor, on crtc0 and crtc1 work as they did (the afp being slightly shifted). - Also did a little reindenting. commit 228cb177242be053595b959dedfdfbfa77b1c54f Author: Maarten Maathuis Date: Sun Sep 9 18:49:08 2007 +0200 randr12: Fix a nasty regression from 6ba7e83f8cf2da84dd796ee59cb24c15bc36b746. - For non-flatpanels the dac was never initialized. commit 0a56cb53d7e2a58ef044c9090f48fd46a2b251d9 Author: Maarten Maathuis Date: Sun Sep 9 00:39:41 2007 +0200 randr12: Some missing init. commit 80bfb59a1f1c3968f8e116de611975df4acf5618 Author: Maarten Maathuis Date: Sat Sep 8 23:58:39 2007 +0200 Some much needed indenting and readability improvements. commit 20aaacdd69c427f6c75b80f5f206b3187262f3a1 Author: Maarten Maathuis Date: Sat Sep 8 21:00:45 2007 +0200 Hopefully fix bridged chip detection, such as the 7800GS AGP. commit b99549b5cb4f4cba2d60292994b2db483f8d4a8c Author: Maarten Maathuis Date: Sat Sep 8 14:25:39 2007 +0200 Remove list that is incorrect and no longer needed. commit b104314a11d3cf3bbb23095ff5805c1d5d8d9775 Author: Maarten Maathuis Date: Sat Sep 8 14:24:54 2007 +0200 Fix previous commit, change the way Digital Flat Panels are programmed. - This is mostly taken from the Haiku driver. - It works for me, please report any issues you have. - Added scaling, for running 4:3 resolutions on widescreen for example (untested). commit a867d6912456a5e15a965050bf784687e60634ee Author: Maarten Maathuis Date: Sat Sep 8 00:46:20 2007 +0200 Hopefully this will improve flatpanel beheaviour. - I looked at Haiku and copied as much as i could. - I removed the htiming and vtiming hack. - Let's hope this works. commit 6ba7e83f8cf2da84dd796ee59cb24c15bc36b746 Author: Maarten Maathuis Date: Fri Sep 7 23:11:51 2007 +0200 Some more indenting and such. commit d8d835dfb61f437b3eaede0a6ec188835f6eb5ff Author: Maarten Maathuis Date: Fri Sep 7 22:58:56 2007 +0200 Removing a hack in the hopes of finding a better way and some minor changes. commit dd7e568bd101ed34dcdd7d3b6d8169740499d593 Author: Maarten Maathuis Date: Fri Sep 7 22:27:18 2007 +0200 Indenting and minor code style changes. commit 8ed256e94dae884b723c172320b15b0d6ae00a1b Author: Maarten Maathuis Date: Fri Sep 7 14:37:40 2007 +0200 randr12: Fix Xv blitter, please see full changelog for other implications. - Removed the CRTCNumber variable, instead just store if crtc0 and crtc1 are active. - This coule break old style setups (picking the wrong monitor for example). - CRTCNumber option temporarily removed, because the piece of code surrounding it is ugly and needs a rework. commit eb595b2e06ec33d5fe2af43bc7ad107f551d99c8 Author: Maarten Maathuis Date: Thu Sep 6 23:26:04 2007 +0200 randr-1.2: Only the NV4x have these busses swapped, revert for other architectures. - If this is also true for NV3x, then please contact me. commit dd146a074fff575e18a41fd386e2a2ce5a1ec847 Author: Maarten Maathuis Date: Thu Sep 6 22:55:16 2007 +0200 Update to latest pciaccess api, this now requires libpciaccess 0.10.0. commit 2f37d249605d6f0b80c290683ca35a9431b1078c Author: Maarten Maathuis Date: Thu Sep 6 22:00:30 2007 +0200 NV03 is dead. commit 2b2c99f2581e14d3f1726bc503951b1fe7760c95 Author: Maarten Maathuis Date: Thu Sep 6 21:43:55 2007 +0200 randr12: A prettier hack for DFP, that uses several known htiming and vtiming modes. - I'm fairly sure these modes are tied to resolution. - You are welcome to supply additional modes. - A final solution would be even better ;-) commit ab7d37d61a01afea218321d336664896eaec5651 Author: Arthur Huillet Date: Thu Sep 6 15:09:59 2007 +0200 Xv: work around some overlay bandwidth problems - may break things though extended nv workaround from bug 4686 in nv_dac.c to NV1x and NV2x cards, as it fixed problems on someone's NV17. commit f46bc9ad5558e9ecf6b174e24658e812811e94ce Author: Maarten Maathuis Date: Wed Sep 5 23:15:57 2007 +0200 Workaround for flatpanels. - Remove the hardcoded values. - This should probably work for monitors whose mode is already set. commit 1825031465fc614a2a972ea7a8b44ac32aed8ea3 Author: Maarten Maathuis Date: Wed Sep 5 21:23:25 2007 +0200 Fix minor issue. commit c0eefaba3f3706eb62e172bc57ac2795bd16bd56 Author: Maarten Maathuis Date: Wed Sep 5 21:22:05 2007 +0200 Fix DPMS, patch by Bernhard Kaindl . commit d4dda6bb972003394dd3326f8042fa5b759fc063 Author: Maarten Maathuis Date: Wed Sep 5 21:18:51 2007 +0200 Reverse DDC1 and DDC2. - I need them reversed. - I also found this: http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg12009.html - If you need them otherwise, then please consult and hopefully we can solve it. commit da89d5a4e0263b8a89c549496d10ab43c7f1f230 Author: Maarten Maathuis Date: Wed Sep 5 21:16:11 2007 +0200 randr-1.2 clients have their DDC's initialized elsewhere. commit 2b209d9b8907fad3bbaaf7297ff3c340f086bd24 Author: Maarten Maathuis Date: Wed Sep 5 21:12:18 2007 +0200 LockUnlock CRTC's when going back to X (EnterVT), patch by Bernhard Kaindl . commit ba7aa5a1525bb3fbc2ae7fbfce3e42a2e945626e Author: Maarten Maathuis Date: Wed Sep 5 18:34:27 2007 +0200 Xv: improved behavior with NoAccel by disabling blitter and overlay commit 42fd07b25d9abece034e972d1413b31fe78eba4c Author: Ben Skeggs Date: Wed Sep 5 11:58:19 2007 +1000 Avoid segv. commit e74d58cdef0a0ee561e54f3d7d8afdfac030e04a Author: Ben Skeggs Date: Wed Sep 5 11:53:48 2007 +1000 Add back DCB table parsing from randr-1.2 branch. commit 8a12758a6b7e4313e0269585b6f64eaffe54c74c Author: Ben Skeggs Date: Wed Sep 5 11:51:35 2007 +1000 Add LVDS panels when found in DCB. commit b01fbbfa2b6be793dbd7695624699ed703ff4424 Author: Ben Skeggs Date: Wed Sep 5 11:34:14 2007 +1000 Nuke "comparison is always false..." warning. commit c53f495ec2994f013406d9738764ab124ed32061 Author: Ben Skeggs Date: Wed Sep 5 10:59:33 2007 +1000 Fix pciid detect on non-8800 cards (they identify as NV8x, not NV5x) Actually, use 0x88000 to get pciid on all chipsets since NV40. Evidence suggests that NV4x has both the 0x88xxx regs and 0x18xx regs. commit 17d1a65296ae4fc524a31cd2fe4b9fe9484c0452 Author: Ben Skeggs Date: Wed Sep 5 10:53:32 2007 +1000 Neither overlay or blit adaptor work on G8x. commit 9ce1115cf26a7cf3212fdf446b83907f5795913a Author: Ben Skeggs Date: Wed Sep 5 10:51:02 2007 +1000 Nuke riva_* files + bits of NV03 that got reincarnated. commit 51e3855104ff7b68559d37e774cde306424399d8 Author: Ben Skeggs Date: Wed Sep 5 10:46:54 2007 +1000 Nuke XAA. commit a0cb03d32b0da3ad2b4e03515926a3d616f487bc Author: Maarten Maathuis Date: Tue Sep 4 23:04:59 2007 +0200 There was some redundant arch checking code left, must have been missed after the randr merge. commit 13aeb83d7e5fcb3f051f95faa48a2ef636d67260 Author: Maarten Maathuis Date: Tue Sep 4 22:54:28 2007 +0200 I unknowingly broke CRT's i think. commit a57fe870e49b2e7a3a6caf17fea8c8c878b1024c Author: Maarten Maathuis Date: Tue Sep 4 22:17:52 2007 +0200 Fix several problems. - Implement a temporary NVSetMode(), suggestion and code by: Bernhard Kaindl . Note: I've left his comment intact, just a minor change. - Fix last commit, i forgot to store the last mode. - Move some header stuff around, which i created without knowing the true purpose of nv_proto.h ;-) commit be468069b752a3a3c595f62eda40e90719496c90 Author: Maarten Maathuis Date: Tue Sep 4 20:45:25 2007 +0200 Fix DVI/Digital alligment with some (magic?) values discovered by Matthew Garrett . commit 9b54aac1641c35ca3edb2d208d8a9a9c55737894 Author: Maarten Maathuis Date: Tue Sep 4 20:20:02 2007 +0200 Add suggestion/patch by Bernhard Kaindl and fix NVRestore(). - When a monitor comes out of DPMS sleep the old state is restored. - NVRestore() was not ported from randr-1.2 branch, meaning that going from X to console resulted in a unacceptable mode. commit 186e3b551da6e37e0860d06e9265c3c58b763e27 Author: Maarten Maathuis Date: Tue Sep 4 18:39:44 2007 +0200 Add pci-rework compatibility and remove the pci-id list. - Detection is now done by probing registers. - Nforce/Nforce2 have special "hacks", they have been converted, but are untested. - NV5x detection should work, but has seen no testing. commit 6f860d6d7637f4eba49636d2bab11ac62da279cf Author: Ben Skeggs Date: Tue Sep 4 11:38:39 2007 +1000 Badness. commit 54ca35e7379fdb375c0d7be2f8c3ad1513be2a59 Author: Ben Skeggs Date: Mon Sep 3 22:06:27 2007 +1000 Hook up G8x accel code. commit 8c6fd43f63e450acbfd8de563580db715e72f90b Author: Ben Skeggs Date: Mon Sep 3 22:06:09 2007 +1000 Fix G8x hwcursor commit f6d0e2dde750436090f50f442e3e0f1aa226a7f3 Author: Ben Skeggs Date: Mon Sep 3 21:35:06 2007 +1000 Fix up M2MF code for G8x. commit fe8788da8cd5aca90bbe85e1c975b79ff02682ba Author: Ben Skeggs Date: Mon Sep 3 21:30:16 2007 +1000 Init grobjs we need on G8x. commit f450a4d0ab9c199db0a99a5e78642a0d66ca2915 Author: Ben Skeggs Date: Mon Sep 3 21:14:59 2007 +1000 Allocate some VRAM for G8x palette. commit dfcfc9a8dac7f1fdf7b31ebdd2bca4c5f33313e0 Author: Ben Skeggs Date: Mon Sep 3 21:06:15 2007 +1000 Don't pound PMC_ENABLE on startup, this is DRM's job. Fixes resetting parts of G8x that shouldn't be. commit c8a32bab34ffe74a4a323de3885fae87bd916218 Author: Ben Skeggs Date: Mon Sep 3 21:05:08 2007 +1000 Detect unknown G8x chips in NVProbe() + Force randr12 on G8x commit 087fd31d6a5d6a835fc318549a12faa916cf5ed0 Author: Dave Airlie Date: Mon Sep 3 16:46:34 2007 +1000 fix distcheck after randr-1.2 brought in commit 423f95c02c5b018d6fc78f501ea8b546d73f33fb Author: Dave Airlie Date: Mon Sep 3 16:42:32 2007 +1000 merge in the nv50 code from the randr 1.2 branch commit 39e8b6c7c0a159f7a06d786abc0f9c5c30ae6793 Author: Dave Airlie Date: Mon Sep 3 16:22:47 2007 +1000 randr12: bring over cursor code commit ffd87b9bf2712311e197063a7c4b65b7c06a5ebb Author: Dave Airlie Date: Mon Sep 3 16:16:43 2007 +1000 randr12: try and bring over most of the randr12 code into master This currently shouldn't break master, and randr-1.2 more than likely doesn't actually work commit 708cb3f9d9b66030dd0bfc4beaa657fcdfded784 Author: Arthur Huillet Date: Fri Aug 31 21:42:51 2007 +0200 Xv: now "powercycling" the overlay using PMC_ENABLE in order to workaround some lock up problems commit 3a5095db9fd33d2feeb4bcfcb8453848998ce04b Author: Stephane Marchesin Date: Fri Aug 31 01:36:11 2007 +0200 Cut remains of NV03 support. commit 54a922dffaa1a4a7c29c2cf8d73449e6fe9058ed Author: Stephane Marchesin Date: Fri Aug 31 01:35:52 2007 +0200 Good ol' nv04 doesn't seem to support dithering type for SIFM. commit b680a9652508e0d0e660fd924937870cd4ad3530 Author: Arthur Huillet Date: Thu Aug 30 23:19:13 2007 +0200 Xv: nv NV30 arbitration patch for DFPs - fixes (some?) bw problems commit f29c9d3fc95f160ded64b911266a479ad0a2fc1a Author: Stephane Marchesin Date: Wed Aug 29 00:56:05 2007 +0200 Silence more warnings. commit 663bf3cbc881631e54e7d63932f59e1b4289979f Author: Stephane Marchesin Date: Wed Aug 29 00:20:19 2007 +0200 Silence a warning. commit 5937ace8e2376f0b38249e38d1f97a88f4aca99f Author: Stephane Marchesin Date: Tue Aug 28 11:18:54 2007 +0200 Some small fixes. commit 30d2b3f0dd4a9b6be5d3ad7a38993e5b84baf90a Author: Stephane Marchesin Date: Thu Aug 23 22:54:53 2007 +0200 Oops I forgot to enable the nv35 object on nv35... commit 761d25eb9afd4be34f00ff7eff44dac0c2f9d9a2 Author: Stephane Marchesin Date: Thu Aug 23 22:39:34 2007 +0200 Don't enable that non-working nv30 EXA just yet. commit 7e7dec68969db5dfc15a96f6dbe78edbcd1ab5ab Author: Stephane Marchesin Date: Thu Aug 23 22:33:58 2007 +0200 Add nv30 exa code, doesn't work yet. commit e1789ac879d474015c87c36847f0e2777486d6ad Author: Stephane Marchesin Date: Wed Aug 22 22:38:08 2007 +0200 Update to the latest nouveau_reg.h file. commit 4fc38aeb54da1cba9d5e231a5151e6429af0ea7e Author: Matthieu Castet Date: Tue Aug 21 20:03:15 2007 +0200 init SCALED_IMAGE_FROM_MEMORY_COLOR_CONVERSION to COLOR_CONVERSION_TYPE_DITHER. riva and blob init it. commit c63b5a3740dfe3ff5c6b77412e3666a79137c120 Author: Arthur Huillet Date: Tue Aug 21 14:55:07 2007 +0200 Fixed blending in NVComposite by actually creating ContextBeta1 and 4 objects commit 4454b3d0104c14890b9b5ead33823ffd0362315c Author: Arthur Huillet Date: Mon Aug 20 23:50:43 2007 +0200 Workaround for NVComposite bug #11949 Accepting only PictOpSrc now, PictOpOver causing crashes. commit 450cf465bd850d70ba00711e7d85e1e8eaeff502 Author: Arthur Huillet Date: Mon Aug 20 13:18:15 2007 +0200 Xv: fixed wrong fix of big endian NV12 copy, as explained by Daniel Chassot No sleepless coding ever again. <- big lie commit b8780f3d9a7e1bd596f19cbb4867908dd6be53db Author: Arthur Huillet Date: Mon Aug 20 00:46:00 2007 +0200 Xv: patch from Daniel Chassot to do 32bit memory writes in NVCopyNV12ColorPlanes, with minor reworking of mine commit 690b4b7adc02e7170451bd5bc6616bc03823d2e5 Author: Arthur Huillet Date: Sun Aug 19 21:04:00 2007 +0200 Xv: this time a correct matching ? :) commit 6b6505bc54fc29fc22d2be995f34b24ddb9dbaa0 Author: Arthur Huillet Date: Sun Aug 19 20:18:49 2007 +0200 Xv: stupid build error. blah. commit 28b66c26f85f7730ba9a54db3f778bfd5b24915d Author: Arthur Huillet Date: Sun Aug 19 20:14:38 2007 +0200 Xv: now catching all chips < NV17 commit 94ae23e2a1ebe9fe3f4bf2039ad3b2e5f0e3e55e Author: Arthur Huillet Date: Sun Aug 19 19:50:57 2007 +0200 Xv: disabled YV12 overlay on < NV17 commit 1f83dbfa6ef774276e0da3dc4f74cbabe55f76fa Author: Arthur Huillet Date: Fri Aug 17 00:45:47 2007 +0200 Xv: now only uploading the part of source image that is used to workaround bandwidth problems commit ffa62dc9f573448c8a832324973513f7ba985b33 Author: Arthur Huillet Date: Wed Aug 15 02:27:15 2007 +0200 Cleaner DMA and CPU copy upload of color plane for overlay. Fixes a few bugs and is necessary for the bandwidth problem workaround. commit 72c62c48faf2acffae1bc311051537f46972ae58 Author: Patrice Mandin Date: Tue Aug 14 22:26:02 2007 +0200 Can not setup dfp modes with xorg-server-1.1 also commit 54eadd624282ae6d0493a3cb54afda7600c7e12b Author: Patrice Mandin Date: Tue Aug 14 22:12:37 2007 +0200 Make NV30 EXA disablable commit da6522dbfcff10081ce2ad866ba4afdd18b413d7 Author: Arthur Huillet Date: Tue Aug 14 15:01:58 2007 +0200 Implemented CPU copy fallback for native YV12 overlay as well. commit e417307bfc8610f010728d82bb80fced7d0d7aa7 Author: Arthur Huillet Date: Tue Aug 14 14:47:44 2007 +0200 Native YV12 overlay support, cleaner Xv code Added support for a native YV12 overlay for NV10+ cards. Cleaned up Xv code. CPU copy fallback does not do native YV12 yet. Bandwidth problem with YV12. commit b3e4da61e8c846d8d3f01b015cb7155da4e266e9 Author: Carlos Martín Nieto Date: Sat Aug 11 12:27:56 2007 +0200 Don't dereference the uninitialised pNv->FB pointer. Opps, mea culpa. I accidentally commited a debug statement that dereferences an uninitialised pointer. commit a7d29fd932fe14ca5b82cda64341704164fb7e09 Author: Carlos Martín Nieto Date: Fri Aug 10 20:01:27 2007 +0200 Move DRI's FB to the higher half of VRAM If we don't, DRM's push buffer takes the map away from us. This is just a workaround until that useless DRI mapping goes away. commit f9e7849e8736d1477e867a3a1262f0f82baefbcb Author: Arthur Huillet Date: Fri Aug 10 20:59:12 2007 +0200 of course, we don't need Xv debug messages upstream commit ee098308c6aca7615bc6ee597e9ca531520f4119 Author: Arthur Huillet Date: Fri Aug 10 19:28:22 2007 +0200 "smart" overlay with composite, and a tentative fix of flickering when dropping frames added "smart overlay" when composite is enabled. not extensively tested now not changing the buffer when skipping frames - not sure it even has an impact. commit 9cc11cbc9ce10b99f72d7c08584bf61d179cdbda Author: Ben Skeggs Date: Thu Aug 9 01:46:46 2007 +1000 Fix blit adaptor + NVWaitVBlank() (ie. replace old magic 0x400710 hack) commit 22e965038bbc64c7b5118fc9a03ecf5f467d1665 Author: Stephane Marchesin Date: Wed Aug 8 12:45:59 2007 +0200 And of course, we don't really need these ErrorFs. Not any more than last time. commit 1c5a3e271ca628c61fce0bcef24d0bda15d06d7e Author: Stephane Marchesin Date: Wed Aug 8 12:38:14 2007 +0200 Oh, and of course we need a new object. commit a9b44880924ee814f0bd4b0015ab152f2d0b9051 Author: Stephane Marchesin Date: Wed Aug 8 12:37:31 2007 +0200 Use IMAGE_FROM_CPU for smaller UTS. This is async and helps a lot with glyphs especially. commit 9cb4c95a4fbf38fcb8249e765ff71b2e24912244 Author: Ben Skeggs Date: Wed Aug 8 11:48:48 2007 +1000 Add forgotten prototype commit 089ff874e0a798c1b2693b5ab01cfa04c939f758 Author: Ben Skeggs Date: Wed Aug 8 10:32:08 2007 +1000 Timeouts got lost somewhere along the way.. commit 15a680a6d715f87910b07133e1b98e2d4be9a108 Author: Stephane Marchesin Date: Tue Aug 7 23:42:09 2007 +0200 Fix some overlooked hardcoded subchannels... commit 3f0a52c44697787d84d4f2cf61872e13d630f62a Author: Stephane Marchesin Date: Mon Aug 6 23:30:04 2007 +0200 Fix explicit usage of subchannels, and remove subchannel defines altogether. commit 17b65f1c2be3e609d387066d72dd8f5f7e2a6d92 Author: Matthieu Castet Date: Mon Aug 6 19:55:52 2007 +0200 make XAA work on nv17 commit bf5684ba05e50fe48cce1e634caf03725fa907e6 Author: Stephane Marchesin Date: Mon Aug 6 18:27:19 2007 +0200 oops remove the debugging ErrorFs. commit 2eab8453d73b4e7fd6c2d772d595ca5e8fa8c975 Author: Stephane Marchesin Date: Mon Aug 6 18:13:13 2007 +0200 Fix UTS/DFS when gart is smaller than transfer size. commit 71076f7947ec71b7a0f363c23f5a51ef09cdd9c0 Author: Ben Skeggs Date: Tue Aug 7 02:09:30 2007 +1000 NVDmaSetObjectFromSubchannel doesn't exist anymore! commit 4a6c2bd2bedcf9f67c3e498b1411ad58cd66199c Author: Stephane Marchesin Date: Mon Aug 6 17:29:41 2007 +0200 Add subchannel handling code commit c7b16f6fff96ffcff8049feed2a0a9ef6de4209f Author: Ben Skeggs Date: Mon Aug 6 21:45:50 2007 +1000 Adapt to drm 0.0.10 commit 59d073c9b01a8f61675b8d74f5c55f134ddfb8bf Author: Arthur Huillet Date: Mon Aug 6 01:37:17 2007 +0200 Xv: waiting for last transfers to finish before freeing notifiers commit 047aa7e0a6ecce59c9be8d36c51f082c0ddaafe8 Author: Ben Skeggs Date: Mon Aug 6 00:13:35 2007 +1000 Clamp NV_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT to 2047 lines. At least NV40 can't handle values larger than this. Patch fixes hang when visiting opengl.org. commit 68070ff7309c8b1cf149490dcf537892b0bf44bc Author: Arthur Huillet Date: Mon Jul 30 03:27:55 2007 +0200 Xv now manages a pool of 6 notifiers for its double buffering. Also improved the memory allocation logic. commit bceef7210e44dc643a5f7a5b5683d5c434a07565 Author: Arthur Huillet Date: Sun Jul 29 01:54:42 2007 +0200 Xv: fixed bugs when displayed only part of the source image (tvtime with overscan) Xv: fixed bug with overlay behaving badly when window is partly out of screen Xv: clean up NVPutImage code commit a434cc6dd38ffa658bacf5547ec0384ec5351e9c Author: Dave Airlie Date: Sat Jul 28 16:34:49 2007 +1000 exa: disable compositing on big endian machines This at least allows me to see what I'm typing for now :-) commit 175c2b7f7b9e45924e1de7f7ea1130fda76d02fd Author: Arthur Huillet Date: Fri Jul 27 19:50:48 2007 +0200 no overlay with composite commit 200c82634971b32bcc308b5e07c113048cf37aa4 Author: Arthur Huillet Date: Fri Jul 27 16:28:48 2007 +0200 Xv: gotos are evil commit 8544c0ce64780be1bb5f66550d9d6f1e3c87865c Author: Arthur Huillet Date: Fri Jul 27 15:11:31 2007 +0200 Removed comments in preparation for upstream push commit 2c60f6e9fc5260eba5b7ddaf67085781f35bfc58 Author: Arthur Huillet Date: Thu Jul 26 23:00:02 2007 +0200 re-added CPU copy code as a second fallback option (first being to use X GARTScratch) commit c4dfad770d380dacddd3be025e96f867047327cc Author: Arthur Huillet Date: Thu Jul 26 16:08:40 2007 +0200 Completely removed notifier wait, when using double buffered stuff. I may have to re-add a wait in the future, but I'm not sure yet how to use two notifiers at a time. commit 8ba6a9c7494ebd53a3fe775d4d9b402e918a6598 Author: Arthur Huillet Date: Thu Jul 26 15:21:08 2007 +0200 Preliminary implementation of "host-side double buffering" to improve performance of Xv commit 4f4721f1b8a76a0bf9938e3c614ba7166d5f3dab Author: Arthur Huillet Date: Wed Jul 25 22:23:37 2007 +0200 removed pointless sleep in notifier wait commit 290e71edfbc6297c63989d5c21a67717b4ca5f76 Author: Arthur Huillet Date: Fri Jul 20 17:46:18 2007 +0200 cleaner Xv code - fallback on CPU copy yet to be implemented commit e760235a0596895b726220366c50d4e7c244006e Author: Arthur Huillet Date: Fri Jul 20 01:33:49 2007 +0200 Now using GART as the source for the blitter - preliminary implementation, gotta clean it up commit a97181f95a1f5da6180b8a72f3ca307079b92079 Author: Arthur Huillet Date: Fri Jul 20 01:22:11 2007 +0200 now yielding in the wait for notifier for Xv only commit 81cc744eb31343a509f9ca0d37993d462f162d80 Author: Arthur Huillet Date: Sun Jul 15 01:00:19 2007 +0200 VERY EXPERIMENTAL now EXA waits for sync before its operations - this removed the text corruption and didn't affect performance here, please report. commit 74ed14e1d27903f0647fe650da666cacb1e2e940 Author: Arthur Huillet Date: Sun Jul 15 00:35:46 2007 +0200 VERY EXPERIMENTAL moved the notifier wait at the beginning of NvPutImage commit 590e385cb5e4f26532ec5ee380f2aaae1cd69894 Author: Arthur Huillet Date: Thu Jul 12 03:19:21 2007 +0200 new structure for PutImage, and DMA transfers commit d4abe1fb011d414fda1871f052dda5b860f0820b Author: Ben Skeggs Date: Tue Jul 17 13:09:34 2007 +1000 Emit NOTIFY+NOP sequence after M2MF. commit 36396aeaeabfd00c7014fa52c17261c3da8b6a82 Author: Ben Skeggs Date: Fri Jul 13 15:28:56 2007 +1000 Play "nuke the typedef" commit 99e0fbc1a34f535abf41c6f4566901c326dfa4b5 Author: Ben Skeggs Date: Thu Jul 12 10:47:53 2007 +1000 Match drm 0.0.9 interface changes. commit e88b20b392c6972088d88f52b2da83b82b821be5 Author: Arthur Huillet Date: Wed Jul 11 02:42:24 2007 +0200 added support for PCI GART when no AGP is available - requires DRM interface version 8 commit dff1cce299df636813e8f85109f4556f520620c0 Author: Ben Skeggs Date: Sun Jul 1 18:22:37 2007 +1000 Always provide UTS, fallback to memcpy if no GART. commit 2e0e7e3856573fbbcb5fe5c96cadcde4d33db68f Author: Ben Skeggs Date: Sun Jul 1 18:19:44 2007 +1000 Always provide DFS, use memcpy fallback if no GART. commit ba0d3fbba7c1a83ddc509414772199862a4a1d03 Author: Ben Skeggs Date: Sat Jun 30 15:27:07 2007 +1000 Remove some unused cruft commit 3e2677040937fda1cd6e6ea26c238049bd9f99ba Author: Ben Skeggs Date: Sat Jun 30 04:26:48 2007 +1000 No need to call exaMarkSync() in UTS/DFS. commit e81c9a29e6d1c6573892df8601f0361c2b09c659 Author: Ben Skeggs Date: Thu Jun 28 15:16:35 2007 +1000 Bail if GlxSetVisualConfigs isn't found. commit fce3edda42d10a9c3249c6eae4218a51a981493f Author: Ben Skeggs Date: Mon Jun 25 12:45:31 2007 +1000 Bump required xorg-server version to 1.3 commit 8f1c9af02651404f8b4800b150a86bb47062fd68 Author: Ben Skeggs Date: Mon Jun 25 12:44:12 2007 +1000 Check PRAMIN for BIOS image if not found in PROM. commit 824331e3fce36098e8dec31746204f7c13038abb Author: Ben Skeggs Date: Sun Jun 24 17:48:33 2007 +1000 Implement NV40 EXA composite hooks with 3D engine. Named NV30EXA, but won't work on NV30 just yet. This should change at some point in the future. Will likely break non-voodoo'd NV4X cards (if the latest drm changes didn't already break them). Use EXANoComposite xorg.conf option to disable the hook if that's the case. commit 2e2e95fc3b650ca633294bf4c11c9ba28f45b743 Author: Ben Skeggs Date: Sun Jun 24 17:34:10 2007 +1000 Slightly saner UploadToScreen implementation commit 35806975047aa8c0dbc059709bb823f475ee7368 Author: Ben Skeggs Date: Sun Jun 24 17:27:42 2007 +1000 Wait on notifier instead of PGRAPH_STATUS When multiple channels are in use, PGRAPH_STATUS may report busy even if the ddx's channel is idle. commit c39089b3d686eecef11db2b5a2d606ba1ca2dc0c Author: Ben Skeggs Date: Sun Jun 24 17:21:27 2007 +1000 Match drm 0.0.7 interface changes commit 45dccb99a541a0e1e7be7b4e5aab12c3d8d9f30d Author: Ben Skeggs Date: Sun Jun 24 16:47:36 2007 +1000 Hide the allocator's use of physical addresses commit d41cf4febd555cca1c65df7aa981be64a6ae4219 Author: Ben Skeggs Date: Sun Jun 24 16:46:40 2007 +1000 Pass pScrn instead of pNv in a few places commit d59fbb4725602c409beee4ab96dca1eab5d73b2a Author: Ben Skeggs Date: Mon Jun 11 20:36:28 2007 +1000 don't nuke user-specified CFLAGS commit 7af7d95eb8826fa3fb9914a8c6ad4b6f4867095e Author: Henry Zhao Date: Mon Apr 23 01:38:09 2007 +0200 Import from nv : Need to inject a mode corresponding panel width/height for validation commit 896fe62233f62d5e1f874ed0eba3a200fa5ef14b Author: Richard Hughes Date: Sun Apr 15 23:01:52 2007 +0200 Fix make dist. commit e0e90f427581929fd01c96f1958a1292982dee83 Author: Ben Skeggs Date: Mon Mar 26 01:04:15 2007 +1000 nouveau: rip out card init, everything except modesetting. commit 23fdec37c580c3b5de263dfd48bd80fa9f21bc19 Author: Ben Skeggs Date: Wed Mar 21 17:55:38 2007 +1100 nouveau: bump for drm interface changes (v0.0.5) commit 1fddcfe6680148ed2edd8017217734a1f812298c Author: Matthieu Castet Date: Sun Mar 18 11:30:54 2007 +0100 Fix "Fix NoAccel mode" commit : NVAccelCommonInit return a bool commit 113c6837a6515d533bfa15daf49f6cd2c4c95ac4 Author: Matthieu Castet Date: Sun Mar 18 11:28:04 2007 +0100 Fix NoAccel mode commit d1b75251a3f225890f1e25b11038389d71b67611 Author: Ben Skeggs Date: Wed Mar 7 21:41:22 2007 +1100 Rip out nv30_exa.c, we have other means to play with the 3D engine now. commit adb2df9a9c88bc9646b65a235aa36416c3064c9f Author: Ben Skeggs Date: Wed Mar 7 16:46:27 2007 +1100 Xv: Make the blit adaptor play nice with EXA Previously the blit adaptor assumed that all drawing (ie. XAA) would occur to the screen pixmap, so it didn't bother touching surface offsets. Now, with EXA this isn't true and the card complained about exceeding the colour buffer limits when attempting to play video. This patch kills 2 birds with one stone; instead of pointing the GPU back at the screen pixmap when playing video, we point it at the destination drawable. So, Xv will also hopefully play nicely with redirected windows now. commit f28abbedfc7deeb90317dd24c7ec5dfe1ae94fdf Author: Ben Skeggs Date: Wed Mar 7 13:58:48 2007 +1100 Only use Y32 for Solid(). It's the only place the workaround is needed at this point, and in some places we need to use the "proper" ARGB format (Xv for instance). commit 6441253d34d118befe8950781ba012fc58bb5158 Author: Ben Skeggs Date: Wed Mar 7 04:33:44 2007 +1100 Fail configure if xorg-server isn't at least version 1.1 The minimum requirement has been 1.1 for a while now, but would only fail at compile time when compiling nv_exa.c. This patch makes configure fail, and removes the remaining conditional support for older servers. Hopefully the configure.ac is ok, I suck at autofoo. commit e568c2d8e82b1bcf25e495f4a82331803d954234 Author: Ben Skeggs Date: Wed Mar 7 04:22:24 2007 +1100 reindent and move nv_video.c around a bit commit a0a5586836eb87a8c21abb06f9b8afd64eec714a Author: Ben Skeggs Date: Tue Mar 6 05:42:29 2007 +1100 Use Y32 format instead of A8R8G8B8 for 32-bpp pixmaps fixes 32-bpp EXA solid-fills, previously alpha was forced to 0xff. commit 2e9976c034b6c310b7ad0fc858250c5e54781a9e Author: Ben Skeggs Date: Mon Mar 5 14:45:04 2007 +1100 move NVAccel* funcs into nv_accel_common.c commit add6463b848fab274cb5cc190a78aeafc1389203 Author: Stephane Marchesin Date: Sun Mar 4 22:40:48 2007 +0100 Joint patch from Ben Skeggs and me that fixes some (all ?) composite issues. commit 83868bd0a36520da49e40e2b8404e4652de39824 Author: Ben Skeggs Date: Thu Mar 1 08:39:23 2007 +1100 nouveau: avoid attempting an AGP-only alloc will fail on non-AGP cards, and leave nasty messages in Xorg.log... commit da1dd87acb7061b4772c271dc3c9071a3b160e8a Author: Ben Skeggs Date: Wed Feb 28 15:30:52 2007 +1100 match drm v4 interface changes context (gr/dma) object handling: - remove use of flags/dmaobj when creating objects - move object creation/setup into nv_accel_common.c - NV04: make PGRAPH complain a bit more if we program the hardware incorrectly. - NV04/NV10: enable PGRAPH_DEBUG_3_CTX_METHODS This bit seems to enable the use of SET_* methods. - NV04/NV10/NV40: enable PGRAPH_DEBUG_3_IGNORE_PATCHVALID Objects no longer get PATCH_CONFIG_VALID set in their context. Not sure how to get this set other than to intercept the PATCH_EXCEPTION error and enable the flag. I opted for the same method NVIDIA use, which makes PGRAPH ignore it. misc: - use NV04_SCALED_IMAGE_FROM_MEMORY on all NV_ARCH_04 cards - fix offScreenBase calculation (EXA) - move mem alloc/free helpers into nv_mem.c commit 7e5f90b264fdb3081250ff16748164998b6461a6 Author: Adam Jackson Date: Tue Feb 27 14:46:20 2007 -0500 Typo fix. commit c85da5d8b346e17e68da68e57d62c3f77029b680 Author: Damien Thebault Date: Wed Feb 14 00:35:50 2007 +0100 Don't output the chipset list to the log file, silence some warnings. commit f650cb126e042b44126df6a298e996726356ec5b Author: Stephane Marchesin Date: Wed Feb 14 00:29:52 2007 +0100 Fix the workaround (or workaround the fix). commit ac2784d38634bc6d8aec3a94d609b60cd49b21b6 Author: Stephane Marchesin Date: Wed Jan 24 20:39:40 2007 +0100 Make NV_DMA_DEBUG print the fifo position. commit d54d441df4294bf4fed26635a738f4111087e06d Author: Stephane Marchesin Date: Wed Jan 24 19:13:05 2007 +0100 Increase the fifo dump size. commit b21dbb170aa49c83ef450c2ab8c34614277e7fbc Author: B. Rathmann Date: Wed Jan 24 13:46:16 2007 +0100 Fix the G70 issues. commit e683979666a4c07590b7bade2f62cca33c19a3b2 Author: Ben Skeggs Date: Fri Jan 19 15:40:22 2007 +1100 bump drm patchlevel commit feff7cb67ae61987146a21dad535702f3db2264c Author: Jeremy Kolb Date: Thu Jan 18 21:28:51 2007 -0500 Fill in some more nv30 magic values. Not sure what they do yet but they don't hurt anything. Apply names to other registers. commit 31462c30bb79e8245edee0cf57c46b889d2f259b Author: Jeremy Kolb Date: Wed Jan 17 08:34:56 2007 -0500 Fix PGRAPH_DEBUG* regs to match what's done on the nv35. Specifically change DEBUG_3 | 0x00de0000 for data/format/dma checking. This is consistent with other cards and dumps so it should be correct. commit 4583312ba72047e6bc65bfc576a0bcf90e04b2de Author: David Jeannot Date: Tue Jan 16 00:03:56 2007 +0100 Indent nv_bios.c properly. commit 6246fba5a54dc7af9a8b16c5a14131180831562d Author: Patrice Mandin Date: Fri Jan 12 20:25:16 2007 +0100 Add missing include for malloc/free commit 37937980ec7b21c40539daee029886c4f4a0f0cd Author: Jeremy Kolb Date: Fri Jan 12 00:26:20 2007 -0500 NV30: Set DEBUG3 reg bit 1. Turns on automatic hw context switching. commit d5617e91ff13f9e19d9e5d421fd081f59dec685c Author: jkolb@brandeis.edu Date: Thu Nov 2 20:23:36 2006 -0500 Just a superficial cleaning up. Nothing exciting. commit 1f6239de8d7618de6aee402eaf1d8552524a996e Author: Ben Skeggs Date: Tue Jan 2 15:08:36 2007 +1100 NV4x changes to work with latest drm. commit f9ba29a07581ede8c409b0eb8b549db3b446f490 Author: Stephane Marchesin Date: Wed Dec 27 21:52:15 2006 +0100 Output the driver date to the logs on startup. commit 2f1d14fe1c03c32ad60776e0d0c2ae41a42ea4be Author: Ben Skeggs Date: Tue Dec 12 00:13:05 2006 +1100 Remove final remaining PRAMIN access (NV04-specific), the drm handles it now commit de7255d5420c64a2707f5e78a4157d93618e6c17 Author: Ben Skeggs Date: Fri Dec 8 18:09:26 2006 +1100 Provide some visuals with a stencil buffer, and actually call NVDRIInitVisualConfigs. commit e64dcc59b607ae5ad7049c35fed6d6a300cd5f6e Merge: 0f7957d 656dfcd Author: Matthieu Castet Date: Wed Dec 6 22:09:23 2006 +0100 Merge branch 'master' of git+ssh://matc@git.freedesktop.org/git/nouveau/xf86-video-nouveau/ commit 0f7957da9ce856ef0accc922ab368ac10171b5e6 Author: Matthieu Castet Date: Wed Dec 6 22:07:26 2006 +0100 More pgraph regs commit 656dfcd635551245b2f58835c5ea87474d3eb60d Merge: ed307d5 224578b Author: Stephane Marchesin Date: Sun Dec 3 10:20:04 2006 +0100 Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/xf86-video-nouveau commit ed307d559be72e06f64566574beb36200ebe47e2 Author: Stephane Marchesin Date: Sun Dec 3 10:14:04 2006 +0100 Introduce lock step versioning with the drm. Fix the MEM_ALLOC issue. commit 224578b74645fe3624669dc3521fe6deb1cc4aae Author: Matthieu Castet Date: Tue Nov 28 19:12:55 2006 +0100 Don't alloc fifo if it is not needed. commit 146eb74cb7d1da1da55247a04e7a969d98601e42 Author: Stephane Marchesin Date: Mon Nov 27 00:03:11 2006 +0100 Mandatory oops commit. commit bdfa6776128f4bc7e2f3caa57296571acb9bd661 Author: Andrew Mitchell Date: Sun Nov 26 23:59:06 2006 +0100 Remove XF86DRI defines from the driver. It's already mandatory anyway. commit 7ebc8c4327d0b50f60c4cd4423414d4cfbb8b7d8 Author: airlied Date: Fri Nov 17 16:23:38 2006 +1100 add VGA CRTC registers from haiku commit 7150a4357dff0a2e4468190e2fd228ed07d367f9 Author: Dave Airlie Date: Fri Nov 17 12:55:37 2006 +1100 remove nvvga.h unused commit 64a1c5bb90fd13ce1c191873a4f4afc2a9ede09b Author: Dave Airlie Date: Fri Nov 17 12:51:11 2006 +1100 find and version DRM earlier in startup sequence so it is loaded firstup commit 659b5de8200d9022e7616f03b20a306fff2af0fe Author: Matthieu Castet Date: Fri Nov 17 00:59:58 2006 +0100 Cleanup of PVIDEO. commit 370b83eb3347d14003f2878737d25de7dacaeec1 Author: Matthieu Castet Date: Wed Nov 15 22:10:27 2006 +0100 Use objects from nouveau_reg.h. commit 2ffeb45a953a2ff52abe6f78dacfb9c53f873dbb Author: Ben Skeggs Date: Wed Nov 15 01:22:18 2006 +1100 Set SURFACE_FORMAT in NVExaPrepareCopy. Fixes one of the many issues with xorg-server-1.2 commit 85bda095107558846fe6fb803b6df412213b27f4 Author: Ben Skeggs Date: Wed Nov 15 00:47:04 2006 +1100 nv_exa.c tab goodness commit 8b733a25c30fb9e499d678c26b777d072d1ac187 Author: Ben Skeggs Date: Tue Nov 14 08:31:21 2006 +1100 Fix type. 0x84 is DEBUG_1 commit 030eb38dd1fe767807aab0447ed4fab4ec8c368a Author: Ben Skeggs Date: Tue Nov 14 03:09:05 2006 +1100 Fill in front_offset/front_pitch commit 589bb37ff37bb7d4775f5dca0301c5d97ea73b06 Author: Ben Skeggs Date: Sun Nov 12 16:04:32 2006 +1100 Add NVDRIFinishScreenInit. commit d0c09a1bd0e1c26cc591a3d8738b94b1efe576ec Author: Dave Airlie Date: Sun Nov 12 14:08:45 2006 +1100 add some names to registers commit 84928fd946b4f02d8a943226481304417475c4f9 Author: Ben Skeggs Date: Sun Nov 12 07:43:24 2006 +1100 Import nouveau_dri.h from the 3D driver as nv_dri.h, and setup DRIInfo->devPrivate. commit cdb9e3acf0aa5cdf6e5aa33fb499ea8e93f7f1f2 Author: Ben Skeggs Date: Sun Nov 12 07:33:53 2006 +1100 Temporary workaround for DRI drmMap problem, not sure of what we actually need to do here yet. commit d3babbfbed898921e1a167df08eef92d381d6aa0 Author: Ben Skeggs Date: Sun Nov 12 07:28:31 2006 +1100 nv_dri.c still had some space-indented functions, not anymore :) commit bad4e6c674ac4fdc0aebbbc6d36fc2854ee8f885 Merge: 1b14821 c096565 Author: Stephane Marchesin Date: Mon Nov 6 03:14:07 2006 +0100 Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/nouveau/xf86-video-nouveau commit 1b14821ecd67a62a34a902e62c0b229bb9ed97ca Author: Stephane Marchesin Date: Mon Nov 6 03:13:50 2006 +0100 Added a DRI visual configs functions. It should work but I can't test it... commit c096565a0f6e6c12255e57eaefb878904ce04971 Author: Ben Skeggs Date: Mon Nov 6 11:54:19 2006 +1100 Fix TEX0_IN_TEX1 fragprog.. I must've been asleep when I did that.. commit 47f32cfe6e2f513f86b7a8f02a8872c134e2327d Author: Dave Airlie Date: Mon Nov 6 11:45:53 2006 +1100 use pagesize to work out the sarea size commit e6c4d40e247939f677e285db15a78ccc33b92b41 Author: Dave Airlie Date: Mon Nov 6 08:39:49 2006 +1100 don't fail dri module load if loaded already commit 4cc4a1f7ef559f1ce56706f16ee24a3b6879d28d Merge: b95f8aa b4e4307 Author: Dave Airlie Date: Sun Nov 5 18:00:29 2006 +1100 Merge ssh://10.1.1.200/home/airlied/git/xf86-video-nouveau commit b4e4307af982b50aff191983d209cb855a377f80 Author: Dave Airlie Date: Sun Nov 5 17:59:17 2006 +1100 fix G5 endianness issue with panel size regs commit b95f8aac9e6dcbf4d10a5e26bde6a0f3595608cb Merge: ba71154 e6b1f68 Author: Dave Airlie Date: Sun Nov 5 17:53:53 2006 +1100 Merge branch 'master' of ssh://git.freedesktop.org/git/nouveau/xf86-video-nouveau commit ba711545a0fd091c05b514f30c1e904370026499 Author: Dave Airlie Date: Sun Nov 5 17:51:10 2006 +1100 set the PPC use BE MMIO commit e6b1f687e3bf127d8dba1871d67eff9d83ac284e Author: Stephane Marchesin Date: Sat Nov 4 16:57:30 2006 +0100 Remove the context object flags handling from the DDX since it's now in the DRM. commit ead77e0ec1d0c62829fa973db3d62937b44781e5 Author: Stephane Marchesin Date: Sat Nov 4 04:47:57 2006 +0100 Add the NV44A 3D object class. commit 87463666ab23e047f355cfcd7016aa9c7cd8ad76 Author: Ben Skeggs Date: Fri Nov 3 04:00:09 2006 +1100 Use "do { blah; } while(0)" instead of just braces. (suggestion from megari on irc) commit 68682238b36292409ce7f41ed90bd3be860e77f3 Author: Ben Skeggs Date: Thu Nov 2 16:07:26 2006 +1100 Install NV30_TCL EXA hooks if NV_ENABLE_3D is defined. Ok.. Firstly I don't recommend using this code, it is not ready for general usage. We probably only want to keep the Composite hook, but the others are useful to test things with. 1. You will most likely (read: definitely) need to start X with the binary driver before starting X with nouveau/NV30_TCL.. If you don't PGRAPH will yell at you and X will crash. 2. Copy() is bad when the src and dest are the same, so scrolling and moving windows around will fall back to software rendering.. 3. Composite() is slightly better than the one in nv_exa.c, but it's buggy in a few cases and not complete yet. Particularly, transforms are missing. 4. There are some correctness problems that I haven't bothered to fix yet, so you'll probably see bits of windows left behind when moving them around.. 5. Don't be surprised if it's horribly broken :) commit c371d90935d6baf2f1dd0073741637d14b506f59 Author: Ben Skeggs Date: Thu Nov 2 15:57:47 2006 +1100 Put braces around NVDmaSetObjectOnSubchannel... commit b45aea22a8da69ad4a2493f7f33fa65186a83ba3 Author: Ben Skeggs Date: Thu Nov 2 14:52:24 2006 +1100 Merge >=NV30-specific EXA code.. hard-disabled pending testing on my C51, and a proper commit message.. commit e79b0befe92110c1cd2e0e1ae69fced1cd5acba3 Author: Ben Skeggs Date: Thu Nov 2 01:29:34 2006 +1100 Reformat NVExaInit commit 6a77e5bf2e58b19df67c029ad7bffd92f8cf652f Author: Ben Skeggs Date: Thu Nov 2 01:18:14 2006 +1100 First part of preparation for NV30_TCL EXA code merge. commit 1d6e911ab5391277b403ef6f7b095203cfd19a53 Author: Ben Skeggs Date: Thu Nov 2 00:38:53 2006 +1100 Reindent nv_dma.c with tabs.. commit 06748f74f639242fd690a3dda7e685ae4fa1f95e Author: Ben Skeggs Date: Wed Oct 11 11:06:16 2006 +1100 s/init/alloc/ commit a2d55603db8c01cc4b9f3404c282b1e4963a152c Author: Stephane Marchesin Date: Wed Oct 11 00:39:36 2006 +0200 Remove the PFIFO_REINIT hack, and enable the irq by default. This commit requires the matching drm commit, and will probably break stuff. commit 78537b3342bbf1c16dc78f8f06cb3f989ce8f03f Author: Ben Skeggs Date: Thu Sep 14 12:56:28 2006 +1000 It usually helps to wait on a notifier, and not on a NVAllocRec.. Oops. commit 01dde28611238cf2d81b087b371cc67296d1b581 Author: Ben Skeggs Date: Thu Sep 14 12:17:32 2006 +1000 Allocate notifiers with NVAllocateMemory. Fix some warnings. Return success/fail for DMA and Context object creation. commit 3d5c560f509646853cc863e35ed2412db39cd8a3 Author: Stephane Marchesin Date: Tue Sep 5 07:39:10 2006 +0200 Port some of the least intrusive nv03 code to the nouveau driver. commit 6fb7a63bf5d4f046583f9d14862c16ec5979a318 Author: Ben Skeggs Date: Sun Sep 3 06:41:52 2006 +1000 Config options for cmdbuf location/size. Will default to putting the cmdbuf in AGP (except for PowerPC) if an AGP card is detected. Won't currently be detected because something is wrong DRM-size. If you have an AGP card you can manually specify 'FBLocation "AGP"' in xorg.conf to make it work. Needs an updated DRM to have any effect. commit e49d561d2328eeac7691661e28955a882bba2192 Author: Ben Skeggs Date: Sun Sep 3 01:51:23 2006 +1000 Copy+Paste a workaround for a NV40 hardware bug from NVShowHideCursor() into LoadStateExt(). This should fix the problem of the HW-cursor still being enabled when VT-switching back to a framebuffer console. commit 69ace0c4388cb1a66ea74f627fe02fe89e7d35c0 Author: Ben Skeggs Date: Sat Sep 2 22:17:55 2006 +1000 Kill off one of the M2MF objects, and use the engine's SET_OBJECT_{IN_OUT} to swap between AGP->VRAM and VRAM->AGP. commit 72cf79b9e5dc0d97e933f540d063161129bbebf7 Author: Ben Skeggs Date: Sat Sep 2 21:59:26 2006 +1000 Don't create objects that aren't needed. This frees up a couple of subchannels for EXA, use one of them for MEMORY_TO_MEMORY_FORMAT. commit 6a06d9022f3c0bc845f02091d83faf95f69f81bd Author: Ben Skeggs Date: Sat Sep 2 18:15:15 2006 +1000 Move code out of nv_xaa.c that doesn't belong there. commit 46ac77d524dd183c6b50a7a0e77990514ff28840 Author: Ben Skeggs Date: Sat Sep 2 17:57:38 2006 +1000 Add back some setup that went missing during PFB reg cleanup. Should fix corruption on NV40. commit 03b86f08667a10c44420d60787fe9e17b5d20ab8 Author: Ben Skeggs Date: Thu Aug 31 15:53:25 2006 +1000 Rename module from nv_drv.so to nouveau_drv.so to allow both nv and nouveau to coexist. Also disabled building of riva128.so, as we plan on merging it with the rest of the nv code. commit 17c871a44987af04d1688798e2e7802a5f5ba522 Author: Dave Airlie Date: Wed Aug 30 06:24:23 2006 +1000 clean up FB register names commit 7d3c12424fd79daf831b7c28780586e8bd9c3574 Author: Dave Airlie Date: Wed Aug 30 04:23:43 2006 +1000 add some names for the RAMDAC registers commit 0e70296ce9f7a921c4b971919d12c262202d8d48 Author: Dave Airlie Date: Wed Aug 30 02:18:02 2006 +1000 add some names for some of the CRTC registers - some names not very meaningful yet commit 9a5e2c5be96eaced3aadd153fb2f9b1928173af7 Author: Dave Airlie Date: Wed Aug 30 01:48:07 2006 +1000 remove select head registers PCIO and PDIO commit dec0691db79b1ded2942c1cbfa97434fa8693f9b Author: Dave Airlie Date: Wed Aug 30 01:13:05 2006 +1000 remove unused pointers after macroisation commit 9444b692607895572c8199a60d6968fbc374d51e Author: Dave Airlie Date: Wed Aug 30 01:02:45 2006 +1000 missed 2x PGRAPHs in XAA commit f73cb8ef4f4fbb588bfe9ca767286153b2565a37 Author: Dave Airlie Date: Wed Aug 30 00:59:39 2006 +1000 remove PCRTC via macros commit 6d5b1765e10856a7dfa75c27ad96f547dc26b23a Author: Dave Airlie Date: Wed Aug 30 00:48:23 2006 +1000 remove PEXTDEV and PTIMER using macros commit 6140bdfe6959cd0f6ce8e06d34b6e838d8cef046 Author: Dave Airlie Date: Wed Aug 30 00:43:07 2006 +1000 remove PMC using macros commit 28d9befa6308462a6bc1809b894ebe389873fd6a Author: Ben Skeggs Date: Wed Aug 30 01:26:58 2006 +1000 Make EXA the default commit fa9209f77df3d835ebad43dc82988c000398f650 Merge: ab2b550 2f7caf6 Author: Stephane Marchesin Date: Tue Aug 29 13:42:49 2006 +0200 Merge branch 'master' of ssh://marcheu@git.freedesktop.org/git/nouveau/xf86-video-nouveau commit ab2b5509e82a646ac187b020c91234e33f81065d Author: Stephane Marchesin Date: Tue Aug 29 13:42:34 2006 +0200 Make use of NV5_SCALED_IMAGE_FROM_MEMORY on NV05. commit 9911eb726f99166968165710a9e2f540388cd42a Author: Stephane Marchesin marchesin@icps.u-strasbg.fr Date: Tue Aug 29 03:18:27 2006 +0200 Enable the composite hooks. After changing NV_SCALED_IMAGE_FROM_MEMORY for NV10_SCALED_IMAGE_FROM_MEMORY it seems the composite hook works. Also, add a more complete list of desktop pci ids. commit 2f7caf6eb5eb6a3991720fc413bd20723473212f Author: Dave Airlie Date: Tue Aug 29 08:13:59 2006 +1000 remove PGRAPH direct accesses commit 51f0b67d9064fffc6b357d2923188a030e85eace Author: Dave Airlie Date: Tue Aug 29 07:51:49 2006 +1000 remove PFB usage with macros commit b50736d1583b960ab70f3e113294db8c2da69e31 Author: Ben Skeggs Date: Mon Aug 28 17:07:06 2006 +1000 Use NVAllocateMemory for AGP scratch buffer. commit a5ddd8fcf4278c35d71605794d0d5711e7c0ebb7 Author: Dave Airlie Date: Mon Aug 28 16:41:20 2006 +1000 remove legacy crap from nvreg.h add cursor reg defines commit f035bc63c34bce49e1c2619f14ab98b4b1922beb Author: Dave Airlie Date: Mon Aug 28 16:23:32 2006 +1000 missed some vga routines commit 0b45a9f725442d5bd784ee67b7473929993f6082 Author: Dave Airlie Date: Mon Aug 28 16:19:56 2006 +1000 add RAMDAC register read/write commit 24267d7e39383930c589bc80e2bbd4e5cf66ec2a Merge: 349496c c0154e6 Author: Ben Skeggs Date: Mon Aug 28 14:46:51 2006 +1000 Merge branch 'master' of git+ssh://git.freedesktop.org/git/nouveau/xf86-video-nouveau commit 349496c97fafed04806c01bd9d4386b0fcaa9fd2 Author: Ben Skeggs Date: Mon Aug 28 14:45:42 2006 +1000 More cleanups from DRM memory alloc changes. commit c0154e615c091c7bb483fcfd07e216b21618d0f2 Author: Dave Airlie Date: Mon Aug 28 14:07:05 2006 +1000 use nvReadVGA and nvWriteVGA in more places commit e0f1479773c1a00ec69edbece98e5e2b66c0c2c9 Author: Ben Skeggs Date: Sun Aug 27 22:45:36 2006 +1000 Fix ShadowFB for FB alloc changes, should fix RandR rotation also. commit 0de4d0b8b79e2238f2c4b374b5012a25ae985502 Author: Ben Skeggs Date: Sun Aug 27 22:27:17 2006 +1000 Slash UseFBDev and DGA support. commit e49d08ff482755e9f95c4c3b3cf065e6f0d2bc23 Author: Dave Airlie Date: Sun Aug 27 10:04:50 2006 +1000 add some read/write NV VGA register wrappers commit c64c55b3133221462980b934a308daf2cc0e473d Author: Dave Airlie Date: Sun Aug 27 09:56:36 2006 +1000 remove all U0* types in favour of more standard CARD* types commit 9c294b962379a955d2e8e2cb2c54f845fd4c5740 Author: Ben Skeggs Date: Sat Aug 26 00:43:21 2006 +1000 Wow I suck tonight.. another oops. commit b8411ae92b6833c9336f82ed86dc8755ca8b9dcc Author: Ben Skeggs Date: Sat Aug 26 00:39:36 2006 +1000 Whoa, how did that happen... commit d458cdac152a49eec9acdfe5081f6d426e712bf2 Author: Ben Skeggs Date: Sat Aug 26 00:33:47 2006 +1000 Initial work in porting the DDX to use the DRM for memory allocations. This is enough to make it work, but there's still a *lot* of cleanups to do. commit 83ae039b8f8ea08ae9436201014c7e1ba25a4839 Author: Dave Airlie Date: Fri Aug 25 19:33:08 2006 +1000 fixup compile for git commit ea2bc33d32bf9abeb23b3fe8cb6c9d28ddccef01 Author: Dave Airlie Date: Fri Aug 25 19:17:51 2006 +1000 updated git tree from changes that got lost on way from CVS commit 07b81112ba4678085a148e5ffaadd4684f74d64d Author: marcheu Date: Thu Aug 24 21:00:42 2006 +0000 Make NVInitAGP fail if there is no AGP area. Maybe that function shouldn't be called for PCI(-e) cards in the first place. commit 109b5abed6c0c701a1fb84ec63ff8f5914eee8e3 Author: marcheu Date: Wed Aug 23 21:32:47 2006 +0000 If you stare at nv_hw.c long enough, things start to make sense. I swear ! commit 80ba1cfec290dbb82c4a1042255a21b626512e84 Author: marcheu Date: Wed Aug 23 17:11:22 2006 +0000 Comment out NVDmaKickoff() in NVResetGraphics(). NVResetGraphics is called twice on startup, and flushed to the card in between. Since NVResetGraphics resets the fifo pointer, this sometimes ends up in a situation where the CPU writes at the same place of the fifo (at the beggining) the GPU is currently reading from. Obviously this is bad. Also, add code to dump fifo in case of crashes. commit 9b19daa55c7770a3e66b2374da0212c75ed21260 Author: marcheu Date: Tue Aug 22 01:16:18 2006 +0000 Remove debug message. commit b44b54e4c369c612a692eabb8662b3db97758a83 Author: marcheu Date: Mon Aug 21 13:19:06 2006 +0000 Fill more fields in the DRIInfo struct. commit aaf13d0e7cc5c76ee81b4234dc2c55bbedac1faa Author: darktama_ Date: Sun Aug 20 15:11:06 2006 +0000 Oops, this shouldn't be here still... commit 00fd86dea8d2eaa561cc89a35046d15bcf92bb82 Author: darktama_ Date: Sun Aug 20 14:40:43 2006 +0000 - Allocate notifiers with the DRM - Rename agpMemory and friends to agpScratch and friends commit d5c68d3f83f84ca67ee9df269b778bbed50851a0 Author: darktama_ Date: Sun Aug 20 12:51:49 2006 +0000 Alloc AGP through the DRM commit 6d0924c272954f44b2a9b6b11be8c209dd67de8e Author: marcheu Date: Sat Aug 19 16:04:56 2006 +0000 Begginings of PINS parsing code I had laying around... commit 59e2d852d6f10ba26a394ff7ea5d3e7b30f2be71 Author: darktama_ Date: Mon Jul 31 07:32:57 2006 +0000 Need.To.Pay.More.Attention... commit 9a314361fd004afe7129ae2d41f58ddd7fe6f56a Author: darktama_ Date: Mon Jul 31 03:24:17 2006 +0000 Updates for DRM changes, and a few cleanups commit 11fbb14876e7873a863de16b01fb5778e841b4bd Author: erikwaling Date: Thu Jul 13 04:13:07 2006 +0000 Added more opcodes and some TODOs. commit dd54fea7562b8c9a6d26b645a03c9644c08090cc Author: erikwaling Date: Thu Jul 13 03:09:11 2006 +0000 Changed INIT_MACRO to haiku-like implementation. commit b7e68083f3bf6b0943b58cfed0b82de61eeaac33 Author: marcheu Date: Mon Jul 10 00:36:31 2006 +0000 Add a check that bios writes fall within known areas. Use these areas to setup mappings as well. Add some debug support to the bios code. commit fe2a1360d72385ad0f61f381a296820d02a60e79 Author: marcheu Date: Mon Jul 10 00:30:54 2006 +0000 Use -Wall by default commit ca38f1d9d61393915515e1042204b35aeac863ba Author: darktama_ Date: Sat Jul 8 13:53:00 2006 +0000 Remove FIFO and object handling out of the DDX. This commit makes the DDX dependant on the DRM to operate at all.. commit b9b880b83896defe06ce61c9aef2f5ae4eb4f37e Author: lumag Date: Mon Jun 12 20:21:11 2006 +0000 Fix exa acceleration by filling versioning fields. commit 0bbc0bcfe33c2625ea6175c3b052d231cc3b7c8f Author: darktama_ Date: Sat Jun 10 18:34:14 2006 +0000 Quick hack to make sure CRTC 0x44 contains it's original value when VT switching back to the console (also on server shutdown). Should fix the problem of one display having scrolling issues, and losing it's text-mode cursor. commit 18e65f4e0604c744ea905319348c688141e14bbf Author: marcheu Date: Thu Jun 8 01:10:01 2006 +0000 Remove xf86ReadPciBIOS, use the bios from the reg aperture instead (that will probably work on more archs anyway) commit 2f5fcd131dbea5cb9873cc8a4aad44ae1bcf1340 Author: darktama_ Date: Fri Jun 2 21:54:48 2006 +0000 Remove some XFree86LOADER conditionals commit 7889cc0241450aaa8e9dafc65f9f7976df3cd99b Author: darktama_ Date: Sat Apr 22 02:26:53 2006 +0000 Need to include nv_include.h before checking that XF86DRI is definied. XF86DRI lives in xorg-server.h - included from config.h commit 3083263eb40f57e4c529473c5e9f935109a1719f Author: marcheu Date: Fri Apr 21 22:15:59 2006 +0000 Don't include config.h in all files but in the *_include.h files. That's what they're here for after all. commit 864e2c6936a37005112a3c6f3f7db5a16100b96c Author: darktama_ Date: Fri Apr 21 02:46:31 2006 +0000 Include config.h in all source files commit 74ff8fc182c6f728a1b5e8a0415c25b8b7a4af94 Author: marcheu Date: Thu Apr 20 18:54:12 2006 +0000 Added a fixme about laptop chips commit ad38154a7e075207d8f462ffb90489efe9cf01f1 Author: erikwaling Date: Thu Apr 20 18:50:11 2006 +0000 Ported nv_exa.c to work with EXA >=2.0.0 commit 7c25d338e0c79a288fa192d9a2d4ac6eb59996c1 Author: Dave Airlie Date: Fri Aug 25 18:51:03 2006 +1000 initial import of nouveau code commit 98372d0f94a9d658a7257d2199ef37a2449b9961 Author: Adam Jackson Date: Fri Aug 11 16:02:28 2006 -0400 Replace panel message + MODE_BAD with MODE_PANEL. commit 43ec66396f805aba87017d193d97a03372c29909 Author: Aaron Plattner Date: Fri Jun 30 12:54:44 2006 -0700 Bump version to 1.2.0 for release. commit 6265b77dc8878e36abd76b73e209a2d76d70ba22 Author: Mark Vojkovich Date: Thu Jun 29 18:41:44 2006 -0700 New chip support and new PCI IDs. commit 5114639dff73c22845451acffed94f1da284a7df Author: Aaron Plattner Date: Mon Jun 19 09:32:11 2006 -0700 Generate the ChangeLog from git history for dist. commit 04d344dfcbb9928cf33943a880de333557e14be9 Author: Aaron Plattner Date: Fri Jun 16 18:03:21 2006 -0700 Delete the ChangeLog. The git history is just as good. commit eda3bac20dce2d5584ac07cc6b28a08ec55aa798 Author: Aaron Plattner Date: Wed May 24 15:05:22 2006 -0700 Derive the module version numbers from the package version. This idea was lifted from Michel Dänzer's similar code in xf86-video-ati. Also, make the riva and nv driver versions match. commit 1a40c4a79b79034d191496726a27af8b0805dba6 Author: Aaron Plattner Date: Thu Apr 27 18:10:37 2006 -0700 Add the libcwrapper back, conditionalized on the server version. commit 425e30d58b7b62fff01fbb58585ee69b2df6fec1 Author: Aaron Plattner Date: Thu Apr 27 10:32:10 2006 -0700 Determine whether PutImage hooks take a DrawablePtr by server version. Remove dependency on xorg-server >= 1.0.99.901. commit c34a93265cb42168376ebdf0746b3ccded9f126c Author: Aaron Plattner Date: Tue Apr 25 14:38:43 2006 -0700 Bump to 1.1.2 for new product names. commit f70247ade9eac8fa6115889662abb8e678a182dc Author: Aaron Plattner Date: Tue Apr 25 14:29:44 2006 -0700 Add names for Quadro FX 5500, 3500, 1500, 560, 550, and 350. commit ca4c8af624e87e5c6a2927092a9c230ae0e60c0e Author: Aaron Plattner Date: Wed Apr 12 02:04:52 2006 -0700 Add .gitignores. commit fb3faeb6073cef5a6a1b094f3d3bf020ceba9db6 Author: Adam Jackson Date: Sat Apr 8 01:38:33 2006 +0000 Bump to 1.1.1 for Xv changes. commit f793182898c4d844e9861a60a945f53ab7071adc Author: Aaron Plattner Date: Fri Apr 7 23:11:06 2006 +0000 Add a DrawablePtr argument to the XV functions to pave the way for redirected video. commit cb6b4073df7404822e2b553519c3a101f2ab0524 Author: Adam Jackson Date: Fri Apr 7 19:40:34 2006 +0000 Unlibcwrap. Bump server version requirement. Bump to 1.1.0. commit 3f140052f891a4dc674b82e438c9595e59b4676b Author: Aaron Plattner Date: Mon Mar 27 21:40:24 2006 +0000 Bump version to 1.0.2.0 for release. commit 84c007b426d321786f9aec1d9fda14b5baa35561 Author: Aaron Plattner Date: Fri Mar 10 02:29:03 2006 +0000 Coverity nos. 868 and 869: Free the result of xf86GetEntityInfo. commit 61e237eec7193701ce1236e67ebdfe7465b5db8a Author: Aaron Plattner Date: Tue Jan 24 16:45:29 2006 +0000 Fix typo in PCI ID (reported by Stefan Dirsch). Patch from Mark Vojkovich to XFree86 CVS on 2006-01-23. commit 5064f8a903923ca4b819bdf345f8f4c9254bdf3b Author: Aaron Plattner Date: Mon Jan 23 00:04:41 2006 +0000 New chip support from Mark Vojkovich's 2006-01-20 and 2006-01-21 XFree86 CVS updates. commit e8fd45625f2e09830136bde6bc70d51f25892450 Author: Aaron Plattner Date: Mon Jan 2 01:54:19 2006 +0000 Preliminary RandR rotation support. Bug #4708 commit 5ec53e759c5233a26a6c80901b9f31b51153f756 Author: Kevin E Martin Date: Wed Dec 21 02:30:01 2005 +0000 Update package version for X11R7 release. commit b0c8ca8c03c8ad1648b4597f7825bac7531100a7 Author: Adam Jackson Date: Mon Dec 19 16:25:54 2005 +0000 Stub COPYING files commit 4fd25919c2a217d355419efdfbf0fe148af6c146 Author: Kevin E Martin Date: Thu Dec 15 00:24:18 2005 +0000 Update package version number for final X11R7 release candidate. commit e4194bab2a790af10581ea2842717623db8998a2 Author: Kevin E Martin Date: Tue Dec 6 22:48:36 2005 +0000 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. commit baf60566b505fdf4387ec25789584b3f6ad72ce8 Author: Kevin E Martin Date: Sat Dec 3 05:49:34 2005 +0000 Update package version number for X11R7 RC3 release. commit 4df200ea93b0a072f29057eeaf7a09e5a3a1dfe2 Author: Kevin E Martin Date: Fri Dec 2 02:16:09 2005 +0000 Remove extraneous AC_MSG_RESULT. commit d4d5d7325fab1ea81f71d1ffc1fbbcc2d2253a65 Author: Adam Jackson Date: Tue Nov 29 23:30:00 2005 +0000 Only build dlloader modules by default. commit d76f3f776bdab920d050542da45ec2871d4b84e6 Author: Alan Coopersmith Date: Mon Nov 28 22:04:10 2005 +0000 Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) commit d4e306b585f737b4c1287c520470425b0c11dc32 Author: Kevin E Martin Date: Wed Nov 9 21:15:19 2005 +0000 Update package version number for X11R7 RC2 release. commit dde6dd1c7f95f9dccabfd919ad4ced795fe3fbd1 Author: Kevin E Martin Date: Tue Nov 1 15:08:53 2005 +0000 Update pkgcheck depedencies to work with separate build roots. commit 92b1bfcc8fd0f34e636a1e9955d5236334f78cd3 Author: Kevin E Martin Date: Wed Oct 19 02:48:03 2005 +0000 Update package version number for RC1 release. commit eda1cbc29cb0b2193a5bfb0eb620c740d9aef7c6 Author: Alan Coopersmith Date: Tue Oct 18 00:01:53 2005 +0000 Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro substitutions to work better with BSD make commit 6c58a05e405cbc87fbe0497123d9b82d2480bdd3 Author: Adam Jackson Date: Mon Oct 17 22:57:34 2005 +0000 More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead of indirectly commit fc20886c28c465578e6bd3ef2d9fe62bd993382b Author: Alan Coopersmith Date: Mon Oct 17 00:09:04 2005 +0000 Use sed & cpp to substitute variables in driver man pages commit 1e3c84f332b7b9a4b320b370b8b2ecafbbdd8f8a Author: Søren Sandmann Pedersen Date: Tue Oct 4 21:36:51 2005 +0000 Link nvidida readme file into nvidia driver, Exclude duplicated neomagic readme commit d8be62ab175a013f78d4944036da284ffad34d96 Author: Aaron Plattner Date: Thu Sep 29 21:47:29 2005 +0000 Add entries for GeForce Go 7800. (Change went into XFree86 on 2005-09-28). Don't hang if j is zero. This should never happen, but it's better to be safe than sorry. commit e39eb8b8c1a79d04f90a195351c4eec3dba0d612 Author: Aaron Plattner Date: Wed Sep 28 17:18:02 2005 +0000 Bug #3333 Patch #3417 Fix a hang during screen-to-screen blits on certain GeForce 6xxx and Quadro FX 540 graphics cards. commit dc5acc2e477edb85f468f8d46862ca138426cfd9 Author: Alan Coopersmith Date: Fri Sep 23 16:25:28 2005 +0000 Bug #4558 Patch #3551 22-Sep-2005 nv driver update from Mark Vojkovich: Fix possible cause of some acceleration instability on some GeForce6xxx parts. commit b0ea43a51d2a6983559eecdb7dbb73c5e585697c Author: Alan Coopersmith Date: Sat Sep 17 01:37:18 2005 +0000 Bugzilla #4480 Patch #3305 13-Sep-2005 nv driver update from Mark Vojkovich: - Adds PCI ids for GeForce 6800 XT cards - Adds names for existing PCI ids for some GeForce 6xxx & 7xxx cards - Fix a potential problem with pixmap cache corruption on GeForce 6xxx and 7xxx parts. (Mark Vojkovich, NVIDIA) commit cdf20033e2cfc9e8634876dd42613f7719340a5a Author: Eric Anholt Date: Fri Sep 16 01:36:45 2005 +0000 Put the riva_* files in the riva128.so subdriver, like monolithic. commit 9b1b3184cd586f6f8bf65ebd6f3c1afb1ae64d64 Author: Daniel Stone Date: Thu Aug 18 09:03:47 2005 +0000 Update autogen.sh to one that does objdir != srcdir. commit 75a0deb6e9d1a5bc698ea67b338c56bc99c1b2c0 Author: Alan Coopersmith Date: Fri Aug 5 03:52:28 2005 +0000 Bug #3987 Patch #3264 Workaround for 512 Meg video cards (can only map 256 Meg of it). (Mark Vojkovich) commit fb4033bd2662c199d7e4f0e3df7c4a0fb9870984 Author: Kevin E Martin Date: Fri Jul 29 21:22:44 2005 +0000 Various changes preparing packages for RC0: - Verify and update package version numbers as needed - Implement versioning scheme - Change bug address to point to bugzilla bug entry form - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to reenable it) - Fix makedepend to use pkgconfig and pass distcheck - Update build script to build macros first - Update modular Xorg version commit 6ea22f19210448605b9a18bf500c33168a77e77c Author: Søren Sandmann Pedersen Date: Tue Jul 26 18:40:29 2005 +0000 Build system for nv commit 74772a7dc49e34229497441fbbf2631bfb259b39 Author: Adam Jackson Date: Mon Jul 11 02:29:58 2005 +0000 Prep for modular builds by adding guarded #include "config.h" everywhere. commit 80ac36ec4fbbd9a4aae1bde01fe6ebc1088fa8cb Author: Alan Coopersmith Date: Sat Jul 9 16:51:58 2005 +0000 Bug #3740 Patch #3058 08-Jul-2005 nv driver updates from Mark Vojkovich: Change some console restore code for NV11. Hopefully, we can more reliably restore the console for desktop systems using DVI. This may correct a recent regression on NV11. Also, new PCI IDs. Add new nVidia PCI ids to match nv_driver.c changes. commit 6b75bc13462f1cfb735fe1de359ed9e45b5f4415 Author: Daniel Stone Date: Fri Jul 1 22:43:12 2005 +0000 Change all misc.h and os.h references to . commit 270f5269a08da8ed0186e8a2223b673e0433a771 Author: Alan Coopersmith Date: Wed Jun 29 15:56:23 2005 +0000 Bugzilla #3657 Patch #2992 Experimental DPMS support for GeForce4 and later laptops. (Mark Vojkovich) commit bf73c0716e9e4be0540d2ee7340bd5833831a434 Author: Adam Jackson Date: Sun Jun 26 04:38:12 2005 +0000 Bug #3628: Fix video driver submodule visibility. commit 175766a44ceb0a5d4226e9088d8e3e6d73815b4f Author: Adam Jackson Date: Sat Jun 25 21:16:55 2005 +0000 Bug #3626: _X_EXPORT tags for video and input drivers. commit 8759399a3744f0eb1e0cdc83ed23aaaafb9be444 Author: Alan Coopersmith Date: Thu Apr 21 22:25:47 2005 +0000 programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c programs/Xserver/hw/xfree86/drivers/nv/nv_setup.c //bugs.freedesktop.org/show_bug.cgi?id=3095> Patch #2501 nv DPMS panel fixes (Mark Vojkovich) commit 2db214d7cf5336fbea36d83bc9b089f70a494614 Author: Daniel Stone Date: Wed Apr 20 12:25:29 2005 +0000 Fix includes right throughout the Xserver tree: change "foo.h" to for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to for extension headers, e.g. Xv.h; change "foo.[ch]" to for Xtrans files. commit 3fe983d254f1ffe3c285548013be677ed4a67137 Author: Alan Coopersmith Date: Mon Feb 14 03:37:20 2005 +0000 Bugzilla #2533 (https://bugs.freedesktop.org/show_bug.cgi?id=2533) Feb. 3, 2005 "nv" driver update from Mark Vojkovich (Mainly driver updates for nVidia cards with ((pNv->Chipset & 0xfff0) == 0x0090) ) commit 8c95fdc889b56a76497f5194bafd06edfc962387 Author: Alan Coopersmith Date: Wed Jan 26 01:36:04 2005 +0000 Jan. 2005 nv chipset update from Mark Vojkovich Bug #2380 Patch #1752 commit 67c89797f62ea53b37927c64e0403e7e7c42de56 Author: Alan Coopersmith Date: Fri Dec 10 03:56:42 2004 +0000 Bugzilla #1985 sync to 12/08/04 version of Nvidia driver from Mark Vojkovich, including these fixes since last sync: Fix some DAC/Graphics memory contention issues on newer NVIDIA chips (specifically, NV40). More PCI IDs. Also, I've had trouble getting some panels to work automagically so I expose an FPTweak option to let the user adjust a troublesome register. commit 7c34d051168eba499beb20c40fd95703375f4c7b Author: Alan Coopersmith Date: Wed Nov 10 02:53:44 2004 +0000 (Bugzilla #1777) Import Mark Vojkovich's changes to NV driver since last sync with XFree86, including: Support for new NVIDIA chips. Egbert has a laptop that needs some DPMS ordering reversed. New chip support and workaround for Toshiba M30 laptop issue. PCI-Xpress chip support. DPMS support for DVI. Cursor changes for NV11 so that alpha blended cursors will work in conjunction with dithering (laptop panels). It previously did not. HW support for alpha blended stretch blits on NV5 and higher, though nothing is using them at this point. Add support for VBlank syncing the Xv Blit adaptor on hardware that supports it (NV11 and higher). Make console restoration a little more robust. We were making an assumption that failed on a newer laptop. Workaround for some NV31 DVI artifacts. Also add nVidia license statement to nv man page to comply with requirement that it appear in "user documentation" commit fcd6d7b57edb4e396189a0a2683bcf08974f3b59 Author: Egbert Eich Date: Tue Oct 12 19:13:44 2004 +0000 Set fbdev mode as the default mode on PPC (Olaf Hering). Added support for IBM space saver keyboard (Stefan Dirsch). Added support for Cherry CyMotion Master XPress (Marcus Schaefer). Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and RestoreBIOSMemSize() to be exactly opposite to the Save procedure in EnterVT() (Matthias Hopf, Alan Hourihane). Fix text mode restauration by removing the assumption that the register which determines which head is programmed is set. to the active head by the BIOS (Mark Vojkovich). When I wrote the resource code 5 years ago I made some assumptions which turned out to be false: I've assumed that the bus number of the PCI hostbridge would be the PCI bus the bridge links to. This is not correct. Fixing this assumption is not easy. However I hope that the attached patch will make the system work regardless as it 'ignores' host bridges from which the target bus is not known. This should not matter at all as we really don't care about host bridges (unless we have bridge specific code which retrieves information about the bridge). Fixed server crash on reset when a structure allocated in PreInit() was freed on CloseScreen(). Fixed ring buffer lock ups that happened because the structure that contained ringbuffer data was not zeroed after allocation. Fixed numerous warnings due to signed unsigned comparisons. programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: (NVBacklightEnable): Changed the order in which the sequencer registers and the backlight control registers are written. The sequencer control register need to be written first otherwise DPMS screen blanking produces vertical bars on a mobile device. lib/Xau/Imakefile: Build libXau static library PIC so it can be linked into toolkits that would like to wrap its functionality. commit 65e13fc61141b36a74c7a0e696d274574641ba20 Author: Adam Jackson Date: Fri Sep 17 03:04:52 2004 +0000 Bug #1192: Remove cfb support from drivers where its use is an option. Delete xf24_32bpp, as s3virge was the last user. Fix up some comments to refer to fb rather than cfb. commit bbafc6d2fcb21671de3cfb4ff973409405162e7a Author: Adam Jackson Date: Mon Aug 16 09:13:14 2004 +0000 Bug #1087: Make sure all the *Weak symbols are documented in the import list, so the loader knows not to complain about unresolved symbols when an optional module isn't loaded. This typically manifests as warnings about fbdevHW symbols when the user isn't using the framebuffer console. commit 8b6de7d388b7ae5169b2e38ad1a40981bc406cfc Author: Adam Jackson Date: Sat Jul 31 01:21:19 2004 +0000 Change several LoaderSymbol calls introduced by the bug #400 patch to *Weak() resolver functions. commit f745157f15befebe01552b103c573ccb94b8f388 Author: Adam Jackson Date: Fri Jul 30 20:30:53 2004 +0000 Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all framebuffer formats except cfb and the overlay modes should work, and r128 and radeon need to be loaded from the ati driver (both issues to be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga drivers. elfloader users shouldn't be affected. commit b9a6776bc04eb19343882bddb371b705677cfc14 Author: Eric Anholt Date: Wed Jun 16 09:23:29 2004 +0000 DRI XFree86-4_3_99_12-merge import commit cbf040deb0ab24425468ed60b3f3edd322ec210f Author: Eric Anholt Date: Wed Jun 16 09:23:29 2004 +0000 Initial revision commit 99a7f7ccce4e012bde57021cafcb132c3d599b96 Author: Egbert Eich Date: Fri Apr 23 19:42:10 2004 +0000 Merging XORG-CURRENT into trunk commit 708bb2eb0db3808e3edf94a5f22b3e3f5bb6488d Author: Egbert Eich Date: Sun Mar 14 08:33:30 2004 +0000 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 commit fe564263d97e370817fc862e5c8ead09bfb70b58 Author: Egbert Eich Date: Wed Mar 3 12:12:23 2004 +0000 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 commit 1a0be799ce4c479e39f8af86fcca3d192e83f455 Author: Egbert Eich Date: Thu Feb 26 13:35:54 2004 +0000 readding XFree86's cvs IDs commit ee5c9ef51cea88a630ecc652512603c42b39a533 Author: Egbert Eich Date: Thu Feb 26 09:23:23 2004 +0000 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 commit d176fa338d2d83bcf8d7ec68ff1aec205a258fec Author: Kaleb Keithley Date: Mon Feb 23 20:35:04 2004 +0000 Import most of XFree86 4.4RC3. This import excludes files which have the new license. If we want to, later we can import 4.4RC3 again and pick up the files that have the new license, but for now the vendor branch is "pure." commit ea7a90e680a2e9259e471dd6677bcca12aeea79e Author: Egbert Eich Date: Thu Jan 29 08:08:36 2004 +0000 Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 commit a6c83bd98c34aacdf7a6b82ea83d6ae775479502 Author: Kaleb Keithley Date: Fri Dec 19 20:55:14 2003 +0000 XFree86 4.3.99.902 (RC 2) commit 935c2adf58a10e6d3caa75823b4e7a0689555c49 Author: Kaleb Keithley Date: Tue Nov 25 19:28:38 2003 +0000 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks commit d84248580d5b05bb47a2ccdce7badfc884efa6da Author: Kaleb Keithley Date: Tue Nov 25 19:28:38 2003 +0000 Initial revision commit dd1a62caaaac6acc35584a2c8c525962d8574c95 Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 XFree86 4.3.0.1 commit 2f223903fba2bdee1623f3442d7580c809b428cc Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 Initial revision commit 542d57ea12b5461891a13a339e01ca9e1add124d Author: Kaleb Keithley Date: Fri Nov 14 15:54:48 2003 +0000 R6.6 is the Xorg base-line